enabled: true global: imageRegistry: "" imagePullSecrets: [] storageClass: "" affinity: {} nodeAffinityPreset: type: hard key: uavcloud.env values: - demo auth: rootPassword: "QzfXQhd3bQ" database: cmii username: "" password: "" replicationUser: replicator replicationPassword: "" existingSecret: "" forcePassword: false usePasswordFiles: false customPasswordFiles: {} image: # 如需修改,请保持如下的格式 registry: docker.io repository: docker.io/bitnami name: mysql # 一般请勿修改 tag: 8.0.26-debian-10-r0 pullPolicy: IfNotPresent pullSecrets: [] debug: false # choose between standalone and replication architecture: standalone volumePermissions: ## @param volumePermissions.enabled Enable init container that changes the owner and group of the persistent volume(s) mountpoint to `runAsUser:fsGroup` ## enabled: true image: registry: docker.io repository: docker.io/bitnami name: bitnami-shell tag: 10-debian-10-r140 pullPolicy: Always pullSecrets: [] resources: {} ## @param initdbScripts Dictionary of initdb scripts ## Specify dictionary of scripts to be run at first boot ## Example: ## initdbScripts: ## my_init_script.sh: | ## #!/bin/bash ## echo "Do something." ## initdbScripts: create_users_grants_core.sql: |- create user zyly@'%' identified by 'Cmii@451315'; grant select on *.* to zyly@'%'; create user zyly_qc@'%' identified by 'Uh)E_owCyb16'; grant all on *.* to zyly_qc@'%'; create user k8s_admin@'%' identified by 'fP#UaH6qQ3)8'; grant all on *.* to k8s_admin@'%'; create user audit_dba@'%' identified by 'PjCzqiBmJaTpgkoYXynH'; grant all on *.* to audit_dba@'%'; create user db_backup@'%' identified by 'RU5Pu(4FGdT9'; GRANT SELECT, RELOAD, PROCESS, LOCK TABLES, REPLICATION CLIENT, EVENT on *.* to db_backup@'%'; create user monitor@'%' identified by 'PL3#nGtrWbf-'; grant REPLICATION CLIENT on *.* to monitor@'%'; flush privileges; ## @param initdbScriptsConfigMap ConfigMap with the initdb scripts (Note: Overrides `initdbScripts`) ## initdbScriptsConfigMap: "" ## @section MySQL Primary parameters primary: ## @param primary.command Override default container command on MySQL Primary container(s) (useful when using custom images) ## command: [] ## @param primary.args Override default container args on MySQL Primary container(s) (useful when using custom images) ## args: [] ## @param primary.hostAliases Deployment pod host aliases ## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/ ## hostAliases: [] ## @param primary.configuration [string] Configure MySQL Primary with a custom my.cnf file ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file ## configuration: |- [mysqld] port=3306 basedir=/opt/bitnami/mysql datadir=/bitnami/mysql/data pid-file=/opt/bitnami/mysql/tmp/mysqld.pid socket=/opt/bitnami/mysql/tmp/mysql.sock log-error=/bitnami/mysql/data/error.log general_log_file = /bitnami/mysql/data/general.log slow_query_log_file = /bitnami/mysql/data/slow.log innodb_data_file_path = ibdata1:512M:autoextend innodb_buffer_pool_size = 512M innodb_buffer_pool_instances = 2 innodb_log_file_size = 512M innodb_log_files_in_group = 4 innodb_log_files_in_group = 4 log-bin = /bitnami/mysql/data/mysql-bin max_binlog_size=1G transaction_isolation = REPEATABLE-READ default_storage_engine = innodb character-set-server = utf8mb4 collation-server=utf8mb4_bin binlog_format = ROW binlog_rows_query_log_events=on binlog_cache_size=4M binlog_expire_logs_seconds = 1296000 max_binlog_cache_size=2G gtid_mode = on enforce_gtid_consistency = 1 sync_binlog = 1 innodb_flush_log_at_trx_commit = 1 innodb_flush_method = O_DIRECT log_slave_updates=1 relay_log_recovery = 1 relay-log-purge = 1 default_time_zone = '+08:00' lower_case_table_names=1 log_bin_trust_function_creators=1 group_concat_max_len=67108864 innodb_io_capacity = 4000 innodb_io_capacity_max = 8000 innodb_flush_sync = 0 innodb_flush_neighbors = 0 innodb_write_io_threads = 8 innodb_read_io_threads = 8 innodb_purge_threads = 4 innodb_page_cleaners = 4 innodb_open_files = 65535 innodb_max_dirty_pages_pct = 50 innodb_lru_scan_depth = 4000 innodb_checksum_algorithm = crc32 innodb_lock_wait_timeout = 10 innodb_rollback_on_timeout = 1 innodb_print_all_deadlocks = 1 innodb_file_per_table = 1 innodb_online_alter_log_max_size = 4G innodb_stats_on_metadata = 0 innodb_thread_concurrency = 0 innodb_sync_spin_loops = 100 innodb_spin_wait_delay = 30 lock_wait_timeout = 3600 slow_query_log = 1 long_query_time = 10 log_queries_not_using_indexes =1 log_throttle_queries_not_using_indexes = 60 min_examined_row_limit = 100 log_slow_admin_statements = 1 log_slow_slave_statements = 1 default_authentication_plugin=mysql_native_password skip-name-resolve=1 explicit_defaults_for_timestamp=1 plugin_dir=/opt/bitnami/mysql/plugin max_allowed_packet=128M max_connections = 2000 max_connect_errors = 1000000 table_definition_cache=2000 table_open_cache_instances=64 tablespace_definition_cache=1024 thread_cache_size=256 interactive_timeout = 600 wait_timeout = 600 tmpdir=/opt/bitnami/mysql/tmp max_allowed_packet=32M bind-address=0.0.0.0 performance_schema = 1 performance_schema_instrument = '%memory%=on' performance_schema_instrument = '%lock%=on' innodb_monitor_enable=ALL [mysql] no-auto-rehash [mysqldump] quick max_allowed_packet = 32M [client] port=3306 socket=/opt/bitnami/mysql/tmp/mysql.sock default-character-set=UTF8 plugin_dir=/opt/bitnami/mysql/plugin [manager] port=3306 socket=/opt/bitnami/mysql/tmp/mysql.sock pid-file=/opt/bitnami/mysql/tmp/mysqld.pid # [mysqld] # default_authentication_plugin=mysql_native_password # skip-name-resolve # explicit_defaults_for_timestamp # basedir=/opt/bitnami/mysql # plugin_dir=/opt/bitnami/mysql/lib/plugin # port=3306 # socket=/opt/bitnami/mysql/tmp/mysql.sock # datadir=/bitnami/mysql/data # tmpdir=/opt/bitnami/mysql/tmp # max_allowed_packet=16M # bind-address=0.0.0.0 # pid-file=/opt/bitnami/mysql/tmp/mysqld.pid # log-error=/opt/bitnami/mysql/logs/mysqld.log # character-set-server=UTF8 # collation-server=utf8_general_ci # # [client] # port=3306 # socket=/opt/bitnami/mysql/tmp/mysql.sock # default-character-set=UTF8 # plugin_dir=/opt/bitnami/mysql/lib/plugin # # [manager] # port=3306 # socket=/opt/bitnami/mysql/tmp/mysql.sock # pid-file=/opt/bitnami/mysql/tmp/mysqld.pid ## @param primary.existingConfiguration Name of existing ConfigMap with MySQL Primary configuration. ## NOTE: When it's set the 'configuration' parameter is ignored ## existingConfiguration: "" ## @param primary.updateStrategy Update strategy type for the MySQL primary statefulset ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies ## updateStrategy: RollingUpdate ## @param primary.rollingUpdatePartition Partition update strategy for MySQL Primary statefulset ## https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#partitions ## rollingUpdatePartition: "" ## @param primary.podAnnotations Additional pod annotations for MySQL primary pods ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ ## podAnnotations: {} ## @param primary.podAffinityPreset MySQL primary pod affinity preset. Ignored if `primary.affinity` is set. Allowed values: `soft` or `hard` ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity ## podAffinityPreset: "" ## @param primary.podAntiAffinityPreset MySQL primary pod anti-affinity preset. Ignored if `primary.affinity` is set. Allowed values: `soft` or `hard` ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity ## podAntiAffinityPreset: soft ## MySQL Primary node affinity preset ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity ## nodeAffinityPreset: ## @param primary.nodeAffinityPreset.type MySQL primary node affinity preset type. Ignored if `primary.affinity` is set. Allowed values: `soft` or `hard` ## type: "" ## @param primary.nodeAffinityPreset.key MySQL primary node label key to match Ignored if `primary.affinity` is set. ## E.g. ## key: "kubernetes.io/e2e-az-name" ## key: "" ## @param primary.nodeAffinityPreset.values MySQL primary node label values to match. Ignored if `primary.affinity` is set. ## E.g. ## values: ## - e2e-az1 ## - e2e-az2 ## values: [] ## @param primary.affinity Affinity for MySQL primary pods assignment ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity ## Note: podAffinityPreset, podAntiAffinityPreset, and nodeAffinityPreset will be ignored when it's set ## affinity: {} ## @param primary.nodeSelector Node labels for MySQL primary pods assignment ## ref: https://kubernetes.io/docs/user-guide/node-selection/ ## nodeSelector: mysql-deploy: "true" ## @param primary.tolerations Tolerations for MySQL primary pods assignment ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ ## tolerations: [] ## MySQL primary Pod security context ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod ## @param primary.podSecurityContext.enabled Enable security context for MySQL primary pods ## @param primary.podSecurityContext.fsGroup Group ID for the mounted volumes' filesystem ## podSecurityContext: enabled: true fsGroup: 1001 ## MySQL primary container security context ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container ## @param primary.containerSecurityContext.enabled MySQL primary container securityContext ## @param primary.containerSecurityContext.runAsUser User ID for the MySQL primary container ## containerSecurityContext: enabled: true runAsUser: 1001 ## MySQL primary container's resource requests and limits ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ ## We usually recommend not to specify default resources and to leave this as a conscious ## choice for the user. This also increases chances charts run on environments with little ## resources, such as Minikube. If you do want to specify resources, uncomment the following ## lines, adjust them as necessary, and remove the curly braces after 'resources:'. ## @param primary.resources.limits The resources limits for MySQL primary containers ## @param primary.resources.requests The requested resources for MySQL primary containers ## resources: ## Example: ## limits: ## cpu: 250m ## memory: 256Mi limits: {} ## Examples: ## requests: ## cpu: 250m ## memory: 256Mi requests: {} ## Configure extra options for liveness probe ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes ## @param primary.livenessProbe.enabled Enable livenessProbe ## @param primary.livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe ## @param primary.livenessProbe.periodSeconds Period seconds for livenessProbe ## @param primary.livenessProbe.timeoutSeconds Timeout seconds for livenessProbe ## @param primary.livenessProbe.failureThreshold Failure threshold for livenessProbe ## @param primary.livenessProbe.successThreshold Success threshold for livenessProbe ## livenessProbe: enabled: true initialDelaySeconds: 120 periodSeconds: 10 timeoutSeconds: 3 failureThreshold: 5 successThreshold: 1 ## Configure extra options for readiness probe ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes ## @param primary.readinessProbe.enabled Enable readinessProbe ## @param primary.readinessProbe.initialDelaySeconds Initial delay seconds for readinessProbe ## @param primary.readinessProbe.periodSeconds Period seconds for readinessProbe ## @param primary.readinessProbe.timeoutSeconds Timeout seconds for readinessProbe ## @param primary.readinessProbe.failureThreshold Failure threshold for readinessProbe ## @param primary.readinessProbe.successThreshold Success threshold for readinessProbe ## readinessProbe: enabled: true initialDelaySeconds: 30 periodSeconds: 10 timeoutSeconds: 3 failureThreshold: 5 successThreshold: 1 ## Configure extra options for startupProbe probe ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes ## @param primary.startupProbe.enabled Enable startupProbe ## @param primary.startupProbe.initialDelaySeconds Initial delay seconds for startupProbe ## @param primary.startupProbe.periodSeconds Period seconds for startupProbe ## @param primary.startupProbe.timeoutSeconds Timeout seconds for startupProbe ## @param primary.startupProbe.failureThreshold Failure threshold for startupProbe ## @param primary.startupProbe.successThreshold Success threshold for v ## startupProbe: enabled: true initialDelaySeconds: 120 periodSeconds: 10 timeoutSeconds: 1 failureThreshold: 60 successThreshold: 1 ## @param primary.customLivenessProbe Override default liveness probe for MySQL primary containers ## customLivenessProbe: {} ## @param primary.customReadinessProbe Override default readiness probe for MySQL primary containers ## customReadinessProbe: {} ## @param primary.customStartupProbe Override default startup probe for MySQL primary containers ## customStartupProbe: {} ## @param primary.extraFlags MySQL primary additional command line flags ## Can be used to specify command line flags, for example: ## E.g. ## extraFlags: "--max-connect-errors=1000 --max_connections=155" ## extraFlags: "" ## @param primary.extraEnvVars Extra environment variables to be set on MySQL primary containers ## E.g. ## extraEnvVars: ## - name: TZ ## value: "Europe/Paris" ## extraEnvVars: [] ## @param primary.extraEnvVarsCM Name of existing ConfigMap containing extra env vars for MySQL primary containers ## extraEnvVarsCM: "" ## @param primary.extraEnvVarsSecret Name of existing Secret containing extra env vars for MySQL primary containers ## extraEnvVarsSecret: "" ## Enable persistence using Persistent Volume Claims ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ ## persistence: ## @param primary.persistence.enabled Enable persistence on MySQL primary replicas using a `PersistentVolumeClaim`. If false, use emptyDir ## enabled: true ## choosing localPath for persistent data storage for mysql ## should be only worked in standalone mode(using nodeSelector deploy-mysql:"true") localPathEnabled: true localPathLocalPath: "/var/lib/docker/mysql-pv" ## @param primary.persistence.existingClaim Name of an existing `PersistentVolumeClaim` for MySQL primary replicas ## NOTE: When it's set the rest of persistence parameters are ignored ## existingClaim: "" ## @param primary.persistence.storageClass MySQL primary persistent volume storage Class ## If defined, storageClassName: ## If set to "-", storageClassName: "", which disables dynamic provisioning ## If undefined (the default) or set to null, no storageClassName spec is ## set, choosing the default provisioner. (gp2 on AWS, standard on ## GKE, AWS & OpenStack) ## storageClass: "" ## @param primary.persistence.annotations MySQL primary persistent volume claim annotations ## annotations: {} ## @param primary.persistence.accessModes MySQL primary persistent volume access Modes ## accessModes: - ReadWriteOnce ## @param primary.persistence.size MySQL primary persistent volume size ## size: 8Gi ## @param primary.persistence.selector Selector to match an existing Persistent Volume ## selector: ## matchLabels: ## app: my-app ## selector: {} ## @param primary.extraVolumes Optionally specify extra list of additional volumes to the MySQL Primary pod(s) ## 挂载自定义的初始化脚本 extraVolumes: {} # - name: custom-init-scripts # configMap: # name: cmii-mysql-init-account ## @param primary.extraVolumeMounts Optionally specify extra list of additional volumeMounts for the MySQL Primary container(s) ## extraVolumeMounts: {} # - name: custom-init-scripts # mountPath: /docker-entrypoint-initdb.d ## @param primary.initContainers Add additional init containers for the MySQL Primary pod(s) ## initContainers: [] ## @param primary.sidecars Add additional sidecar containers for the MySQL Primary pod(s) ## sidecars: [] ## MySQL Primary Service parameters ## service: ## @param primary.service.type MySQL Primary K8s service type ## type: ClusterIP ## @param primary.service.port MySQL Primary K8s service port ## port: 3306 ## @param primary.service.nodePort MySQL Primary K8s service node port ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport ## nodePort: "33306" ## @param primary.service.clusterIP MySQL Primary K8s service clusterIP IP ## e.g: ## clusterIP: None ## clusterIP: "" ## @param primary.service.loadBalancerIP MySQL Primary loadBalancerIP if service type is `LoadBalancer` ## Set the LoadBalancer service type to internal only ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer ## loadBalancerIP: "" ## @param primary.service.externalTrafficPolicy Enable client source IP preservation ## ref http://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip ## externalTrafficPolicy: Cluster ## @param primary.service.loadBalancerSourceRanges Addresses that are allowed when MySQL Primary service is LoadBalancer ## https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service ## E.g. ## loadBalancerSourceRanges: ## - 10.10.10.0/24 ## loadBalancerSourceRanges: [] ## @param primary.service.annotations Provide any additional annotations which may be required ## annotations: {} ## MySQL primary Pod Disruption Budget configuration ## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb/ ## pdb: ## @param primary.pdb.enabled Enable/disable a Pod Disruption Budget creation for MySQL primary pods ## enabled: false ## @param primary.pdb.minAvailable Minimum number/percentage of MySQL primary pods that should remain scheduled ## minAvailable: 1 ## @param primary.pdb.maxUnavailable Maximum number/percentage of MySQL primary pods that may be made unavailable ## maxUnavailable: "" ## @param primary.podLabels MySQL Primary pod label. If labels are same as commonLabels , this will take precedence ## podLabels: {} ## @section MySQL Secondary parameters secondary: ## @param secondary.replicaCount Number of MySQL secondary replicas ## replicaCount: 1 ## @param secondary.hostAliases Deployment pod host aliases ## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/ ## hostAliases: [] ## @param secondary.command Override default container command on MySQL Secondary container(s) (useful when using custom images) ## command: [] ## @param secondary.args Override default container args on MySQL Secondary container(s) (useful when using custom images) ## args: [] ## @param secondary.configuration [string] Configure MySQL Secondary with a custom my.cnf file ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file ## configuration: |- [mysqld] default_authentication_plugin=mysql_native_password skip-name-resolve explicit_defaults_for_timestamp basedir=/opt/bitnami/mysql port=3306 socket=/opt/bitnami/mysql/tmp/mysql.sock datadir=/bitnami/mysql/data tmpdir=/opt/bitnami/mysql/tmp max_allowed_packet=16M bind-address=0.0.0.0 pid-file=/opt/bitnami/mysql/tmp/mysqld.pid log-error=/opt/bitnami/mysql/logs/mysqld.log character-set-server=UTF8 collation-server=utf8_general_ci [client] port=3306 socket=/opt/bitnami/mysql/tmp/mysql.sock default-character-set=UTF8 [manager] port=3306 socket=/opt/bitnami/mysql/tmp/mysql.sock pid-file=/opt/bitnami/mysql/tmp/mysqld.pid ## @param secondary.existingConfiguration Name of existing ConfigMap with MySQL Secondary configuration. ## NOTE: When it's set the 'configuration' parameter is ignored ## existingConfiguration: "" ## @param secondary.updateStrategy Update strategy type for the MySQL secondary statefulset ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies ## updateStrategy: RollingUpdate ## @param secondary.rollingUpdatePartition Partition update strategy for MySQL Secondary statefulset ## https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#partitions ## rollingUpdatePartition: "" ## @param secondary.podAnnotations Additional pod annotations for MySQL secondary pods ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ ## podAnnotations: {} ## @param secondary.podAffinityPreset MySQL secondary pod affinity preset. Ignored if `secondary.affinity` is set. Allowed values: `soft` or `hard` ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity ## podAffinityPreset: "" ## @param secondary.podAntiAffinityPreset MySQL secondary pod anti-affinity preset. Ignored if `secondary.affinity` is set. Allowed values: `soft` or `hard` ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity ## Allowed values: soft, hard ## podAntiAffinityPreset: soft ## MySQL Secondary node affinity preset ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity ## nodeAffinityPreset: ## @param secondary.nodeAffinityPreset.type MySQL secondary node affinity preset type. Ignored if `secondary.affinity` is set. Allowed values: `soft` or `hard` ## type: "" ## @param secondary.nodeAffinityPreset.key MySQL secondary node label key to match Ignored if `secondary.affinity` is set. ## E.g. ## key: "kubernetes.io/e2e-az-name" ## key: "" ## @param secondary.nodeAffinityPreset.values MySQL secondary node label values to match. Ignored if `secondary.affinity` is set. ## E.g. ## values: ## - e2e-az1 ## - e2e-az2 ## values: [] ## @param secondary.affinity Affinity for MySQL secondary pods assignment ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity ## Note: podAffinityPreset, podAntiAffinityPreset, and nodeAffinityPreset will be ignored when it's set ## affinity: {} ## @param secondary.nodeSelector Node labels for MySQL secondary pods assignment ## ref: https://kubernetes.io/docs/user-guide/node-selection/ ## nodeSelector: {} ## @param secondary.tolerations Tolerations for MySQL secondary pods assignment ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ ## tolerations: [] ## MySQL secondary Pod security context ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod ## @param secondary.podSecurityContext.enabled Enable security context for MySQL secondary pods ## @param secondary.podSecurityContext.fsGroup Group ID for the mounted volumes' filesystem ## podSecurityContext: enabled: true fsGroup: 1001 ## MySQL secondary container security context ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container ## @param secondary.containerSecurityContext.enabled MySQL secondary container securityContext ## @param secondary.containerSecurityContext.runAsUser User ID for the MySQL secondary container ## containerSecurityContext: enabled: true runAsUser: 1001 ## MySQL secondary container's resource requests and limits ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ ## We usually recommend not to specify default resources and to leave this as a conscious ## choice for the user. This also increases chances charts run on environments with little ## resources, such as Minikube. If you do want to specify resources, uncomment the following ## lines, adjust them as necessary, and remove the curly braces after 'resources:'. ## @param secondary.resources.limits The resources limits for MySQL secondary containers ## @param secondary.resources.requests The requested resources for MySQL secondary containers ## resources: ## Example: ## limits: ## cpu: 250m ## memory: 256Mi limits: {} ## Examples: ## requests: ## cpu: 250m ## memory: 256Mi requests: {} ## Configure extra options for liveness probe ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes ## @param secondary.livenessProbe.enabled Enable livenessProbe ## @param secondary.livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe ## @param secondary.livenessProbe.periodSeconds Period seconds for livenessProbe ## @param secondary.livenessProbe.timeoutSeconds Timeout seconds for livenessProbe ## @param secondary.livenessProbe.failureThreshold Failure threshold for livenessProbe ## @param secondary.livenessProbe.successThreshold Success threshold for livenessProbe ## livenessProbe: enabled: true initialDelaySeconds: 120 periodSeconds: 10 timeoutSeconds: 1 failureThreshold: 3 successThreshold: 1 ## Configure extra options for readiness probe ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes ## @param secondary.readinessProbe.enabled Enable readinessProbe ## @param secondary.readinessProbe.initialDelaySeconds Initial delay seconds for readinessProbe ## @param secondary.readinessProbe.periodSeconds Period seconds for readinessProbe ## @param secondary.readinessProbe.timeoutSeconds Timeout seconds for readinessProbe ## @param secondary.readinessProbe.failureThreshold Failure threshold for readinessProbe ## @param secondary.readinessProbe.successThreshold Success threshold for readinessProbe ## readinessProbe: enabled: true initialDelaySeconds: 30 periodSeconds: 10 timeoutSeconds: 1 failureThreshold: 3 successThreshold: 1 ## Configure extra options for startupProbe probe ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes ## @param secondary.startupProbe.enabled Enable startupProbe ## @param secondary.startupProbe.initialDelaySeconds Initial delay seconds for startupProbe ## @param secondary.startupProbe.periodSeconds Period seconds for startupProbe ## @param secondary.startupProbe.timeoutSeconds Timeout seconds for startupProbe ## @param secondary.startupProbe.failureThreshold Failure threshold for startupProbe ## @param secondary.startupProbe.successThreshold Success threshold for startupProbe ## startupProbe: enabled: true initialDelaySeconds: 120 periodSeconds: 10 timeoutSeconds: 1 failureThreshold: 60 successThreshold: 1 ## @param secondary.customLivenessProbe Override default liveness probe for MySQL secondary containers ## customLivenessProbe: {} ## @param secondary.customReadinessProbe Override default readiness probe for MySQL secondary containers ## customReadinessProbe: {} ## @param secondary.customStartupProbe Override default startup probe for MySQL secondary containers ## customStartupProbe: {} ## @param secondary.extraFlags MySQL secondary additional command line flags ## Can be used to specify command line flags, for example: ## E.g. ## extraFlags: "--max-connect-errors=1000 --max_connections=155" ## extraFlags: "" ## @param secondary.extraEnvVars An array to add extra environment variables on MySQL secondary containers ## E.g. ## extraEnvVars: ## - name: TZ ## value: "Europe/Paris" ## extraEnvVars: [] ## @param secondary.extraEnvVarsCM Name of existing ConfigMap containing extra env vars for MySQL secondary containers ## extraEnvVarsCM: "" ## @param secondary.extraEnvVarsSecret Name of existing Secret containing extra env vars for MySQL secondary containers ## extraEnvVarsSecret: "" ## Enable persistence using Persistent Volume Claims ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ ## persistence: ## @param secondary.persistence.enabled Enable persistence on MySQL secondary replicas using a `PersistentVolumeClaim` ## enabled: true ## @param secondary.persistence.storageClass MySQL secondary persistent volume storage Class ## If defined, storageClassName: ## If set to "-", storageClassName: "", which disables dynamic provisioning ## If undefined (the default) or set to null, no storageClassName spec is ## set, choosing the default provisioner. (gp2 on AWS, standard on ## GKE, AWS & OpenStack) ## storageClass: "" ## @param secondary.persistence.annotations MySQL secondary persistent volume claim annotations ## annotations: {} ## @param secondary.persistence.accessModes MySQL secondary persistent volume access Modes ## accessModes: - ReadWriteOnce ## @param secondary.persistence.size MySQL secondary persistent volume size ## size: 8Gi ## @param secondary.persistence.selector Selector to match an existing Persistent Volume ## selector: ## matchLabels: ## app: my-app ## selector: {} ## @param secondary.extraVolumes Optionally specify extra list of additional volumes to the MySQL secondary pod(s) ## extraVolumes: [] ## @param secondary.extraVolumeMounts Optionally specify extra list of additional volumeMounts for the MySQL secondary container(s) ## extraVolumeMounts: [] ## @param secondary.initContainers Add additional init containers for the MySQL secondary pod(s) ## initContainers: [] ## @param secondary.sidecars Add additional sidecar containers for the MySQL secondary pod(s) ## sidecars: [] ## MySQL Secondary Service parameters ## service: ## @param secondary.service.type MySQL secondary Kubernetes service type ## type: ClusterIP ## @param secondary.service.port MySQL secondary Kubernetes service port ## port: 3306 ## @param secondary.service.nodePort MySQL secondary Kubernetes service node port ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport ## nodePort: "" ## @param secondary.service.clusterIP MySQL secondary Kubernetes service clusterIP IP ## e.g: ## clusterIP: None ## clusterIP: "" ## @param secondary.service.loadBalancerIP MySQL secondary loadBalancerIP if service type is `LoadBalancer` ## Set the LoadBalancer service type to internal only ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer ## loadBalancerIP: "" ## @param secondary.service.externalTrafficPolicy Enable client source IP preservation ## ref http://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip ## externalTrafficPolicy: Cluster ## @param secondary.service.loadBalancerSourceRanges Addresses that are allowed when MySQL secondary service is LoadBalancer ## https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service ## E.g. ## loadBalancerSourceRanges: ## - 10.10.10.0/24 ## loadBalancerSourceRanges: [] ## @param secondary.service.annotations Provide any additional annotations which may be required ## annotations: {} ## MySQL secondary Pod Disruption Budget configuration ## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb/ ## pdb: ## @param secondary.pdb.enabled Enable/disable a Pod Disruption Budget creation for MySQL secondary pods ## enabled: false ## @param secondary.pdb.minAvailable Minimum number/percentage of MySQL secondary pods that should remain scheduled ## minAvailable: 1 ## @param secondary.pdb.maxUnavailable Maximum number/percentage of MySQL secondary pods that may be made unavailable ## maxUnavailable: "" ## @param secondary.podLabels Additional pod labels for MySQL secondary pods ## podLabels: {} ## @section RBAC parameters ## MySQL pods ServiceAccount ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ ## serviceAccount: ## @param serviceAccount.create Enable the creation of a ServiceAccount for MySQL pods ## create: true ## @param serviceAccount.name Name of the created ServiceAccount ## If not set and create is true, a name is generated using the mysql.fullname template ## name: "" ## @param serviceAccount.annotations Annotations for MySQL Service Account ## annotations: {} ## Role Based Access ## ref: https://kubernetes.io/docs/admin/authorization/rbac/ ## rbac: ## @param rbac.create Whether to create & use RBAC resources or not ## create: false ## @section Common parameters ## @param nameOverride String to partially override common.names.fullname template (will maintain the release name) ## nameOverride: "" ## @param fullnameOverride String to fully override common.names.fullname template ## fullnameOverride: "helm-mysql" ## @param clusterDomain Cluster domain ## clusterDomain: cluster.local ## @param commonAnnotations Common annotations to add to all MySQL resources (sub-charts are not considered). Evaluated as a template ## commonAnnotations: {} ## @param commonLabels Common labels to add to all MySQL resources (sub-charts are not considered). Evaluated as a template ## commonLabels: {} ## @param extraDeploy Array with extra yaml to deploy with the chart. Evaluated as a template ## extraDeploy: [] ## @param schedulerName Use an alternate scheduler, e.g. "stork". ## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ ## schedulerName: "" ## Enable diagnostic mode in the deployment ## diagnosticMode: ## @param diagnosticMode.enabled Enable diagnostic mode (all probes will be disabled and the command will be overridden) ## enabled: false ## @param diagnosticMode.command Command to override all containers in the deployment ## command: - sleep ## @param diagnosticMode.args Args to override all containers in the deployment ## args: - infinity ## @section Network Policy ## MySQL Nework Policy configuration ## networkPolicy: ## @param networkPolicy.enabled Enable creation of NetworkPolicy resources ## enabled: false ## @param networkPolicy.allowExternal The Policy model to apply. ## When set to false, only pods with the correct ## client label will have network access to the port MySQL is listening ## on. When true, MySQL will accept connections from any source ## (with the correct destination port). ## allowExternal: true ## @param networkPolicy.explicitNamespacesSelector A Kubernetes LabelSelector to explicitly select namespaces from which ingress traffic could be allowed to MySQL ## If explicitNamespacesSelector is missing or set to {}, only client Pods that are in the networkPolicy's namespace ## and that match other criteria, the ones that have the good label, can reach the DB. ## But sometimes, we want the DB to be accessible to clients from other namespaces, in this case, we can use this ## LabelSelector to select these namespaces, note that the networkPolicy's namespace should also be explicitly added. ## ## Example: ## explicitNamespacesSelector: ## matchLabels: ## role: frontend ## matchExpressions: ## - {key: role, operator: In, values: [frontend]} ## explicitNamespacesSelector: {} # ------------------------------------------------------------------------------------------ # ------------------------------------------------------------------------------------------ # ------------------------------------------------------------------------------------------ ## @section Metrics parameters ## Mysqld Prometheus exporter parameters ## metrics: ## @param metrics.enabled Start a side-car prometheus exporter ## enabled: false ## @param metrics.image.registry Exporter image registry ## @param metrics.image.repository Exporter image repository ## @param metrics.image.tag Exporter image tag (immutable tags are recommended) ## @param metrics.image.pullPolicy Exporter image pull policy ## @param metrics.image.pullSecrets Specify docker-registry secret names as an array ## image: registry: docker.io repository: bitnami/mysqld-exporter tag: 0.13.0-debian-10-r43 pullPolicy: Always ## Optionally specify an array of imagePullSecrets. ## Secrets must be manually created in the namespace. ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ ## e.g: ## pullSecrets: ## - myRegistryKeySecretName ## pullSecrets: [] ## MySQL Prometheus exporter service parameters ## Mysqld Prometheus exporter liveness and readiness probes ## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes ## @param metrics.service.type Kubernetes service type for MySQL Prometheus Exporter ## @param metrics.service.port MySQL Prometheus Exporter service port ## @param metrics.service.annotations [object] Prometheus exporter service annotations ## service: type: ClusterIP port: 9104 annotations: prometheus.io/scrape: "true" prometheus.io/port: "{{ .Values.metrics.service.port }}" ## @param metrics.extraArgs.primary Extra args to be passed to mysqld_exporter on Primary pods ## @param metrics.extraArgs.secondary Extra args to be passed to mysqld_exporter on Secondary pods ## ref: https://github.com/prometheus/mysqld_exporter/ ## E.g. ## - --collect.auto_increment.columns ## - --collect.binlog_size ## - --collect.engine_innodb_status ## - --collect.engine_tokudb_status ## - --collect.global_status ## - --collect.global_variables ## - --collect.info_schema.clientstats ## - --collect.info_schema.innodb_metrics ## - --collect.info_schema.innodb_tablespaces ## - --collect.info_schema.innodb_cmp ## - --collect.info_schema.innodb_cmpmem ## - --collect.info_schema.processlist ## - --collect.info_schema.processlist.min_time ## - --collect.info_schema.query_response_time ## - --collect.info_schema.tables ## - --collect.info_schema.tables.databases ## - --collect.info_schema.tablestats ## - --collect.info_schema.userstats ## - --collect.perf_schema.eventsstatements ## - --collect.perf_schema.eventsstatements.digest_text_limit ## - --collect.perf_schema.eventsstatements.limit ## - --collect.perf_schema.eventsstatements.timelimit ## - --collect.perf_schema.eventswaits ## - --collect.perf_schema.file_events ## - --collect.perf_schema.file_instances ## - --collect.perf_schema.indexiowaits ## - --collect.perf_schema.tableiowaits ## - --collect.perf_schema.tablelocks ## - --collect.perf_schema.replication_group_member_stats ## - --collect.slave_status ## - --collect.slave_hosts ## - --collect.heartbeat ## - --collect.heartbeat.database ## - --collect.heartbeat.table ## extraArgs: primary: [] secondary: [] ## Mysqld Prometheus exporter resource requests and limits ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ ## We usually recommend not to specify default resources and to leave this as a conscious ## choice for the user. This also increases chances charts run on environments with little ## resources, such as Minikube. If you do want to specify resources, uncomment the following ## lines, adjust them as necessary, and remove the curly braces after 'resources:'. ## @param metrics.resources.limits The resources limits for MySQL prometheus exporter containers ## @param metrics.resources.requests The requested resources for MySQL prometheus exporter containers ## resources: ## Example: ## limits: ## cpu: 100m ## memory: 256Mi limits: {} ## Examples: ## requests: ## cpu: 100m ## memory: 256Mi requests: {} ## Mysqld Prometheus exporter liveness probe ## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes ## @param metrics.livenessProbe.enabled Enable livenessProbe ## @param metrics.livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe ## @param metrics.livenessProbe.periodSeconds Period seconds for livenessProbe ## @param metrics.livenessProbe.timeoutSeconds Timeout seconds for livenessProbe ## @param metrics.livenessProbe.failureThreshold Failure threshold for livenessProbe ## @param metrics.livenessProbe.successThreshold Success threshold for livenessProbe ## livenessProbe: enabled: true initialDelaySeconds: 120 periodSeconds: 10 timeoutSeconds: 1 successThreshold: 1 failureThreshold: 3 ## Mysqld Prometheus exporter readiness probe ## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes ## @param metrics.readinessProbe.enabled Enable readinessProbe ## @param metrics.readinessProbe.initialDelaySeconds Initial delay seconds for readinessProbe ## @param metrics.readinessProbe.periodSeconds Period seconds for readinessProbe ## @param metrics.readinessProbe.timeoutSeconds Timeout seconds for readinessProbe ## @param metrics.readinessProbe.failureThreshold Failure threshold for readinessProbe ## @param metrics.readinessProbe.successThreshold Success threshold for readinessProbe ## readinessProbe: enabled: true initialDelaySeconds: 30 periodSeconds: 10 timeoutSeconds: 1 successThreshold: 1 failureThreshold: 3 ## Prometheus Service Monitor ## ref: https://github.com/coreos/prometheus-operator ## serviceMonitor: ## @param metrics.serviceMonitor.enabled Create ServiceMonitor Resource for scraping metrics using PrometheusOperator ## enabled: false ## @param metrics.serviceMonitor.namespace Specify the namespace in which the serviceMonitor resource will be created ## namespace: "" ## @param metrics.serviceMonitor.interval Specify the interval at which metrics should be scraped ## interval: 30s ## @param metrics.serviceMonitor.scrapeTimeout Specify the timeout after which the scrape is ended ## e.g: ## scrapeTimeout: 30s ## scrapeTimeout: "" ## @param metrics.serviceMonitor.relabellings Specify Metric Relabellings to add to the scrape endpoint ## relabellings: [] ## @param metrics.serviceMonitor.honorLabels Specify honorLabels parameter to add the scrape endpoint ## honorLabels: false ## @param metrics.serviceMonitor.additionalLabels Used to pass Labels that are used by the Prometheus installed in your cluster to select Service Monitors to work with ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#prometheusspec ## additionalLabels: {}