1# This file has been modified by Chainguard, Inc.
3# Copyright Chainguard, Inc. All Rights Reserved.
4# Chainguard, Inc. modifications are subject to the license
5# available at: https://www.chainguard.dev/legal/software-license-agreement
7# Copyright Broadcom, Inc. All Rights Reserved.
8# SPDX-License-Identifier: APACHE-2.0
10## @section Global parameters
11## Global Docker image parameters
12## Please, note that this will override the image parameters, including dependencies, configured to use the global value
13## Current available global Docker image parameters: imageRegistry, imagePullSecrets and storageClass
16## @param global.imageRegistry Global Docker image registry
17## @param global.imagePullSecrets Global Docker registry secret names as an array
18## @param global.defaultStorageClass Global default StorageClass for Persistent Volume(s)
19## @param global.storageClass DEPRECATED: use global.defaultStorageClass instead
25 ## - myRegistryKeySecretName
28 defaultStorageClass: ""
30 ## Security parameters
33 ## @param global.security.allowInsecureImages Allows skipping image verification
34 allowInsecureImages: false
35 ## Compatibility adaptations for Kubernetes platforms
38 ## Compatibility adaptations for Openshift
41 ## @param global.compatibility.openshift.adaptSecurityContext Adapt the securityContext sections of the deployment to make them compatible with Openshift restricted-v2 SCC: remove runAsUser, runAsGroup and fsGroup and let the platform use their allowed default IDs. Possible values: auto (apply if the detected running cluster is Openshift), force (perform the adaptation always), disabled (do not perform adaptation)
43 adaptSecurityContext: auto
45## @section Common parameters
48## @param kubeVersion Force target Kubernetes version (using Helm capabilities if not set)
51## @param nameOverride String to partially override common.names.fullname template (will maintain the release name)
54## @param fullnameOverride String to fully override common.names.fullname template
57## @param namespaceOverride String to fully override common.names.namespace
60## @param clusterDomain Cluster domain
62clusterDomain: cluster.local
63## @param commonAnnotations Common annotations to add to all MySQL resources (sub-charts are not considered). Evaluated as a template
66## @param commonLabels Common labels to add to all MySQL resources (sub-charts are not considered). Evaluated as a template
69## @param extraDeploy Array with extra yaml to deploy with the chart. Evaluated as a template
72## @param serviceBindings.enabled Create secret for service binding (Experimental)
73## Ref: https://servicebinding.io/service-provider/
77## Enable diagnostic mode in the deployment
80 ## @param diagnosticMode.enabled Enable diagnostic mode (all probes will be disabled and the command will be overridden)
83 ## @param diagnosticMode.command Command to override all containers in the deployment
87 ## @param diagnosticMode.args Args to override all containers in the deployment
91## @section MySQL common parameters
94## Iamguarded MySQL image
95## @param image.registry [default: REGISTRY_NAME] MySQL image registry
96## @param image.repository [default: REPOSITORY_NAME/mysql] MySQL image repository
97## @skip image.tag MySQL image tag (immutable tags are recommended)
98## @param image.digest MySQL image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag
99## @param image.pullPolicy MySQL image pull policy
100## @param image.pullSecrets Specify docker-registry secret names as an array
101## @param image.debug Specify if debug logs should be enabled
105 repository: chainguard-private/mysql-iamguarded
108 ## Specify a imagePullPolicy
109 ## ref: https://kubernetes.io/docs/concepts/containers/images/#pre-pulled-images
111 pullPolicy: IfNotPresent
112 ## Optionally specify an array of imagePullSecrets (secrets must be manually created in the namespace)
113 ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
116 ## - myRegistryKeySecretName
119 ## Set to true if you would like to see extra information on logs
120 ## It turns BASH and/or NAMI debugging in the image
123## @param architecture MySQL architecture (`standalone` or `replication`)
125architecture: standalone
126## MySQL Authentication parameters
129 ## @param auth.rootPassword Password for the `root` user. Ignored if existing secret is provided
132 ## @param auth.createDatabase Whether to create the .Values.auth.database or not
135 ## @param auth.database Name for a custom database to create
137 database: "my_database"
138 ## @param auth.username Name for a custom user to create
141 ## @param auth.password Password for the new user. Ignored if existing secret is provided
144 ## @param auth.replicationUser MySQL replication user
146 replicationUser: replicator
147 ## @param auth.replicationPassword MySQL replication user password. Ignored if existing secret is provided
149 replicationPassword: ""
150 ## @param auth.existingSecret Use existing secret for password details. The secret has to contain the keys `mysql-root-password`, `mysql-replication-password` and `mysql-password`
151 ## NOTE: When it's set the auth.rootPassword, auth.password, auth.replicationPassword are ignored.
154 ## @param auth.usePasswordFiles Mount credentials as files instead of using an environment variable
156 usePasswordFiles: true
157 ## @param auth.customPasswordFiles Use custom password files when `auth.usePasswordFiles` is set to `true`. Define path for keys `root` and `user`, also define `replicator` if `architecture` is set to `replication`
159 ## customPasswordFiles:
160 ## root: /vault/secrets/mysql-root
161 ## user: /vault/secrets/mysql-user
162 ## replicator: /vault/secrets/mysql-replicator
164 customPasswordFiles: {}
165 ## @param auth.authenticationPolicy Sets the authentication policy, by default it will use `* ,,`
166 ## ref: https://dev.mysql.com/doc/refman/8.4/en/server-system-variables.html#sysvar_authentication_policy
168 authenticationPolicy: ""
169## @param initdbScripts Dictionary of initdb scripts
170## Specify dictionary of scripts to be run at first boot
173## my_init_script.sh: |
175## echo "Do something."
178## @param initdbScriptsConfigMap ConfigMap with the initdb scripts (Note: Overrides `initdbScripts`)
180initdbScriptsConfigMap: ""
181## @param startdbScripts Dictionary of startdb scripts
182## Specify dictionary of scripts to be run every time the container is started
185## my_start_script.sh: |
187## echo "Do something."
190## @param startdbScriptsConfigMap ConfigMap with the startdb scripts (Note: Overrides `startdbScripts`)
192startdbScriptsConfigMap: ""
193## @section TLS/SSL parameters
195## @param tls.enabled Enable TLS in MySQL
196## @param tls.existingSecret Existing secret that contains TLS certificates
197## @param tls.certFilename The secret key from the existingSecret if 'cert' key different from the default (tls.crt)
198## @param tls.certKeyFilename The secret key from the existingSecret if 'key' key different from the default (tls.key)
199## @param tls.certCAFilename The secret key from the existingSecret if 'ca' key different from the default (tls.crt)
200## @param tls.ca CA certificate for TLS. Ignored if `tls.existingSecret` is set
201## @param tls.cert TLS certificate for MySQL. Ignored if `tls.existingSecret` is set
202## @param tls.key TLS key for MySQL. Ignored if `tls.existingSecret` is set
207 certFilename: tls.crt
208 certKeyFilename: tls.key
213 ## @param tls.autoGenerated.enabled Enable automatic generation of certificates for TLS
214 ## @param tls.autoGenerated.engine Mechanism to generate the certificates (allowed values: helm, cert-manager)
218 ## @param tls.autoGenerated.certManager.existingIssuer The name of an existing Issuer to use for generating the certificates (only for `cert-manager` engine)
219 ## @param tls.autoGenerated.certManager.existingIssuerKind Existing Issuer kind, defaults to Issuer (only for `cert-manager` engine)
220 ## @param tls.autoGenerated.certManager.keyAlgorithm Key algorithm for the certificates (only for `cert-manager` engine)
221 ## @param tls.autoGenerated.certManager.keySize Key size for the certificates (only for `cert-manager` engine)
222 ## @param tls.autoGenerated.certManager.duration Duration for the certificates (only for `cert-manager` engine)
223 ## @param tls.autoGenerated.certManager.renewBefore Renewal period for the certificates (only for `cert-manager` engine)
226 existingIssuerKind: ""
231## @section MySQL Primary parameters
234 ## @param primary.name Name of the primary database (eg primary, master, leader, ...)
237 ## @param primary.command Override default container command on MySQL Primary container(s) (useful when using custom images)
240 ## @param primary.args Override default container args on MySQL Primary container(s) (useful when using custom images)
243 ## @param primary.lifecycleHooks for the MySQL Primary container(s) to automate configuration before or after startup
246 ## @param primary.automountServiceAccountToken Mount Service Account token in pod
248 automountServiceAccountToken: false
249 ## @param primary.hostAliases Deployment pod host aliases
250 ## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/
253 ## @param primary.enableMySQLX Enable mysqlx port
254 ## ref: https://dev.mysql.com/doc/dev/mysql-server/latest/mysqlx_protocol_xplugin.html
257 ## @param primary.configuration [string] Configure MySQL Primary with a custom my.cnf file
258 ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file
262 authentication_policy='{{- .Values.auth.authenticationPolicy | default "* ,," }}'
264 explicit_defaults_for_timestamp
265 basedir=/opt/iamguarded/mysql
266 plugin_dir=/opt/iamguarded/mysql/lib/plugin
267 port={{ .Values.primary.containerPorts.mysql }}
268 mysqlx={{ ternary 1 0 .Values.primary.enableMySQLX }}
269 mysqlx_port={{ .Values.primary.containerPorts.mysqlx }}
270 socket=/opt/iamguarded/mysql/tmp/mysql.sock
271 datadir=/iamguarded/mysql/data
272 tmpdir=/opt/iamguarded/mysql/tmp
273 max_allowed_packet=16M
275 pid-file=/opt/iamguarded/mysql/tmp/mysqld.pid
276 log-error=/opt/iamguarded/mysql/logs/mysqld.log
277 character-set-server=UTF8
280 {{- if .Values.tls.enabled }}
281 ssl_cert=/opt/iamguarded/mysql/certs/{{ .Values.tls.certFilename }}
282 ssl_key=/opt/iamguarded/mysql/certs/{{ .Values.tls.certKeyFilename }}
283 {{- if (include "mysql.tlsCACert" .) }}
284 ssl_ca={{ include "mysql.tlsCACert" . }}
289 port={{ .Values.primary.containerPorts.mysql }}
290 socket=/opt/iamguarded/mysql/tmp/mysql.sock
291 default-character-set=UTF8
292 plugin_dir=/opt/iamguarded/mysql/lib/plugin
295 port={{ .Values.primary.containerPorts.mysql }}
296 socket=/opt/iamguarded/mysql/tmp/mysql.sock
297 pid-file=/opt/iamguarded/mysql/tmp/mysqld.pid
298 ## @param primary.existingConfigmap Name of existing ConfigMap with MySQL Primary configuration.
299 ## NOTE: When it's set the 'configuration' parameter is ignored
301 existingConfigmap: ""
302 ## @param primary.containerPorts.mysql Container port for mysql
303 ## @param primary.containerPorts.mysqlx Container port for mysqlx
308 ## @param primary.updateStrategy.type Update strategy type for the MySQL primary statefulset
309 ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies
313 ## @param primary.podAnnotations Additional pod annotations for MySQL primary pods
314 ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
317 ## @param primary.podAffinityPreset MySQL primary pod affinity preset. Ignored if `primary.affinity` is set. Allowed values: `soft` or `hard`
318 ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
320 podAffinityPreset: ""
321 ## @param primary.podAntiAffinityPreset MySQL primary pod anti-affinity preset. Ignored if `primary.affinity` is set. Allowed values: `soft` or `hard`
322 ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
324 podAntiAffinityPreset: soft
325 ## MySQL Primary node affinity preset
326 ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity
329 ## @param primary.nodeAffinityPreset.type MySQL primary node affinity preset type. Ignored if `primary.affinity` is set. Allowed values: `soft` or `hard`
332 ## @param primary.nodeAffinityPreset.key MySQL primary node label key to match Ignored if `primary.affinity` is set.
334 ## key: "kubernetes.io/e2e-az-name"
337 ## @param primary.nodeAffinityPreset.values MySQL primary node label values to match. Ignored if `primary.affinity` is set.
344 ## @param primary.affinity Affinity for MySQL primary pods assignment
345 ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
346 ## Note: podAffinityPreset, podAntiAffinityPreset, and nodeAffinityPreset will be ignored when it's set
349 ## @param primary.nodeSelector Node labels for MySQL primary pods assignment
350 ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/
353 ## @param primary.tolerations Tolerations for MySQL primary pods assignment
354 ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
357 ## @param primary.priorityClassName MySQL primary pods' priorityClassName
359 priorityClassName: ""
360 ## @param primary.runtimeClassName MySQL primary pods' runtimeClassName
363 ## @param primary.schedulerName Name of the k8s scheduler (other than default)
364 ## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/
367 ## @param primary.terminationGracePeriodSeconds In seconds, time the given to the MySQL primary pod needs to terminate gracefully
368 ## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods
370 terminationGracePeriodSeconds: ""
371 ## @param primary.topologySpreadConstraints Topology Spread Constraints for pod assignment
372 ## https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/
373 ## The value is evaluated as a template
375 topologySpreadConstraints: []
376 ## @param primary.podManagementPolicy podManagementPolicy to manage scaling operation of MySQL primary pods
377 ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#pod-management-policies
379 podManagementPolicy: ""
380 ## MySQL primary Pod security context
381 ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod
382 ## @param primary.podSecurityContext.enabled Enable security context for MySQL primary pods
383 ## @param primary.podSecurityContext.fsGroupChangePolicy Set filesystem group change policy
384 ## @param primary.podSecurityContext.sysctls Set kernel settings using the sysctl interface
385 ## @param primary.podSecurityContext.supplementalGroups Set filesystem extra groups
386 ## @param primary.podSecurityContext.fsGroup Group ID for the mounted volumes' filesystem
390 fsGroupChangePolicy: Always
392 supplementalGroups: []
394 ## MySQL primary container security context
395 ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container
396 ## @param primary.containerSecurityContext.enabled MySQL primary container securityContext
397 ## @param primary.containerSecurityContext.seLinuxOptions [object,nullable] Set SELinux options in container
398 ## @param primary.containerSecurityContext.runAsUser User ID for the MySQL primary container
399 ## @param primary.containerSecurityContext.runAsGroup Group ID for the MySQL primary container
400 ## @param primary.containerSecurityContext.runAsNonRoot Set MySQL primary container's Security Context runAsNonRoot
401 ## @param primary.containerSecurityContext.allowPrivilegeEscalation Set container's privilege escalation
402 ## @param primary.containerSecurityContext.capabilities.drop Set container's Security Context runAsNonRoot
403 ## @param primary.containerSecurityContext.seccompProfile.type Set Client container's Security Context seccomp profile
404 ## @param primary.containerSecurityContext.readOnlyRootFilesystem Set container's Security Context read-only root filesystem
406 containerSecurityContext:
412 allowPrivilegeEscalation: false
416 type: "RuntimeDefault"
417 readOnlyRootFilesystem: true
418 ## MySQL primary container's resource requests and limits
419 ## ref: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
420 ## We usually recommend not to specify default resources and to leave this as a conscious
421 ## choice for the user. This also increases chances charts run on environments with little
422 ## resources, such as Minikube. If you do want to specify resources, uncomment the following
423 ## lines, adjust them as necessary, and remove the curly braces after 'resources:'.
424 ## @param primary.resourcesPreset Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if primary.resources is set (primary.resources is recommended for production).
425 ## NOTE: The "nano" and "micro" presets allocate extremely low CPU/memory. These values may cause MySQL to fail during startup (e.g., OOMKilled, readiness/liveness probe failures)
427 resourcesPreset: "small"
428 ## @param primary.resources Set container requests and limits for different resources like CPU or memory (essential for production workloads)
439 ## Configure extra options for liveness probe
440 ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes
441 ## @param primary.livenessProbe.enabled Enable livenessProbe
442 ## @param primary.livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe
443 ## @param primary.livenessProbe.periodSeconds Period seconds for livenessProbe
444 ## @param primary.livenessProbe.timeoutSeconds Timeout seconds for livenessProbe
445 ## @param primary.livenessProbe.failureThreshold Failure threshold for livenessProbe
446 ## @param primary.livenessProbe.successThreshold Success threshold for livenessProbe
450 initialDelaySeconds: 5
455 ## Configure extra options for readiness probe
456 ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes
457 ## @param primary.readinessProbe.enabled Enable readinessProbe
458 ## @param primary.readinessProbe.initialDelaySeconds Initial delay seconds for readinessProbe
459 ## @param primary.readinessProbe.periodSeconds Period seconds for readinessProbe
460 ## @param primary.readinessProbe.timeoutSeconds Timeout seconds for readinessProbe
461 ## @param primary.readinessProbe.failureThreshold Failure threshold for readinessProbe
462 ## @param primary.readinessProbe.successThreshold Success threshold for readinessProbe
466 initialDelaySeconds: 5
471 ## Configure extra options for startupProbe probe
472 ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes
473 ## @param primary.startupProbe.enabled Enable startupProbe
474 ## @param primary.startupProbe.initialDelaySeconds Initial delay seconds for startupProbe
475 ## @param primary.startupProbe.periodSeconds Period seconds for startupProbe
476 ## @param primary.startupProbe.timeoutSeconds Timeout seconds for startupProbe
477 ## @param primary.startupProbe.failureThreshold Failure threshold for startupProbe
478 ## @param primary.startupProbe.successThreshold Success threshold for startupProbe
482 initialDelaySeconds: 15
487 ## @param primary.customLivenessProbe Override default liveness probe for MySQL primary containers
489 customLivenessProbe: {}
490 ## @param primary.customReadinessProbe Override default readiness probe for MySQL primary containers
492 customReadinessProbe: {}
493 ## @param primary.customStartupProbe Override default startup probe for MySQL primary containers
495 customStartupProbe: {}
496 ## @param primary.extraFlags MySQL primary additional command line flags
497 ## Can be used to specify command line flags, for example:
499 ## extraFlags: "--max-connect-errors=1000 --max_connections=155"
502 ## @param primary.extraEnvVars Extra environment variables to be set on MySQL primary containers
506 ## value: "Europe/Paris"
509 ## @param primary.extraEnvVarsCM Name of existing ConfigMap containing extra env vars for MySQL primary containers
512 ## @param primary.extraEnvVarsSecret Name of existing Secret containing extra env vars for MySQL primary containers
514 extraEnvVarsSecret: ""
515 ## @param primary.extraPodSpec Optionally specify extra PodSpec for the MySQL Primary pod(s)
518 ## @param primary.extraPorts Extra ports to expose
521 ## Enable persistence using Persistent Volume Claims
522 ## ref: https://kubernetes.io/docs/concepts/storage/persistent-volumes/
525 ## @param primary.persistence.enabled Enable persistence on MySQL primary replicas using a `PersistentVolumeClaim`. If false, use emptyDir
528 ## @param primary.persistence.existingClaim Name of an existing `PersistentVolumeClaim` for MySQL primary replicas
529 ## NOTE: When it's set the rest of persistence parameters are ignored
532 ## @param primary.persistence.subPath The name of a volume's sub path to mount for persistence
535 ## @param primary.persistence.storageClass MySQL primary persistent volume storage Class
536 ## If defined, storageClassName: <storageClass>
537 ## If set to "-", storageClassName: "", which disables dynamic provisioning
538 ## If undefined (the default) or set to null, no storageClassName spec is
539 ## set, choosing the default provisioner. (gp2 on AWS, standard on
540 ## GKE, AWS & OpenStack)
543 ## @param primary.persistence.annotations MySQL primary persistent volume claim annotations
546 ## @param primary.persistence.accessModes MySQL primary persistent volume access Modes
550 ## @param primary.persistence.size MySQL primary persistent volume size
553 ## @param primary.persistence.selector Selector to match an existing Persistent Volume
559 ## Primary Persistent Volume Claim Retention Policy
560 ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#persistentvolumeclaim-retention
562 persistentVolumeClaimRetentionPolicy:
563 ## @param primary.persistentVolumeClaimRetentionPolicy.enabled Enable Persistent volume retention policy for Primary StatefulSet
566 ## @param primary.persistentVolumeClaimRetentionPolicy.whenScaled Volume retention behavior when the replica count of the StatefulSet is reduced
569 ## @param primary.persistentVolumeClaimRetentionPolicy.whenDeleted Volume retention behavior that applies when the StatefulSet is deleted
572 ## @param primary.extraVolumes Optionally specify extra list of additional volumes to the MySQL Primary pod(s)
575 ## @param primary.extraVolumeMounts Optionally specify extra list of additional volumeMounts for the MySQL Primary container(s)
577 extraVolumeMounts: []
578 ## @param primary.initContainers Add additional init containers for the MySQL Primary pod(s)
581 ## @param primary.enableDefaultInitContainers enables (or disables if false) the default init containers (logs-symlinks, volume permissions)
583 enableDefaultInitContainers: true
584 ## @param primary.sidecars Add additional sidecar containers for the MySQL Primary pod(s)
587 ## MySQL Primary Service parameters
590 ## @param primary.service.type MySQL Primary K8s service type
593 ## @param primary.service.ports.mysql MySQL Primary K8s service port
594 ## @param primary.service.ports.mysqlx MySQL Primary K8s service mysqlx port
599 ## @param primary.service.nodePorts.mysql MySQL Primary K8s service node port
600 ## @param primary.service.nodePorts.mysqlx MySQL Primary K8s service node port mysqlx
601 ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
606 ## @param primary.service.clusterIP MySQL Primary K8s service clusterIP IP
611 ## @param primary.service.loadBalancerIP MySQL Primary loadBalancerIP if service type is `LoadBalancer`
612 ## Set the LoadBalancer service type to internal only
613 ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
616 ## @param primary.service.externalTrafficPolicy Enable client source IP preservation
617 ## ref https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip
620 ## @param primary.service.externalIPs MySQL Primary K8s service externalIPs
621 ## ref https://kubernetes.io/docs/concepts/services-networking/service/#external-ips
623 externalTrafficPolicy: Cluster
624 ## @param primary.service.loadBalancerSourceRanges Addresses that are allowed when MySQL Primary service is LoadBalancer
625 ## https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service
627 ## loadBalancerSourceRanges:
630 loadBalancerSourceRanges: []
631 ## @param primary.service.extraPorts Extra ports to expose (normally used with the `sidecar` value)
634 ## @param primary.service.annotations Additional custom annotations for MySQL primary service
637 ## @param primary.service.sessionAffinity Session Affinity for Kubernetes service, can be "None" or "ClientIP"
638 ## If "ClientIP", consecutive client requests will be directed to the same Pod
639 ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
641 sessionAffinity: None
642 ## @param primary.service.sessionAffinityConfig Additional settings for the sessionAffinity
643 ## sessionAffinityConfig:
645 ## timeoutSeconds: 300
647 sessionAffinityConfig: {}
648 ## Headless service properties
651 ## @param primary.service.headless.annotations Additional custom annotations for headless MySQL primary service.
654 ## MySQL primary Pod Disruption Budget configuration
655 ## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb/
658 ## @param primary.pdb.create Enable/disable a Pod Disruption Budget creation for MySQL primary pods
661 ## @param primary.pdb.minAvailable Minimum number/percentage of MySQL primary pods that should remain scheduled
664 ## @param primary.pdb.maxUnavailable Maximum number/percentage of MySQL primary pods that may be made unavailable. Defaults to `1` if both `primary.pdb.minAvailable` and `primary.pdb.maxUnavailable` are empty.
667 ## @param primary.podLabels MySQL Primary pod label. If labels are same as commonLabels , this will take precedence
670## @section MySQL Secondary parameters
673 ## @param secondary.name Name of the secondary database (eg secondary, slave, ...)
676 ## @param secondary.replicaCount Number of MySQL secondary replicas
679 ## @param secondary.automountServiceAccountToken Mount Service Account token in pod
681 automountServiceAccountToken: false
682 ## @param secondary.hostAliases Deployment pod host aliases
683 ## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/
686 ## @param secondary.command Override default container command on MySQL Secondary container(s) (useful when using custom images)
689 ## @param secondary.args Override default container args on MySQL Secondary container(s) (useful when using custom images)
692 ## @param secondary.lifecycleHooks for the MySQL Secondary container(s) to automate configuration before or after startup
695 ## @param secondary.enableMySQLX Enable mysqlx port
696 ## ref: https://dev.mysql.com/doc/dev/mysql-server/latest/mysqlx_protocol_xplugin.html
699 ## @param secondary.configuration [string] Configure MySQL Secondary with a custom my.cnf file
700 ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file
704 authentication_policy='{{- .Values.auth.authenticationPolicy | default "* ,," }}'
706 explicit_defaults_for_timestamp
707 basedir=/opt/iamguarded/mysql
708 plugin_dir=/opt/iamguarded/mysql/lib/plugin
709 port={{ .Values.secondary.containerPorts.mysql }}
710 mysqlx={{ ternary 1 0 .Values.secondary.enableMySQLX }}
711 mysqlx_port={{ .Values.secondary.containerPorts.mysqlx }}
712 socket=/opt/iamguarded/mysql/tmp/mysql.sock
713 datadir=/iamguarded/mysql/data
714 tmpdir=/opt/iamguarded/mysql/tmp
715 max_allowed_packet=16M
717 pid-file=/opt/iamguarded/mysql/tmp/mysqld.pid
718 log-error=/opt/iamguarded/mysql/logs/mysqld.log
719 character-set-server=UTF8
722 {{- if .Values.tls.enabled }}
723 ssl_cert=/opt/iamguarded/mysql/certs/{{ .Values.tls.certFilename }}
724 ssl_key=/opt/iamguarded/mysql/certs/{{ .Values.tls.certKeyFilename }}
725 {{- if (include "mysql.tlsCACert" .) }}
726 ssl_ca={{ include "mysql.tlsCACert" . }}
731 port={{ .Values.secondary.containerPorts.mysql }}
732 socket=/opt/iamguarded/mysql/tmp/mysql.sock
733 default-character-set=UTF8
734 plugin_dir=/opt/iamguarded/mysql/lib/plugin
737 port={{ .Values.secondary.containerPorts.mysql }}
738 socket=/opt/iamguarded/mysql/tmp/mysql.sock
739 pid-file=/opt/iamguarded/mysql/tmp/mysqld.pid
740 ## @param secondary.existingConfigmap Name of existing ConfigMap with MySQL Secondary configuration.
741 ## NOTE: When it's set the 'configuration' parameter is ignored
743 existingConfigmap: ""
744 ## @param secondary.containerPorts.mysql Container port for mysql
745 ## @param secondary.containerPorts.mysqlx Container port for mysqlx
750 ## @param secondary.updateStrategy.type Update strategy type for the MySQL secondary statefulset
751 ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies
755 ## @param secondary.podAnnotations Additional pod annotations for MySQL secondary pods
756 ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
759 ## @param secondary.podAffinityPreset MySQL secondary pod affinity preset. Ignored if `secondary.affinity` is set. Allowed values: `soft` or `hard`
760 ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
762 podAffinityPreset: ""
763 ## @param secondary.podAntiAffinityPreset MySQL secondary pod anti-affinity preset. Ignored if `secondary.affinity` is set. Allowed values: `soft` or `hard`
764 ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
765 ## Allowed values: soft, hard
767 podAntiAffinityPreset: soft
768 ## MySQL Secondary node affinity preset
769 ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity
772 ## @param secondary.nodeAffinityPreset.type MySQL secondary node affinity preset type. Ignored if `secondary.affinity` is set. Allowed values: `soft` or `hard`
775 ## @param secondary.nodeAffinityPreset.key MySQL secondary node label key to match Ignored if `secondary.affinity` is set.
777 ## key: "kubernetes.io/e2e-az-name"
780 ## @param secondary.nodeAffinityPreset.values MySQL secondary node label values to match. Ignored if `secondary.affinity` is set.
787 ## @param secondary.affinity Affinity for MySQL secondary pods assignment
788 ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
789 ## Note: podAffinityPreset, podAntiAffinityPreset, and nodeAffinityPreset will be ignored when it's set
792 ## @param secondary.nodeSelector Node labels for MySQL secondary pods assignment
793 ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/
796 ## @param secondary.tolerations Tolerations for MySQL secondary pods assignment
797 ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
800 ## @param secondary.priorityClassName MySQL secondary pods' priorityClassName
802 priorityClassName: ""
803 ## @param secondary.runtimeClassName MySQL secondary pods' runtimeClassName
806 ## @param secondary.schedulerName Name of the k8s scheduler (other than default)
807 ## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/
810 ## @param secondary.terminationGracePeriodSeconds In seconds, time the given to the MySQL secondary pod needs to terminate gracefully
811 ## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods
813 terminationGracePeriodSeconds: ""
814 ## @param secondary.topologySpreadConstraints Topology Spread Constraints for pod assignment
815 ## https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/
816 ## The value is evaluated as a template
818 topologySpreadConstraints: []
819 ## @param secondary.podManagementPolicy podManagementPolicy to manage scaling operation of MySQL secondary pods
820 ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#pod-management-policies
822 podManagementPolicy: ""
823 ## MySQL secondary Pod security context
824 ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod
825 ## @param secondary.podSecurityContext.enabled Enable security context for MySQL secondary pods
826 ## @param secondary.podSecurityContext.fsGroupChangePolicy Set filesystem group change policy
827 ## @param secondary.podSecurityContext.sysctls Set kernel settings using the sysctl interface
828 ## @param secondary.podSecurityContext.supplementalGroups Set filesystem extra groups
829 ## @param secondary.podSecurityContext.fsGroup Group ID for the mounted volumes' filesystem
833 fsGroupChangePolicy: Always
835 supplementalGroups: []
837 ## MySQL secondary container security context
838 ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container
839 ## @param secondary.containerSecurityContext.enabled MySQL secondary container securityContext
840 ## @param secondary.containerSecurityContext.seLinuxOptions [object,nullable] Set SELinux options in container
841 ## @param secondary.containerSecurityContext.runAsUser User ID for the MySQL secondary container
842 ## @param secondary.containerSecurityContext.runAsGroup Group ID for the MySQL secondary container
843 ## @param secondary.containerSecurityContext.runAsNonRoot Set MySQL secondary container's Security Context runAsNonRoot
844 ## @param secondary.containerSecurityContext.allowPrivilegeEscalation Set container's privilege escalation
845 ## @param secondary.containerSecurityContext.capabilities.drop Set container's Security Context runAsNonRoot
846 ## @param secondary.containerSecurityContext.seccompProfile.type Set container's Security Context seccomp profile
847 ## @param secondary.containerSecurityContext.readOnlyRootFilesystem Set container's Security Context read-only root filesystem
849 containerSecurityContext:
855 allowPrivilegeEscalation: false
859 type: "RuntimeDefault"
860 readOnlyRootFilesystem: true
861 ## MySQL secondary container's resource requests and limits
862 ## ref: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
863 ## We usually recommend not to specify default resources and to leave this as a conscious
864 ## choice for the user. This also increases chances charts run on environments with little
865 ## resources, such as Minikube. If you do want to specify resources, uncomment the following
866 ## lines, adjust them as necessary, and remove the curly braces after 'resources:'.
867 ## @param secondary.resourcesPreset Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if secondary.resources is set (secondary.resources is recommended for production).
869 resourcesPreset: "small"
870 ## @param secondary.resources Set container requests and limits for different resources like CPU or memory (essential for production workloads)
881 ## Configure extra options for liveness probe
882 ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes
883 ## @param secondary.livenessProbe.enabled Enable livenessProbe
884 ## @param secondary.livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe
885 ## @param secondary.livenessProbe.periodSeconds Period seconds for livenessProbe
886 ## @param secondary.livenessProbe.timeoutSeconds Timeout seconds for livenessProbe
887 ## @param secondary.livenessProbe.failureThreshold Failure threshold for livenessProbe
888 ## @param secondary.livenessProbe.successThreshold Success threshold for livenessProbe
892 initialDelaySeconds: 5
897 ## Configure extra options for readiness probe
898 ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes
899 ## @param secondary.readinessProbe.enabled Enable readinessProbe
900 ## @param secondary.readinessProbe.initialDelaySeconds Initial delay seconds for readinessProbe
901 ## @param secondary.readinessProbe.periodSeconds Period seconds for readinessProbe
902 ## @param secondary.readinessProbe.timeoutSeconds Timeout seconds for readinessProbe
903 ## @param secondary.readinessProbe.failureThreshold Failure threshold for readinessProbe
904 ## @param secondary.readinessProbe.successThreshold Success threshold for readinessProbe
908 initialDelaySeconds: 5
913 ## Configure extra options for startupProbe probe
914 ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes
915 ## @param secondary.startupProbe.enabled Enable startupProbe
916 ## @param secondary.startupProbe.initialDelaySeconds Initial delay seconds for startupProbe
917 ## @param secondary.startupProbe.periodSeconds Period seconds for startupProbe
918 ## @param secondary.startupProbe.timeoutSeconds Timeout seconds for startupProbe
919 ## @param secondary.startupProbe.failureThreshold Failure threshold for startupProbe
920 ## @param secondary.startupProbe.successThreshold Success threshold for startupProbe
924 initialDelaySeconds: 15
929 ## @param secondary.customLivenessProbe Override default liveness probe for MySQL secondary containers
931 customLivenessProbe: {}
932 ## @param secondary.customReadinessProbe Override default readiness probe for MySQL secondary containers
934 customReadinessProbe: {}
935 ## @param secondary.customStartupProbe Override default startup probe for MySQL secondary containers
937 customStartupProbe: {}
938 ## @param secondary.extraFlags MySQL secondary additional command line flags
939 ## Can be used to specify command line flags, for example:
941 ## extraFlags: "--max-connect-errors=1000 --max_connections=155"
944 ## @param secondary.extraEnvVars An array to add extra environment variables on MySQL secondary containers
948 ## value: "Europe/Paris"
951 ## @param secondary.extraEnvVarsCM Name of existing ConfigMap containing extra env vars for MySQL secondary containers
954 ## @param secondary.extraEnvVarsSecret Name of existing Secret containing extra env vars for MySQL secondary containers
956 extraEnvVarsSecret: ""
957 ## @param secondary.extraPodSpec Optionally specify extra PodSpec for the MySQL Secondary pod(s)
960 ## @param secondary.extraPorts Extra ports to expose
963 ## Enable persistence using Persistent Volume Claims
964 ## ref: https://kubernetes.io/docs/concepts/storage/persistent-volumes/
967 ## @param secondary.persistence.enabled Enable persistence on MySQL secondary replicas using a `PersistentVolumeClaim`
970 ## @param secondary.persistence.existingClaim Name of an existing `PersistentVolumeClaim` for MySQL secondary replicas
971 ## NOTE: When it's set the rest of persistence parameters are ignored
974 ## @param secondary.persistence.subPath The name of a volume's sub path to mount for persistence
977 ## @param secondary.persistence.storageClass MySQL secondary persistent volume storage Class
978 ## If defined, storageClassName: <storageClass>
979 ## If set to "-", storageClassName: "", which disables dynamic provisioning
980 ## If undefined (the default) or set to null, no storageClassName spec is
981 ## set, choosing the default provisioner. (gp2 on AWS, standard on
982 ## GKE, AWS & OpenStack)
985 ## @param secondary.persistence.annotations MySQL secondary persistent volume claim annotations
988 ## @param secondary.persistence.accessModes MySQL secondary persistent volume access Modes
992 ## @param secondary.persistence.size MySQL secondary persistent volume size
995 ## @param secondary.persistence.selector Selector to match an existing Persistent Volume
1001 ## Secondary Persistent Volume Claim Retention Policy
1002 ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#persistentvolumeclaim-retention
1004 persistentVolumeClaimRetentionPolicy:
1005 ## @param secondary.persistentVolumeClaimRetentionPolicy.enabled Enable Persistent volume retention policy for read only StatefulSet
1008 ## @param secondary.persistentVolumeClaimRetentionPolicy.whenScaled Volume retention behavior when the replica count of the StatefulSet is reduced
1011 ## @param secondary.persistentVolumeClaimRetentionPolicy.whenDeleted Volume retention behavior that applies when the StatefulSet is deleted
1014 ## @param secondary.extraVolumes Optionally specify extra list of additional volumes to the MySQL secondary pod(s)
1017 ## @param secondary.extraVolumeMounts Optionally specify extra list of additional volumeMounts for the MySQL secondary container(s)
1019 extraVolumeMounts: []
1020 ## @param secondary.initContainers Add additional init containers for the MySQL secondary pod(s)
1023 ## @param secondary.enableDefaultInitContainers enables (or disables if false) the default init containers (logs-symlinks, volume permissions)
1025 enableDefaultInitContainers: true
1026 ## @param secondary.sidecars Add additional sidecar containers for the MySQL secondary pod(s)
1029 ## MySQL Secondary Service parameters
1032 ## @param secondary.service.type MySQL secondary Kubernetes service type
1035 ## @param secondary.service.ports.mysql MySQL secondary Kubernetes service port
1036 ## @param secondary.service.ports.mysqlx MySQL secondary Kubernetes service port mysqlx
1041 ## @param secondary.service.nodePorts.mysql MySQL secondary Kubernetes service node port
1042 ## @param secondary.service.nodePorts.mysqlx MySQL secondary Kubernetes service node port mysqlx
1043 ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
1048 ## @param secondary.service.clusterIP MySQL secondary Kubernetes service clusterIP IP
1053 ## @param secondary.service.loadBalancerIP MySQL secondary loadBalancerIP if service type is `LoadBalancer`
1054 ## Set the LoadBalancer service type to internal only
1055 ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
1058 ## @param secondary.service.externalTrafficPolicy Enable client source IP preservation
1059 ## ref https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip
1062 ## @param secondary.service.externalIPs MySQL Secondary K8s service externalIPs
1063 ## ref https://kubernetes.io/docs/concepts/services-networking/service/#external-ips
1065 externalTrafficPolicy: Cluster
1066 ## @param secondary.service.loadBalancerSourceRanges Addresses that are allowed when MySQL secondary service is LoadBalancer
1067 ## https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service
1069 ## loadBalancerSourceRanges:
1072 loadBalancerSourceRanges: []
1073 ## @param secondary.service.extraPorts Extra ports to expose (normally used with the `sidecar` value)
1076 ## @param secondary.service.annotations Additional custom annotations for MySQL secondary service
1079 ## @param secondary.service.sessionAffinity Session Affinity for Kubernetes service, can be "None" or "ClientIP"
1080 ## If "ClientIP", consecutive client requests will be directed to the same Pod
1081 ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
1083 sessionAffinity: None
1084 ## @param secondary.service.sessionAffinityConfig Additional settings for the sessionAffinity
1085 ## sessionAffinityConfig:
1087 ## timeoutSeconds: 300
1089 sessionAffinityConfig: {}
1090 ## Headless service properties
1093 ## @param secondary.service.headless.annotations Additional custom annotations for headless MySQL secondary service.
1096 ## MySQL secondary Pod Disruption Budget configuration
1097 ## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb/
1100 ## @param secondary.pdb.create Enable/disable a Pod Disruption Budget creation for MySQL secondary pods
1103 ## @param secondary.pdb.minAvailable Minimum number/percentage of MySQL secondary pods that should remain scheduled
1106 ## @param secondary.pdb.maxUnavailable Maximum number/percentage of MySQL secondary pods that may be made unavailable. Defaults to `1` if both `secondary.pdb.minAvailable` and `secondary.pdb.maxUnavailable` are empty.
1109 ## @param secondary.podLabels Additional pod labels for MySQL secondary pods
1112## @section RBAC parameters
1115## MySQL pods ServiceAccount
1116## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
1119 ## @param serviceAccount.create Enable the creation of a ServiceAccount for MySQL pods
1122 ## @param serviceAccount.name Name of the created ServiceAccount
1123 ## If not set and create is true, a name is generated using the mysql.fullname template
1126 ## @param serviceAccount.annotations Annotations for MySQL Service Account
1129 ## @param serviceAccount.automountServiceAccountToken Automount service account token for the server service account
1131 automountServiceAccountToken: false
1133## ref: https://kubernetes.io/docs/admin/authorization/rbac/
1136 ## @param rbac.create Whether to create & use RBAC resources or not
1139 ## @param rbac.rules Custom RBAC rules to set
1151## @section Network Policy
1154## Network Policy configuration
1155## ref: https://kubernetes.io/docs/concepts/services-networking/network-policies/
1158 ## @param networkPolicy.enabled Enable creation of NetworkPolicy resources
1161 ## @param networkPolicy.allowExternal The Policy model to apply
1162 ## When set to false, only pods with the correct client label will have network access to the ports MySQL is
1163 ## listening on. When true, MySQL will accept connections from any source (with the correct destination port).
1166 ## @param networkPolicy.allowExternalEgress Allow the pod to access any range of port and all destinations.
1168 allowExternalEgress: true
1169 ## @param networkPolicy.extraIngress [array] Add extra ingress rules to the NetworkPolicy
1179 ## - matchExpressions:
1186 ## @param networkPolicy.extraEgress [array] Add extra ingress rules to the NetworkPolicy
1196 ## - matchExpressions:
1203 ## @param networkPolicy.ingressNSMatchLabels [object] Labels to match to allow traffic from other namespaces
1204 ## @param networkPolicy.ingressNSPodMatchLabels [object] Pod labels to match to allow traffic from other namespaces
1206 ingressNSMatchLabels: {}
1207 ingressNSPodMatchLabels: {}
1208## @section Password update job
1211 ## @param passwordUpdateJob.enabled Enable password update job
1214 ## @param passwordUpdateJob.backoffLimit set backoff limit of the job
1217 ## @param passwordUpdateJob.command Override default container command on mysql Primary container(s) (useful when using custom images)
1220 ## @param passwordUpdateJob.args Override default container args on mysql Primary container(s) (useful when using custom images)
1223 ## @param passwordUpdateJob.extraCommands Extra commands to pass to the generation job
1226 ## @param passwordUpdateJob.previousPasswords.rootPassword Previous root password (set if the password secret was already changed)
1227 ## @param passwordUpdateJob.previousPasswords.password Previous password (set if the password secret was already changed)
1228 ## @param passwordUpdateJob.previousPasswords.replicationPassword Previous replication password (set if the password secret was already changed)
1229 ## @param passwordUpdateJob.previousPasswords.existingSecret Name of a secret containing the previous passwords (set if the password secret was already changed)
1233 replicationPassword: ""
1235 ## Configure Container Security Context
1236 ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container
1237 ## @param passwordUpdateJob.containerSecurityContext.enabled Enabled containers' Security Context
1238 ## @param passwordUpdateJob.containerSecurityContext.seLinuxOptions [object,nullable] Set SELinux options in container
1239 ## @param passwordUpdateJob.containerSecurityContext.runAsUser Set containers' Security Context runAsUser
1240 ## @param passwordUpdateJob.containerSecurityContext.runAsGroup Set containers' Security Context runAsGroup
1241 ## @param passwordUpdateJob.containerSecurityContext.runAsNonRoot Set container's Security Context runAsNonRoot
1242 ## @param passwordUpdateJob.containerSecurityContext.privileged Set container's Security Context privileged
1243 ## @param passwordUpdateJob.containerSecurityContext.readOnlyRootFilesystem Set container's Security Context readOnlyRootFilesystem
1244 ## @param passwordUpdateJob.containerSecurityContext.allowPrivilegeEscalation Set container's Security Context allowPrivilegeEscalation
1245 ## @param passwordUpdateJob.containerSecurityContext.capabilities.drop List of capabilities to be dropped
1246 ## @param passwordUpdateJob.containerSecurityContext.seccompProfile.type Set container's Security Context seccomp profile
1248 containerSecurityContext:
1255 readOnlyRootFilesystem: true
1256 allowPrivilegeEscalation: false
1260 type: "RuntimeDefault"
1261 ## Configure Pods Security Context
1262 ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod
1263 ## @param passwordUpdateJob.podSecurityContext.enabled Enabled credential init job pods' Security Context
1264 ## @param passwordUpdateJob.podSecurityContext.fsGroupChangePolicy Set filesystem group change policy
1265 ## @param passwordUpdateJob.podSecurityContext.sysctls Set kernel settings using the sysctl interface
1266 ## @param passwordUpdateJob.podSecurityContext.supplementalGroups Set filesystem extra groups
1267 ## @param passwordUpdateJob.podSecurityContext.fsGroup Set credential init job pod's Security Context fsGroup
1271 fsGroupChangePolicy: Always
1273 supplementalGroups: []
1275 ## @param passwordUpdateJob.extraEnvVars Array containing extra env vars to configure the credential init job
1278 ## - name: GF_DEFAULT_INSTANCE_NAME
1279 ## value: my-instance
1282 ## @param passwordUpdateJob.extraEnvVarsCM ConfigMap containing extra env vars to configure the credential init job
1285 ## @param passwordUpdateJob.extraEnvVarsSecret Secret containing extra env vars to configure the credential init job (in case of sensitive data)
1287 extraEnvVarsSecret: ""
1288 ## @param passwordUpdateJob.extraVolumes Optionally specify extra list of additional volumes for the credential init job
1291 ## @param passwordUpdateJob.extraVolumeMounts Array of extra volume mounts to be added to the jwt Container (evaluated as template). Normally used with `extraVolumes`.
1293 extraVolumeMounts: []
1294 ## @param passwordUpdateJob.initContainers Add additional init containers for the mysql Primary pod(s)
1297 ## Container resource requests and limits
1298 ## ref: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
1299 ## @param passwordUpdateJob.resourcesPreset Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if passwordUpdateJob.resources is set (passwordUpdateJob.resources is recommended for production).
1301 resourcesPreset: "micro"
1302 ## @param passwordUpdateJob.resources Set container requests and limits for different resources like CPU or memory (essential for production workloads)
1313 ## @param passwordUpdateJob.customLivenessProbe Custom livenessProbe that overrides the default one
1315 customLivenessProbe: {}
1316 ## @param passwordUpdateJob.customReadinessProbe Custom readinessProbe that overrides the default one
1318 customReadinessProbe: {}
1319 ## @param passwordUpdateJob.customStartupProbe Custom startupProbe that overrides the default one
1321 customStartupProbe: {}
1322 ## @param passwordUpdateJob.automountServiceAccountToken Mount Service Account token in pod
1324 automountServiceAccountToken: false
1325 ## @param passwordUpdateJob.hostAliases Add deployment host aliases
1326 ## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/
1329 ## @param passwordUpdateJob.annotations [object] Add annotations to the job
1332 ## @param passwordUpdateJob.podLabels Additional pod labels
1333 ## Ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
1336 ## @param passwordUpdateJob.podAnnotations Additional pod annotations
1337 ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
1340## @section Volume Permissions parameters
1343## Init containers parameters:
1344## volumePermissions: Change the owner and group of the persistent volume mountpoint to runAsUser:fsGroup values from the securityContext section.
1347 ## @param volumePermissions.enabled Enable init container that changes the owner and group of the persistent volume(s) mountpoint to `runAsUser:fsGroup`
1350 ## @param volumePermissions.image.registry [default: REGISTRY_NAME] Init container volume-permissions image registry
1351 ## @param volumePermissions.image.repository [default: REPOSITORY_NAME/os-shell] Init container volume-permissions image repository
1352 ## @skip volumePermissions.image.tag Init container volume-permissions image tag (immutable tags are recommended)
1353 ## @param volumePermissions.image.digest Init container volume-permissions image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag
1354 ## @param volumePermissions.image.pullPolicy Init container volume-permissions image pull policy
1355 ## @param volumePermissions.image.pullSecrets Specify docker-registry secret names as an array
1359 repository: chainguard-private/os-shell-iamguarded
1362 pullPolicy: IfNotPresent
1363 ## Optionally specify an array of imagePullSecrets.
1364 ## Secrets must be manually created in the namespace.
1365 ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
1368 ## - myRegistryKeySecretName
1371 ## @param volumePermissions.resourcesPreset Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if volumePermissions.resources is set (volumePermissions.resources is recommended for production).
1373 resourcesPreset: "nano"
1374 ## @param volumePermissions.resources Set container requests and limits for different resources like CPU or memory (essential for production workloads)
1385## @section Metrics parameters
1388## Mysqld Prometheus exporter parameters
1391 ## @param metrics.enabled Start a side-car prometheus exporter
1394 ## @param metrics.image.registry [default: REGISTRY_NAME] Exporter image registry
1395 ## @param metrics.image.repository [default: REPOSITORY_NAME/mysqld-exporter] Exporter image repository
1396 ## @skip metrics.image.tag Exporter image tag (immutable tags are recommended)
1397 ## @param metrics.image.digest Exporter image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag
1398 ## @param metrics.image.pullPolicy Exporter image pull policy
1399 ## @param metrics.image.pullSecrets Specify docker-registry secret names as an array
1403 repository: chainguard-private/prometheus-mysqld-exporter-iamguarded
1406 pullPolicy: IfNotPresent
1407 ## Optionally specify an array of imagePullSecrets.
1408 ## Secrets must be manually created in the namespace.
1409 ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
1412 ## - myRegistryKeySecretName
1415 ## MySQL metrics container security context
1416 ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container
1417 ## @param metrics.containerSecurityContext.enabled MySQL metrics container securityContext
1418 ## @param metrics.containerSecurityContext.seLinuxOptions [object,nullable] Set SELinux options in container
1419 ## @param metrics.containerSecurityContext.runAsUser User ID for the MySQL metrics container
1420 ## @param metrics.containerSecurityContext.runAsGroup Group ID for the MySQL metrics container
1421 ## @param metrics.containerSecurityContext.runAsNonRoot Set MySQL metrics container's Security Context runAsNonRoot
1422 ## @param metrics.containerSecurityContext.allowPrivilegeEscalation Set container's privilege escalation
1423 ## @param metrics.containerSecurityContext.capabilities.drop Set container's Security Context runAsNonRoot
1424 ## @param metrics.containerSecurityContext.seccompProfile.type Set container's Security Context seccomp profile
1425 ## @param metrics.containerSecurityContext.readOnlyRootFilesystem Set container's Security Context read-only root filesystem
1427 containerSecurityContext:
1433 allowPrivilegeEscalation: false
1437 type: "RuntimeDefault"
1438 readOnlyRootFilesystem: true
1439 ## @param metrics.containerPorts.http Container port for http
1443 ## MySQL Prometheus exporter service parameters
1444 ## Mysqld Prometheus exporter liveness and readiness probes
1445 ## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
1446 ## @param metrics.service.type Kubernetes service type for MySQL Prometheus Exporter
1447 ## @param metrics.service.clusterIP Kubernetes service clusterIP for MySQL Prometheus Exporter
1448 ## @param metrics.service.port MySQL Prometheus Exporter service port
1449 ## @param metrics.service.annotations [object] Prometheus exporter service annotations
1456 prometheus.io/scrape: "true"
1457 prometheus.io/port: "{{ .Values.metrics.service.port }}"
1458 ## @param metrics.extraArgs.primary Extra args to be passed to mysqld_exporter on Primary pods
1459 ## @param metrics.extraArgs.secondary Extra args to be passed to mysqld_exporter on Secondary pods
1460 ## ref: https://github.com/prometheus/mysqld_exporter/
1462 ## - --collect.auto_increment.columns
1463 ## - --collect.binlog_size
1464 ## - --collect.engine_innodb_status
1465 ## - --collect.engine_tokudb_status
1466 ## - --collect.global_status
1467 ## - --collect.global_variables
1468 ## - --collect.info_schema.clientstats
1469 ## - --collect.info_schema.innodb_metrics
1470 ## - --collect.info_schema.innodb_tablespaces
1471 ## - --collect.info_schema.innodb_cmp
1472 ## - --collect.info_schema.innodb_cmpmem
1473 ## - --collect.info_schema.processlist
1474 ## - --collect.info_schema.processlist.min_time
1475 ## - --collect.info_schema.query_response_time
1476 ## - --collect.info_schema.tables
1477 ## - --collect.info_schema.tables.databases
1478 ## - --collect.info_schema.tablestats
1479 ## - --collect.info_schema.userstats
1480 ## - --collect.perf_schema.eventsstatements
1481 ## - --collect.perf_schema.eventsstatements.digest_text_limit
1482 ## - --collect.perf_schema.eventsstatements.limit
1483 ## - --collect.perf_schema.eventsstatements.timelimit
1484 ## - --collect.perf_schema.eventswaits
1485 ## - --collect.perf_schema.file_events
1486 ## - --collect.perf_schema.file_instances
1487 ## - --collect.perf_schema.indexiowaits
1488 ## - --collect.perf_schema.tableiowaits
1489 ## - --collect.perf_schema.tablelocks
1490 ## - --collect.perf_schema.replication_group_member_stats
1491 ## - --collect.slave_status
1492 ## - --collect.slave_hosts
1493 ## - --collect.heartbeat
1494 ## - --collect.heartbeat.database
1495 ## - --collect.heartbeat.table
1500 ## Mysqld Prometheus exporter resource requests and limits
1501 ## ref: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
1502 ## We usually recommend not to specify default resources and to leave this as a conscious
1503 ## choice for the user. This also increases chances charts run on environments with little
1504 ## resources, such as Minikube. If you do want to specify resources, uncomment the following
1505 ## lines, adjust them as necessary, and remove the curly braces after 'resources:'.
1506 ## @param metrics.resourcesPreset Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if metrics.resources is set (metrics.resources is recommended for production).
1508 resourcesPreset: "nano"
1509 ## @param metrics.resources Set container requests and limits for different resources like CPU or memory (essential for production workloads)
1520 ## Mysqld Prometheus exporter liveness probe
1521 ## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
1522 ## @param metrics.livenessProbe.enabled Enable livenessProbe
1523 ## @param metrics.livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe
1524 ## @param metrics.livenessProbe.periodSeconds Period seconds for livenessProbe
1525 ## @param metrics.livenessProbe.timeoutSeconds Timeout seconds for livenessProbe
1526 ## @param metrics.livenessProbe.failureThreshold Failure threshold for livenessProbe
1527 ## @param metrics.livenessProbe.successThreshold Success threshold for livenessProbe
1531 initialDelaySeconds: 120
1536 ## Mysqld Prometheus exporter readiness probe
1537 ## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
1538 ## @param metrics.readinessProbe.enabled Enable readinessProbe
1539 ## @param metrics.readinessProbe.initialDelaySeconds Initial delay seconds for readinessProbe
1540 ## @param metrics.readinessProbe.periodSeconds Period seconds for readinessProbe
1541 ## @param metrics.readinessProbe.timeoutSeconds Timeout seconds for readinessProbe
1542 ## @param metrics.readinessProbe.failureThreshold Failure threshold for readinessProbe
1543 ## @param metrics.readinessProbe.successThreshold Success threshold for readinessProbe
1547 initialDelaySeconds: 30
1552 ## Prometheus Service Monitor
1553 ## ref: https://github.com/coreos/prometheus-operator
1556 ## @param metrics.serviceMonitor.enabled Create ServiceMonitor Resource for scraping metrics using PrometheusOperator
1559 ## @param metrics.serviceMonitor.namespace Specify the namespace in which the serviceMonitor resource will be created
1562 ## @param metrics.serviceMonitor.jobLabel The name of the label on the target service to use as the job name in prometheus.
1565 ## @param metrics.serviceMonitor.interval Specify the interval at which metrics should be scraped
1568 ## @param metrics.serviceMonitor.scrapeTimeout Specify the timeout after which the scrape is ended
1570 ## scrapeTimeout: 30s
1573 ## @param metrics.serviceMonitor.relabelings RelabelConfigs to apply to samples before scraping
1574 ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#relabelconfig
1577 ## @param metrics.serviceMonitor.metricRelabelings MetricRelabelConfigs to apply to samples before ingestion
1578 ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#relabelconfig
1580 metricRelabelings: []
1581 ## @param metrics.serviceMonitor.selector ServiceMonitor selector labels
1584 ## prometheus: my-prometheus
1587 ## @param metrics.serviceMonitor.honorLabels Specify honorLabels parameter to add the scrape endpoint
1590 ## @param metrics.serviceMonitor.labels Used to pass Labels that are used by the Prometheus installed in your cluster to select Service Monitors to work with
1591 ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#prometheusspec
1594 ## @param metrics.serviceMonitor.annotations ServiceMonitor annotations
1597 ## Prometheus Operator prometheusRule configuration
1600 ## @param metrics.prometheusRule.enabled Creates a Prometheus Operator prometheusRule (also requires `metrics.enabled` to be `true` and `metrics.prometheusRule.rules`)
1603 ## @param metrics.prometheusRule.namespace Namespace for the prometheusRule Resource (defaults to the Release Namespace)
1606 ## @param metrics.prometheusRule.additionalLabels Additional labels that can be used so prometheusRule will be discovered by Prometheus
1608 additionalLabels: {}
1609 ## @param metrics.prometheusRule.rules Prometheus Rule definitions
1610 ## - alert: Mysql-Down
1611 ## expr: absent(up{job="mysql"} == 1)
1614 ## severity: warning
1617 ## message: 'mysql instance {{`{{`}} $labels.instance {{`}}`}} is down'
1618 ## summary: mysql instance is down