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.useImageTags Pull every image by tag and ignore all image digests, including digests set in values. Use this when your registry mirror does not have the chart's default image digests.
18## @param global.imagePullSecrets Global Docker registry secret names as an array
19## @param global.defaultStorageClass Global default StorageClass for Persistent Volume(s)
20## @param global.storageClass DEPRECATED: use global.defaultStorageClass instead
27 ## - myRegistryKeySecretName
30 defaultStorageClass: ""
32 ## Security parameters
35 ## @param global.security.allowInsecureImages Allows skipping image verification
36 allowInsecureImages: false
37 ## Compatibility adaptations for Kubernetes platforms
40 ## Compatibility adaptations for Openshift
43 ## @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)
45 adaptSecurityContext: auto
47## @section Common parameters
50## @param kubeVersion Force target Kubernetes version (using Helm capabilities if not set)
53## @param nameOverride String to partially override common.names.fullname template (will maintain the release name)
56## @param fullnameOverride String to fully override common.names.fullname template
59## @param namespaceOverride String to fully override common.names.namespace
62## @param clusterDomain Cluster domain
64clusterDomain: cluster.local
65## @param commonAnnotations Common annotations to add to all MySQL resources (sub-charts are not considered). Evaluated as a template
68## @param commonLabels Common labels to add to all MySQL resources (sub-charts are not considered). Evaluated as a template
71## @param extraDeploy Array with extra yaml to deploy with the chart. Evaluated as a template
74## @param serviceBindings.enabled Create secret for service binding (Experimental)
75## Ref: https://servicebinding.io/service-provider/
79## Enable diagnostic mode in the deployment
82 ## @param diagnosticMode.enabled Enable diagnostic mode (all probes will be disabled and the command will be overridden)
85 ## @param diagnosticMode.command Command to override all containers in the deployment
89 ## @param diagnosticMode.args Args to override all containers in the deployment
93## @section MySQL common parameters
96## Iamguarded MySQL image
97## @param image.registry [default: REGISTRY_NAME] MySQL image registry
98## @param image.repository [default: REPOSITORY_NAME/mysql] MySQL image repository
99## @skip image.tag MySQL image tag (immutable tags are recommended)
100## @param image.digest MySQL image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag
101## @param image.pullPolicy MySQL image pull policy
102## @param image.pullSecrets Specify docker-registry secret names as an array
103## @param image.debug Specify if debug logs should be enabled
107 repository: chainguard-private/mysql-iamguarded
110 ## Specify a imagePullPolicy
111 ## ref: https://kubernetes.io/docs/concepts/containers/images/#pre-pulled-images
113 pullPolicy: IfNotPresent
114 ## Optionally specify an array of imagePullSecrets (secrets must be manually created in the namespace)
115 ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
118 ## - myRegistryKeySecretName
121 ## Set to true if you would like to see extra information on logs
122 ## It turns BASH and/or NAMI debugging in the image
125## @param architecture MySQL architecture (`standalone` or `replication`)
127architecture: standalone
128## MySQL Authentication parameters
131 ## @param auth.rootPassword Password for the `root` user. Ignored if existing secret is provided
134 ## @param auth.createDatabase Whether to create the .Values.auth.database or not
137 ## @param auth.database Name for a custom database to create
139 database: "my_database"
140 ## @param auth.username Name for a custom user to create
143 ## @param auth.password Password for the new user. Ignored if existing secret is provided
146 ## @param auth.replicationUser MySQL replication user
148 replicationUser: replicator
149 ## @param auth.replicationPassword MySQL replication user password. Ignored if existing secret is provided
151 replicationPassword: ""
152 ## @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`
153 ## NOTE: When it's set the auth.rootPassword, auth.password, auth.replicationPassword are ignored.
156 ## @param auth.usePasswordFiles Mount credentials as files instead of using an environment variable
158 usePasswordFiles: true
159 ## @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`
161 ## customPasswordFiles:
162 ## root: /vault/secrets/mysql-root
163 ## user: /vault/secrets/mysql-user
164 ## replicator: /vault/secrets/mysql-replicator
166 customPasswordFiles: {}
167 ## @param auth.authenticationPolicy Sets the authentication policy, by default it will use `* ,,`
168 ## ref: https://dev.mysql.com/doc/refman/8.4/en/server-system-variables.html#sysvar_authentication_policy
170 authenticationPolicy: ""
171## @param initdbScripts Dictionary of initdb scripts
172## Specify dictionary of scripts to be run at first boot
175## my_init_script.sh: |
177## echo "Do something."
180## @param initdbScriptsConfigMap ConfigMap with the initdb scripts (Note: Overrides `initdbScripts`)
182initdbScriptsConfigMap: ""
183## @param startdbScripts Dictionary of startdb scripts
184## Specify dictionary of scripts to be run every time the container is started
187## my_start_script.sh: |
189## echo "Do something."
192## @param startdbScriptsConfigMap ConfigMap with the startdb scripts (Note: Overrides `startdbScripts`)
194startdbScriptsConfigMap: ""
195## @section TLS/SSL parameters
197## @param tls.enabled Enable TLS in MySQL
198## @param tls.existingSecret Existing secret that contains TLS certificates
199## @param tls.certFilename The secret key from the existingSecret if 'cert' key different from the default (tls.crt)
200## @param tls.certKeyFilename The secret key from the existingSecret if 'key' key different from the default (tls.key)
201## @param tls.certCAFilename The secret key from the existingSecret if 'ca' key different from the default (tls.crt)
202## @param tls.ca CA certificate for TLS. Ignored if `tls.existingSecret` is set
203## @param tls.cert TLS certificate for MySQL. Ignored if `tls.existingSecret` is set
204## @param tls.key TLS key for MySQL. Ignored if `tls.existingSecret` is set
209 certFilename: tls.crt
210 certKeyFilename: tls.key
215 ## @param tls.autoGenerated.enabled Enable automatic generation of certificates for TLS
216 ## @param tls.autoGenerated.engine Mechanism to generate the certificates (allowed values: helm, cert-manager)
220 ## @param tls.autoGenerated.certManager.existingIssuer The name of an existing Issuer to use for generating the certificates (only for `cert-manager` engine)
221 ## @param tls.autoGenerated.certManager.existingIssuerKind Existing Issuer kind, defaults to Issuer (only for `cert-manager` engine)
222 ## @param tls.autoGenerated.certManager.keyAlgorithm Key algorithm for the certificates (only for `cert-manager` engine)
223 ## @param tls.autoGenerated.certManager.keySize Key size for the certificates (only for `cert-manager` engine)
224 ## @param tls.autoGenerated.certManager.duration Duration for the certificates (only for `cert-manager` engine)
225 ## @param tls.autoGenerated.certManager.renewBefore Renewal period for the certificates (only for `cert-manager` engine)
228 existingIssuerKind: ""
233## @section MySQL Primary parameters
236 ## @param primary.name Name of the primary database (eg primary, master, leader, ...)
239 ## @param primary.command Override default container command on MySQL Primary container(s) (useful when using custom images)
242 ## @param primary.args Override default container args on MySQL Primary container(s) (useful when using custom images)
245 ## @param primary.lifecycleHooks for the MySQL Primary container(s) to automate configuration before or after startup
248 ## @param primary.automountServiceAccountToken Mount Service Account token in pod
250 automountServiceAccountToken: false
251 ## @param primary.hostAliases Deployment pod host aliases
252 ## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/
255 ## @param primary.enableMySQLX Enable mysqlx port
256 ## ref: https://dev.mysql.com/doc/dev/mysql-server/latest/mysqlx_protocol_xplugin.html
259 ## @param primary.configuration [string] Configure MySQL Primary with a custom my.cnf file
260 ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file
264 authentication_policy='{{- .Values.auth.authenticationPolicy | default "* ,," }}'
266 explicit_defaults_for_timestamp
267 basedir=/opt/iamguarded/mysql
268 plugin_dir=/opt/iamguarded/mysql/lib/plugin
269 port={{ .Values.primary.containerPorts.mysql }}
270 mysqlx={{ ternary 1 0 .Values.primary.enableMySQLX }}
271 mysqlx_port={{ .Values.primary.containerPorts.mysqlx }}
272 socket=/opt/iamguarded/mysql/tmp/mysql.sock
273 datadir=/iamguarded/mysql/data
274 tmpdir=/opt/iamguarded/mysql/tmp
275 max_allowed_packet=16M
277 pid-file=/opt/iamguarded/mysql/tmp/mysqld.pid
278 log-error=/opt/iamguarded/mysql/logs/mysqld.log
279 character-set-server=UTF8
282 {{- if .Values.tls.enabled }}
283 ssl_cert=/opt/iamguarded/mysql/certs/{{ .Values.tls.certFilename }}
284 ssl_key=/opt/iamguarded/mysql/certs/{{ .Values.tls.certKeyFilename }}
285 {{- if (include "mysql.tlsCACert" .) }}
286 ssl_ca={{ include "mysql.tlsCACert" . }}
291 port={{ .Values.primary.containerPorts.mysql }}
292 socket=/opt/iamguarded/mysql/tmp/mysql.sock
293 default-character-set=UTF8
294 plugin_dir=/opt/iamguarded/mysql/lib/plugin
297 port={{ .Values.primary.containerPorts.mysql }}
298 socket=/opt/iamguarded/mysql/tmp/mysql.sock
299 pid-file=/opt/iamguarded/mysql/tmp/mysqld.pid
300 ## @param primary.existingConfigmap Name of existing ConfigMap with MySQL Primary configuration.
301 ## NOTE: When it's set the 'configuration' parameter is ignored
303 existingConfigmap: ""
304 ## @param primary.containerPorts.mysql Container port for mysql
305 ## @param primary.containerPorts.mysqlx Container port for mysqlx
310 ## @param primary.updateStrategy.type Update strategy type for the MySQL primary statefulset
311 ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies
315 ## @param primary.podAnnotations Additional pod annotations for MySQL primary pods
316 ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
319 ## @param primary.podAffinityPreset MySQL primary pod affinity preset. Ignored if `primary.affinity` is set. Allowed values: `soft` or `hard`
320 ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
322 podAffinityPreset: ""
323 ## @param primary.podAntiAffinityPreset MySQL primary pod anti-affinity preset. Ignored if `primary.affinity` is set. Allowed values: `soft` or `hard`
324 ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
326 podAntiAffinityPreset: soft
327 ## MySQL Primary node affinity preset
328 ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity
331 ## @param primary.nodeAffinityPreset.type MySQL primary node affinity preset type. Ignored if `primary.affinity` is set. Allowed values: `soft` or `hard`
334 ## @param primary.nodeAffinityPreset.key MySQL primary node label key to match Ignored if `primary.affinity` is set.
336 ## key: "kubernetes.io/e2e-az-name"
339 ## @param primary.nodeAffinityPreset.values MySQL primary node label values to match. Ignored if `primary.affinity` is set.
346 ## @param primary.affinity Affinity for MySQL primary pods assignment
347 ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
348 ## Note: podAffinityPreset, podAntiAffinityPreset, and nodeAffinityPreset will be ignored when it's set
351 ## @param primary.nodeSelector Node labels for MySQL primary pods assignment
352 ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/
355 ## @param primary.tolerations Tolerations for MySQL primary pods assignment
356 ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
359 ## @param primary.priorityClassName MySQL primary pods' priorityClassName
361 priorityClassName: ""
362 ## @param primary.runtimeClassName MySQL primary pods' runtimeClassName
365 ## @param primary.schedulerName Name of the k8s scheduler (other than default)
366 ## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/
369 ## @param primary.terminationGracePeriodSeconds In seconds, time the given to the MySQL primary pod needs to terminate gracefully
370 ## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods
372 terminationGracePeriodSeconds: ""
373 ## @param primary.topologySpreadConstraints Topology Spread Constraints for pod assignment
374 ## https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/
375 ## The value is evaluated as a template
377 topologySpreadConstraints: []
378 ## @param primary.podManagementPolicy podManagementPolicy to manage scaling operation of MySQL primary pods
379 ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#pod-management-policies
381 podManagementPolicy: ""
382 ## MySQL primary Pod security context
383 ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod
384 ## @param primary.podSecurityContext.enabled Enable security context for MySQL primary pods
385 ## @param primary.podSecurityContext.fsGroupChangePolicy Set filesystem group change policy
386 ## @param primary.podSecurityContext.sysctls Set kernel settings using the sysctl interface
387 ## @param primary.podSecurityContext.supplementalGroups Set filesystem extra groups
388 ## @param primary.podSecurityContext.fsGroup Group ID for the mounted volumes' filesystem
392 fsGroupChangePolicy: Always
394 supplementalGroups: []
396 ## MySQL primary container security context
397 ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container
398 ## @param primary.containerSecurityContext.enabled MySQL primary container securityContext
399 ## @param primary.containerSecurityContext.seLinuxOptions [object,nullable] Set SELinux options in container
400 ## @param primary.containerSecurityContext.runAsUser User ID for the MySQL primary container
401 ## @param primary.containerSecurityContext.runAsGroup Group ID for the MySQL primary container
402 ## @param primary.containerSecurityContext.runAsNonRoot Set MySQL primary container's Security Context runAsNonRoot
403 ## @param primary.containerSecurityContext.allowPrivilegeEscalation Set container's privilege escalation
404 ## @param primary.containerSecurityContext.capabilities.drop Set container's Security Context runAsNonRoot
405 ## @param primary.containerSecurityContext.seccompProfile.type Set Client container's Security Context seccomp profile
406 ## @param primary.containerSecurityContext.readOnlyRootFilesystem Set container's Security Context read-only root filesystem
408 containerSecurityContext:
414 allowPrivilegeEscalation: false
418 type: "RuntimeDefault"
419 readOnlyRootFilesystem: true
420 ## MySQL primary container's resource requests and limits
421 ## ref: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
422 ## We usually recommend not to specify default resources and to leave this as a conscious
423 ## choice for the user. This also increases chances charts run on environments with little
424 ## resources, such as Minikube. If you do want to specify resources, uncomment the following
425 ## lines, adjust them as necessary, and remove the curly braces after 'resources:'.
426 ## @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).
427 ## 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)
429 resourcesPreset: "small"
430 ## @param primary.resources Set container requests and limits for different resources like CPU or memory (essential for production workloads)
441 ## Configure extra options for liveness probe
442 ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes
443 ## @param primary.livenessProbe.enabled Enable livenessProbe
444 ## @param primary.livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe
445 ## @param primary.livenessProbe.periodSeconds Period seconds for livenessProbe
446 ## @param primary.livenessProbe.timeoutSeconds Timeout seconds for livenessProbe
447 ## @param primary.livenessProbe.failureThreshold Failure threshold for livenessProbe
448 ## @param primary.livenessProbe.successThreshold Success threshold for livenessProbe
452 initialDelaySeconds: 5
457 ## Configure extra options for readiness probe
458 ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes
459 ## @param primary.readinessProbe.enabled Enable readinessProbe
460 ## @param primary.readinessProbe.initialDelaySeconds Initial delay seconds for readinessProbe
461 ## @param primary.readinessProbe.periodSeconds Period seconds for readinessProbe
462 ## @param primary.readinessProbe.timeoutSeconds Timeout seconds for readinessProbe
463 ## @param primary.readinessProbe.failureThreshold Failure threshold for readinessProbe
464 ## @param primary.readinessProbe.successThreshold Success threshold for readinessProbe
468 initialDelaySeconds: 5
473 ## Configure extra options for startupProbe probe
474 ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes
475 ## @param primary.startupProbe.enabled Enable startupProbe
476 ## @param primary.startupProbe.initialDelaySeconds Initial delay seconds for startupProbe
477 ## @param primary.startupProbe.periodSeconds Period seconds for startupProbe
478 ## @param primary.startupProbe.timeoutSeconds Timeout seconds for startupProbe
479 ## @param primary.startupProbe.failureThreshold Failure threshold for startupProbe
480 ## @param primary.startupProbe.successThreshold Success threshold for startupProbe
484 initialDelaySeconds: 15
489 ## @param primary.customLivenessProbe Override default liveness probe for MySQL primary containers
491 customLivenessProbe: {}
492 ## @param primary.customReadinessProbe Override default readiness probe for MySQL primary containers
494 customReadinessProbe: {}
495 ## @param primary.customStartupProbe Override default startup probe for MySQL primary containers
497 customStartupProbe: {}
498 ## @param primary.extraFlags MySQL primary additional command line flags
499 ## Can be used to specify command line flags, for example:
501 ## extraFlags: "--max-connect-errors=1000 --max_connections=155"
504 ## @param primary.extraEnvVars Extra environment variables to be set on MySQL primary containers
508 ## value: "Europe/Paris"
511 ## @param primary.extraEnvVarsCM Name of existing ConfigMap containing extra env vars for MySQL primary containers
514 ## @param primary.extraEnvVarsSecret Name of existing Secret containing extra env vars for MySQL primary containers
516 extraEnvVarsSecret: ""
517 ## @param primary.extraPodSpec Optionally specify extra PodSpec for the MySQL Primary pod(s)
520 ## @param primary.extraPorts Extra ports to expose
523 ## Enable persistence using Persistent Volume Claims
524 ## ref: https://kubernetes.io/docs/concepts/storage/persistent-volumes/
527 ## @param primary.persistence.enabled Enable persistence on MySQL primary replicas using a `PersistentVolumeClaim`. If false, use emptyDir
530 ## @param primary.persistence.existingClaim Name of an existing `PersistentVolumeClaim` for MySQL primary replicas
531 ## NOTE: When it's set the rest of persistence parameters are ignored
534 ## @param primary.persistence.subPath The name of a volume's sub path to mount for persistence
537 ## @param primary.persistence.storageClass MySQL primary persistent volume storage Class
538 ## If defined, storageClassName: <storageClass>
539 ## If set to "-", storageClassName: "", which disables dynamic provisioning
540 ## If undefined (the default) or set to null, no storageClassName spec is
541 ## set, choosing the default provisioner. (gp2 on AWS, standard on
542 ## GKE, AWS & OpenStack)
545 ## @param primary.persistence.annotations MySQL primary persistent volume claim annotations
548 ## @param primary.persistence.accessModes MySQL primary persistent volume access Modes
552 ## @param primary.persistence.size MySQL primary persistent volume size
555 ## @param primary.persistence.selector Selector to match an existing Persistent Volume
561 ## Primary Persistent Volume Claim Retention Policy
562 ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#persistentvolumeclaim-retention
564 persistentVolumeClaimRetentionPolicy:
565 ## @param primary.persistentVolumeClaimRetentionPolicy.enabled Enable Persistent volume retention policy for Primary StatefulSet
568 ## @param primary.persistentVolumeClaimRetentionPolicy.whenScaled Volume retention behavior when the replica count of the StatefulSet is reduced
571 ## @param primary.persistentVolumeClaimRetentionPolicy.whenDeleted Volume retention behavior that applies when the StatefulSet is deleted
574 ## @param primary.extraVolumes Optionally specify extra list of additional volumes to the MySQL Primary pod(s)
577 ## @param primary.extraVolumeMounts Optionally specify extra list of additional volumeMounts for the MySQL Primary container(s)
579 extraVolumeMounts: []
580 ## @param primary.initContainers Add additional init containers for the MySQL Primary pod(s)
583 ## @param primary.enableDefaultInitContainers enables (or disables if false) the default init containers (logs-symlinks, volume permissions)
585 enableDefaultInitContainers: true
586 ## @param primary.sidecars Add additional sidecar containers for the MySQL Primary pod(s)
589 ## MySQL Primary Service parameters
592 ## @param primary.service.type MySQL Primary K8s service type
595 ## @param primary.service.ports.mysql MySQL Primary K8s service port
596 ## @param primary.service.ports.mysqlx MySQL Primary K8s service mysqlx port
601 ## @param primary.service.nodePorts.mysql MySQL Primary K8s service node port
602 ## @param primary.service.nodePorts.mysqlx MySQL Primary K8s service node port mysqlx
603 ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
608 ## @param primary.service.clusterIP MySQL Primary K8s service clusterIP IP
613 ## @param primary.service.loadBalancerIP MySQL Primary loadBalancerIP if service type is `LoadBalancer`
614 ## Set the LoadBalancer service type to internal only
615 ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
618 ## @param primary.service.externalTrafficPolicy Enable client source IP preservation
619 ## ref https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip
622 ## @param primary.service.externalIPs MySQL Primary K8s service externalIPs
623 ## ref https://kubernetes.io/docs/concepts/services-networking/service/#external-ips
625 externalTrafficPolicy: Cluster
626 ## @param primary.service.loadBalancerSourceRanges Addresses that are allowed when MySQL Primary service is LoadBalancer
627 ## https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service
629 ## loadBalancerSourceRanges:
632 loadBalancerSourceRanges: []
633 ## @param primary.service.extraPorts Extra ports to expose (normally used with the `sidecar` value)
636 ## @param primary.service.annotations Additional custom annotations for MySQL primary service
639 ## @param primary.service.sessionAffinity Session Affinity for Kubernetes service, can be "None" or "ClientIP"
640 ## If "ClientIP", consecutive client requests will be directed to the same Pod
641 ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
643 sessionAffinity: None
644 ## @param primary.service.sessionAffinityConfig Additional settings for the sessionAffinity
645 ## sessionAffinityConfig:
647 ## timeoutSeconds: 300
649 sessionAffinityConfig: {}
650 ## Headless service properties
653 ## @param primary.service.headless.annotations Additional custom annotations for headless MySQL primary service.
656 ## MySQL primary Pod Disruption Budget configuration
657 ## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb/
660 ## @param primary.pdb.create Enable/disable a Pod Disruption Budget creation for MySQL primary pods
663 ## @param primary.pdb.minAvailable Minimum number/percentage of MySQL primary pods that should remain scheduled
666 ## @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.
669 ## @param primary.podLabels MySQL Primary pod label. If labels are same as commonLabels , this will take precedence
672## @section MySQL Secondary parameters
675 ## @param secondary.name Name of the secondary database (eg secondary, slave, ...)
678 ## @param secondary.replicaCount Number of MySQL secondary replicas
681 ## @param secondary.automountServiceAccountToken Mount Service Account token in pod
683 automountServiceAccountToken: false
684 ## @param secondary.hostAliases Deployment pod host aliases
685 ## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/
688 ## @param secondary.command Override default container command on MySQL Secondary container(s) (useful when using custom images)
691 ## @param secondary.args Override default container args on MySQL Secondary container(s) (useful when using custom images)
694 ## @param secondary.lifecycleHooks for the MySQL Secondary container(s) to automate configuration before or after startup
697 ## @param secondary.enableMySQLX Enable mysqlx port
698 ## ref: https://dev.mysql.com/doc/dev/mysql-server/latest/mysqlx_protocol_xplugin.html
701 ## @param secondary.configuration [string] Configure MySQL Secondary with a custom my.cnf file
702 ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file
706 authentication_policy='{{- .Values.auth.authenticationPolicy | default "* ,," }}'
708 explicit_defaults_for_timestamp
709 basedir=/opt/iamguarded/mysql
710 plugin_dir=/opt/iamguarded/mysql/lib/plugin
711 port={{ .Values.secondary.containerPorts.mysql }}
712 mysqlx={{ ternary 1 0 .Values.secondary.enableMySQLX }}
713 mysqlx_port={{ .Values.secondary.containerPorts.mysqlx }}
714 socket=/opt/iamguarded/mysql/tmp/mysql.sock
715 datadir=/iamguarded/mysql/data
716 tmpdir=/opt/iamguarded/mysql/tmp
717 max_allowed_packet=16M
719 pid-file=/opt/iamguarded/mysql/tmp/mysqld.pid
720 log-error=/opt/iamguarded/mysql/logs/mysqld.log
721 character-set-server=UTF8
724 {{- if .Values.tls.enabled }}
725 ssl_cert=/opt/iamguarded/mysql/certs/{{ .Values.tls.certFilename }}
726 ssl_key=/opt/iamguarded/mysql/certs/{{ .Values.tls.certKeyFilename }}
727 {{- if (include "mysql.tlsCACert" .) }}
728 ssl_ca={{ include "mysql.tlsCACert" . }}
733 port={{ .Values.secondary.containerPorts.mysql }}
734 socket=/opt/iamguarded/mysql/tmp/mysql.sock
735 default-character-set=UTF8
736 plugin_dir=/opt/iamguarded/mysql/lib/plugin
739 port={{ .Values.secondary.containerPorts.mysql }}
740 socket=/opt/iamguarded/mysql/tmp/mysql.sock
741 pid-file=/opt/iamguarded/mysql/tmp/mysqld.pid
742 ## @param secondary.existingConfigmap Name of existing ConfigMap with MySQL Secondary configuration.
743 ## NOTE: When it's set the 'configuration' parameter is ignored
745 existingConfigmap: ""
746 ## @param secondary.containerPorts.mysql Container port for mysql
747 ## @param secondary.containerPorts.mysqlx Container port for mysqlx
752 ## @param secondary.updateStrategy.type Update strategy type for the MySQL secondary statefulset
753 ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies
757 ## @param secondary.podAnnotations Additional pod annotations for MySQL secondary pods
758 ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
761 ## @param secondary.podAffinityPreset MySQL secondary pod affinity preset. Ignored if `secondary.affinity` is set. Allowed values: `soft` or `hard`
762 ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
764 podAffinityPreset: ""
765 ## @param secondary.podAntiAffinityPreset MySQL secondary pod anti-affinity preset. Ignored if `secondary.affinity` is set. Allowed values: `soft` or `hard`
766 ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
767 ## Allowed values: soft, hard
769 podAntiAffinityPreset: soft
770 ## MySQL Secondary node affinity preset
771 ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity
774 ## @param secondary.nodeAffinityPreset.type MySQL secondary node affinity preset type. Ignored if `secondary.affinity` is set. Allowed values: `soft` or `hard`
777 ## @param secondary.nodeAffinityPreset.key MySQL secondary node label key to match Ignored if `secondary.affinity` is set.
779 ## key: "kubernetes.io/e2e-az-name"
782 ## @param secondary.nodeAffinityPreset.values MySQL secondary node label values to match. Ignored if `secondary.affinity` is set.
789 ## @param secondary.affinity Affinity for MySQL secondary pods assignment
790 ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
791 ## Note: podAffinityPreset, podAntiAffinityPreset, and nodeAffinityPreset will be ignored when it's set
794 ## @param secondary.nodeSelector Node labels for MySQL secondary pods assignment
795 ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/
798 ## @param secondary.tolerations Tolerations for MySQL secondary pods assignment
799 ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
802 ## @param secondary.priorityClassName MySQL secondary pods' priorityClassName
804 priorityClassName: ""
805 ## @param secondary.runtimeClassName MySQL secondary pods' runtimeClassName
808 ## @param secondary.schedulerName Name of the k8s scheduler (other than default)
809 ## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/
812 ## @param secondary.terminationGracePeriodSeconds In seconds, time the given to the MySQL secondary pod needs to terminate gracefully
813 ## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods
815 terminationGracePeriodSeconds: ""
816 ## @param secondary.topologySpreadConstraints Topology Spread Constraints for pod assignment
817 ## https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/
818 ## The value is evaluated as a template
820 topologySpreadConstraints: []
821 ## @param secondary.podManagementPolicy podManagementPolicy to manage scaling operation of MySQL secondary pods
822 ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#pod-management-policies
824 podManagementPolicy: ""
825 ## MySQL secondary Pod security context
826 ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod
827 ## @param secondary.podSecurityContext.enabled Enable security context for MySQL secondary pods
828 ## @param secondary.podSecurityContext.fsGroupChangePolicy Set filesystem group change policy
829 ## @param secondary.podSecurityContext.sysctls Set kernel settings using the sysctl interface
830 ## @param secondary.podSecurityContext.supplementalGroups Set filesystem extra groups
831 ## @param secondary.podSecurityContext.fsGroup Group ID for the mounted volumes' filesystem
835 fsGroupChangePolicy: Always
837 supplementalGroups: []
839 ## MySQL secondary container security context
840 ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container
841 ## @param secondary.containerSecurityContext.enabled MySQL secondary container securityContext
842 ## @param secondary.containerSecurityContext.seLinuxOptions [object,nullable] Set SELinux options in container
843 ## @param secondary.containerSecurityContext.runAsUser User ID for the MySQL secondary container
844 ## @param secondary.containerSecurityContext.runAsGroup Group ID for the MySQL secondary container
845 ## @param secondary.containerSecurityContext.runAsNonRoot Set MySQL secondary container's Security Context runAsNonRoot
846 ## @param secondary.containerSecurityContext.allowPrivilegeEscalation Set container's privilege escalation
847 ## @param secondary.containerSecurityContext.capabilities.drop Set container's Security Context runAsNonRoot
848 ## @param secondary.containerSecurityContext.seccompProfile.type Set container's Security Context seccomp profile
849 ## @param secondary.containerSecurityContext.readOnlyRootFilesystem Set container's Security Context read-only root filesystem
851 containerSecurityContext:
857 allowPrivilegeEscalation: false
861 type: "RuntimeDefault"
862 readOnlyRootFilesystem: true
863 ## MySQL secondary container's resource requests and limits
864 ## ref: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
865 ## We usually recommend not to specify default resources and to leave this as a conscious
866 ## choice for the user. This also increases chances charts run on environments with little
867 ## resources, such as Minikube. If you do want to specify resources, uncomment the following
868 ## lines, adjust them as necessary, and remove the curly braces after 'resources:'.
869 ## @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).
871 resourcesPreset: "small"
872 ## @param secondary.resources Set container requests and limits for different resources like CPU or memory (essential for production workloads)
883 ## Configure extra options for liveness probe
884 ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes
885 ## @param secondary.livenessProbe.enabled Enable livenessProbe
886 ## @param secondary.livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe
887 ## @param secondary.livenessProbe.periodSeconds Period seconds for livenessProbe
888 ## @param secondary.livenessProbe.timeoutSeconds Timeout seconds for livenessProbe
889 ## @param secondary.livenessProbe.failureThreshold Failure threshold for livenessProbe
890 ## @param secondary.livenessProbe.successThreshold Success threshold for livenessProbe
894 initialDelaySeconds: 5
899 ## Configure extra options for readiness probe
900 ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes
901 ## @param secondary.readinessProbe.enabled Enable readinessProbe
902 ## @param secondary.readinessProbe.initialDelaySeconds Initial delay seconds for readinessProbe
903 ## @param secondary.readinessProbe.periodSeconds Period seconds for readinessProbe
904 ## @param secondary.readinessProbe.timeoutSeconds Timeout seconds for readinessProbe
905 ## @param secondary.readinessProbe.failureThreshold Failure threshold for readinessProbe
906 ## @param secondary.readinessProbe.successThreshold Success threshold for readinessProbe
910 initialDelaySeconds: 5
915 ## Configure extra options for startupProbe probe
916 ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes
917 ## @param secondary.startupProbe.enabled Enable startupProbe
918 ## @param secondary.startupProbe.initialDelaySeconds Initial delay seconds for startupProbe
919 ## @param secondary.startupProbe.periodSeconds Period seconds for startupProbe
920 ## @param secondary.startupProbe.timeoutSeconds Timeout seconds for startupProbe
921 ## @param secondary.startupProbe.failureThreshold Failure threshold for startupProbe
922 ## @param secondary.startupProbe.successThreshold Success threshold for startupProbe
926 initialDelaySeconds: 15
931 ## @param secondary.customLivenessProbe Override default liveness probe for MySQL secondary containers
933 customLivenessProbe: {}
934 ## @param secondary.customReadinessProbe Override default readiness probe for MySQL secondary containers
936 customReadinessProbe: {}
937 ## @param secondary.customStartupProbe Override default startup probe for MySQL secondary containers
939 customStartupProbe: {}
940 ## @param secondary.extraFlags MySQL secondary additional command line flags
941 ## Can be used to specify command line flags, for example:
943 ## extraFlags: "--max-connect-errors=1000 --max_connections=155"
946 ## @param secondary.extraEnvVars An array to add extra environment variables on MySQL secondary containers
950 ## value: "Europe/Paris"
953 ## @param secondary.extraEnvVarsCM Name of existing ConfigMap containing extra env vars for MySQL secondary containers
956 ## @param secondary.extraEnvVarsSecret Name of existing Secret containing extra env vars for MySQL secondary containers
958 extraEnvVarsSecret: ""
959 ## @param secondary.extraPodSpec Optionally specify extra PodSpec for the MySQL Secondary pod(s)
962 ## @param secondary.extraPorts Extra ports to expose
965 ## Enable persistence using Persistent Volume Claims
966 ## ref: https://kubernetes.io/docs/concepts/storage/persistent-volumes/
969 ## @param secondary.persistence.enabled Enable persistence on MySQL secondary replicas using a `PersistentVolumeClaim`
972 ## @param secondary.persistence.existingClaim Name of an existing `PersistentVolumeClaim` for MySQL secondary replicas
973 ## NOTE: When it's set the rest of persistence parameters are ignored
976 ## @param secondary.persistence.subPath The name of a volume's sub path to mount for persistence
979 ## @param secondary.persistence.storageClass MySQL secondary persistent volume storage Class
980 ## If defined, storageClassName: <storageClass>
981 ## If set to "-", storageClassName: "", which disables dynamic provisioning
982 ## If undefined (the default) or set to null, no storageClassName spec is
983 ## set, choosing the default provisioner. (gp2 on AWS, standard on
984 ## GKE, AWS & OpenStack)
987 ## @param secondary.persistence.annotations MySQL secondary persistent volume claim annotations
990 ## @param secondary.persistence.accessModes MySQL secondary persistent volume access Modes
994 ## @param secondary.persistence.size MySQL secondary persistent volume size
997 ## @param secondary.persistence.selector Selector to match an existing Persistent Volume
1003 ## Secondary Persistent Volume Claim Retention Policy
1004 ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#persistentvolumeclaim-retention
1006 persistentVolumeClaimRetentionPolicy:
1007 ## @param secondary.persistentVolumeClaimRetentionPolicy.enabled Enable Persistent volume retention policy for read only StatefulSet
1010 ## @param secondary.persistentVolumeClaimRetentionPolicy.whenScaled Volume retention behavior when the replica count of the StatefulSet is reduced
1013 ## @param secondary.persistentVolumeClaimRetentionPolicy.whenDeleted Volume retention behavior that applies when the StatefulSet is deleted
1016 ## @param secondary.extraVolumes Optionally specify extra list of additional volumes to the MySQL secondary pod(s)
1019 ## @param secondary.extraVolumeMounts Optionally specify extra list of additional volumeMounts for the MySQL secondary container(s)
1021 extraVolumeMounts: []
1022 ## @param secondary.initContainers Add additional init containers for the MySQL secondary pod(s)
1025 ## @param secondary.enableDefaultInitContainers enables (or disables if false) the default init containers (logs-symlinks, volume permissions)
1027 enableDefaultInitContainers: true
1028 ## @param secondary.sidecars Add additional sidecar containers for the MySQL secondary pod(s)
1031 ## MySQL Secondary Service parameters
1034 ## @param secondary.service.type MySQL secondary Kubernetes service type
1037 ## @param secondary.service.ports.mysql MySQL secondary Kubernetes service port
1038 ## @param secondary.service.ports.mysqlx MySQL secondary Kubernetes service port mysqlx
1043 ## @param secondary.service.nodePorts.mysql MySQL secondary Kubernetes service node port
1044 ## @param secondary.service.nodePorts.mysqlx MySQL secondary Kubernetes service node port mysqlx
1045 ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
1050 ## @param secondary.service.clusterIP MySQL secondary Kubernetes service clusterIP IP
1055 ## @param secondary.service.loadBalancerIP MySQL secondary loadBalancerIP if service type is `LoadBalancer`
1056 ## Set the LoadBalancer service type to internal only
1057 ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
1060 ## @param secondary.service.externalTrafficPolicy Enable client source IP preservation
1061 ## ref https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip
1064 ## @param secondary.service.externalIPs MySQL Secondary K8s service externalIPs
1065 ## ref https://kubernetes.io/docs/concepts/services-networking/service/#external-ips
1067 externalTrafficPolicy: Cluster
1068 ## @param secondary.service.loadBalancerSourceRanges Addresses that are allowed when MySQL secondary service is LoadBalancer
1069 ## https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service
1071 ## loadBalancerSourceRanges:
1074 loadBalancerSourceRanges: []
1075 ## @param secondary.service.extraPorts Extra ports to expose (normally used with the `sidecar` value)
1078 ## @param secondary.service.annotations Additional custom annotations for MySQL secondary service
1081 ## @param secondary.service.sessionAffinity Session Affinity for Kubernetes service, can be "None" or "ClientIP"
1082 ## If "ClientIP", consecutive client requests will be directed to the same Pod
1083 ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
1085 sessionAffinity: None
1086 ## @param secondary.service.sessionAffinityConfig Additional settings for the sessionAffinity
1087 ## sessionAffinityConfig:
1089 ## timeoutSeconds: 300
1091 sessionAffinityConfig: {}
1092 ## Headless service properties
1095 ## @param secondary.service.headless.annotations Additional custom annotations for headless MySQL secondary service.
1098 ## MySQL secondary Pod Disruption Budget configuration
1099 ## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb/
1102 ## @param secondary.pdb.create Enable/disable a Pod Disruption Budget creation for MySQL secondary pods
1105 ## @param secondary.pdb.minAvailable Minimum number/percentage of MySQL secondary pods that should remain scheduled
1108 ## @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.
1111 ## @param secondary.podLabels Additional pod labels for MySQL secondary pods
1114## @section RBAC parameters
1117## MySQL pods ServiceAccount
1118## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
1121 ## @param serviceAccount.create Enable the creation of a ServiceAccount for MySQL pods
1124 ## @param serviceAccount.name Name of the created ServiceAccount
1125 ## If not set and create is true, a name is generated using the mysql.fullname template
1128 ## @param serviceAccount.annotations Annotations for MySQL Service Account
1131 ## @param serviceAccount.automountServiceAccountToken Automount service account token for the server service account
1133 automountServiceAccountToken: false
1135## ref: https://kubernetes.io/docs/admin/authorization/rbac/
1138 ## @param rbac.create Whether to create & use RBAC resources or not
1141 ## @param rbac.rules Custom RBAC rules to set
1153## @section Network Policy
1156## Network Policy configuration
1157## ref: https://kubernetes.io/docs/concepts/services-networking/network-policies/
1160 ## @param networkPolicy.enabled Enable creation of NetworkPolicy resources
1163 ## @param networkPolicy.allowExternal The Policy model to apply
1164 ## When set to false, only pods with the correct client label will have network access to the ports MySQL is
1165 ## listening on. When true, MySQL will accept connections from any source (with the correct destination port).
1168 ## @param networkPolicy.allowExternalEgress Allow the pod to access any range of port and all destinations.
1170 allowExternalEgress: true
1171 ## @param networkPolicy.extraIngress [array] Add extra ingress rules to the NetworkPolicy
1181 ## - matchExpressions:
1188 ## @param networkPolicy.extraEgress [array] Add extra ingress rules to the NetworkPolicy
1198 ## - matchExpressions:
1205 ## @param networkPolicy.ingressNSMatchLabels [object] Labels to match to allow traffic from other namespaces
1206 ## @param networkPolicy.ingressNSPodMatchLabels [object] Pod labels to match to allow traffic from other namespaces
1208 ingressNSMatchLabels: {}
1209 ingressNSPodMatchLabels: {}
1210## @section Password update job
1213 ## @param passwordUpdateJob.enabled Enable password update job
1216 ## @param passwordUpdateJob.backoffLimit set backoff limit of the job
1219 ## @param passwordUpdateJob.command Override default container command on mysql Primary container(s) (useful when using custom images)
1222 ## @param passwordUpdateJob.args Override default container args on mysql Primary container(s) (useful when using custom images)
1225 ## @param passwordUpdateJob.extraCommands Extra commands to pass to the generation job
1228 ## @param passwordUpdateJob.previousPasswords.rootPassword Previous root password (set if the password secret was already changed)
1229 ## @param passwordUpdateJob.previousPasswords.password Previous password (set if the password secret was already changed)
1230 ## @param passwordUpdateJob.previousPasswords.replicationPassword Previous replication password (set if the password secret was already changed)
1231 ## @param passwordUpdateJob.previousPasswords.existingSecret Name of a secret containing the previous passwords (set if the password secret was already changed)
1235 replicationPassword: ""
1237 ## Configure Container Security Context
1238 ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container
1239 ## @param passwordUpdateJob.containerSecurityContext.enabled Enabled containers' Security Context
1240 ## @param passwordUpdateJob.containerSecurityContext.seLinuxOptions [object,nullable] Set SELinux options in container
1241 ## @param passwordUpdateJob.containerSecurityContext.runAsUser Set containers' Security Context runAsUser
1242 ## @param passwordUpdateJob.containerSecurityContext.runAsGroup Set containers' Security Context runAsGroup
1243 ## @param passwordUpdateJob.containerSecurityContext.runAsNonRoot Set container's Security Context runAsNonRoot
1244 ## @param passwordUpdateJob.containerSecurityContext.privileged Set container's Security Context privileged
1245 ## @param passwordUpdateJob.containerSecurityContext.readOnlyRootFilesystem Set container's Security Context readOnlyRootFilesystem
1246 ## @param passwordUpdateJob.containerSecurityContext.allowPrivilegeEscalation Set container's Security Context allowPrivilegeEscalation
1247 ## @param passwordUpdateJob.containerSecurityContext.capabilities.drop List of capabilities to be dropped
1248 ## @param passwordUpdateJob.containerSecurityContext.seccompProfile.type Set container's Security Context seccomp profile
1250 containerSecurityContext:
1257 readOnlyRootFilesystem: true
1258 allowPrivilegeEscalation: false
1262 type: "RuntimeDefault"
1263 ## Configure Pods Security Context
1264 ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod
1265 ## @param passwordUpdateJob.podSecurityContext.enabled Enabled credential init job pods' Security Context
1266 ## @param passwordUpdateJob.podSecurityContext.fsGroupChangePolicy Set filesystem group change policy
1267 ## @param passwordUpdateJob.podSecurityContext.sysctls Set kernel settings using the sysctl interface
1268 ## @param passwordUpdateJob.podSecurityContext.supplementalGroups Set filesystem extra groups
1269 ## @param passwordUpdateJob.podSecurityContext.fsGroup Set credential init job pod's Security Context fsGroup
1273 fsGroupChangePolicy: Always
1275 supplementalGroups: []
1277 ## @param passwordUpdateJob.extraEnvVars Array containing extra env vars to configure the credential init job
1280 ## - name: GF_DEFAULT_INSTANCE_NAME
1281 ## value: my-instance
1284 ## @param passwordUpdateJob.extraEnvVarsCM ConfigMap containing extra env vars to configure the credential init job
1287 ## @param passwordUpdateJob.extraEnvVarsSecret Secret containing extra env vars to configure the credential init job (in case of sensitive data)
1289 extraEnvVarsSecret: ""
1290 ## @param passwordUpdateJob.extraVolumes Optionally specify extra list of additional volumes for the credential init job
1293 ## @param passwordUpdateJob.extraVolumeMounts Array of extra volume mounts to be added to the jwt Container (evaluated as template). Normally used with `extraVolumes`.
1295 extraVolumeMounts: []
1296 ## @param passwordUpdateJob.initContainers Add additional init containers for the mysql Primary pod(s)
1299 ## Container resource requests and limits
1300 ## ref: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
1301 ## @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).
1303 resourcesPreset: "micro"
1304 ## @param passwordUpdateJob.resources Set container requests and limits for different resources like CPU or memory (essential for production workloads)
1315 ## @param passwordUpdateJob.customLivenessProbe Custom livenessProbe that overrides the default one
1317 customLivenessProbe: {}
1318 ## @param passwordUpdateJob.customReadinessProbe Custom readinessProbe that overrides the default one
1320 customReadinessProbe: {}
1321 ## @param passwordUpdateJob.customStartupProbe Custom startupProbe that overrides the default one
1323 customStartupProbe: {}
1324 ## @param passwordUpdateJob.automountServiceAccountToken Mount Service Account token in pod
1326 automountServiceAccountToken: false
1327 ## @param passwordUpdateJob.hostAliases Add deployment host aliases
1328 ## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/
1331 ## @param passwordUpdateJob.annotations [object] Add annotations to the job
1334 ## @param passwordUpdateJob.podLabels Additional pod labels
1335 ## Ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
1338 ## @param passwordUpdateJob.podAnnotations Additional pod annotations
1339 ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
1342## @section Volume Permissions parameters
1345## Init containers parameters:
1346## volumePermissions: Change the owner and group of the persistent volume mountpoint to runAsUser:fsGroup values from the securityContext section.
1349 ## @param volumePermissions.enabled Enable init container that changes the owner and group of the persistent volume(s) mountpoint to `runAsUser:fsGroup`
1352 ## @param volumePermissions.image.registry [default: REGISTRY_NAME] Init container volume-permissions image registry
1353 ## @param volumePermissions.image.repository [default: REPOSITORY_NAME/os-shell] Init container volume-permissions image repository
1354 ## @skip volumePermissions.image.tag Init container volume-permissions image tag (immutable tags are recommended)
1355 ## @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
1356 ## @param volumePermissions.image.pullPolicy Init container volume-permissions image pull policy
1357 ## @param volumePermissions.image.pullSecrets Specify docker-registry secret names as an array
1361 repository: chainguard-private/os-shell-iamguarded
1364 pullPolicy: IfNotPresent
1365 ## Optionally specify an array of imagePullSecrets.
1366 ## Secrets must be manually created in the namespace.
1367 ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
1370 ## - myRegistryKeySecretName
1373 ## @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).
1375 resourcesPreset: "nano"
1376 ## @param volumePermissions.resources Set container requests and limits for different resources like CPU or memory (essential for production workloads)
1387## @section Metrics parameters
1390## Mysqld Prometheus exporter parameters
1393 ## @param metrics.enabled Start a side-car prometheus exporter
1396 ## @param metrics.image.registry [default: REGISTRY_NAME] Exporter image registry
1397 ## @param metrics.image.repository [default: REPOSITORY_NAME/mysqld-exporter] Exporter image repository
1398 ## @skip metrics.image.tag Exporter image tag (immutable tags are recommended)
1399 ## @param metrics.image.digest Exporter image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag
1400 ## @param metrics.image.pullPolicy Exporter image pull policy
1401 ## @param metrics.image.pullSecrets Specify docker-registry secret names as an array
1405 repository: chainguard-private/prometheus-mysqld-exporter-iamguarded
1408 pullPolicy: IfNotPresent
1409 ## Optionally specify an array of imagePullSecrets.
1410 ## Secrets must be manually created in the namespace.
1411 ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
1414 ## - myRegistryKeySecretName
1417 ## MySQL metrics container security context
1418 ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container
1419 ## @param metrics.containerSecurityContext.enabled MySQL metrics container securityContext
1420 ## @param metrics.containerSecurityContext.seLinuxOptions [object,nullable] Set SELinux options in container
1421 ## @param metrics.containerSecurityContext.runAsUser User ID for the MySQL metrics container
1422 ## @param metrics.containerSecurityContext.runAsGroup Group ID for the MySQL metrics container
1423 ## @param metrics.containerSecurityContext.runAsNonRoot Set MySQL metrics container's Security Context runAsNonRoot
1424 ## @param metrics.containerSecurityContext.allowPrivilegeEscalation Set container's privilege escalation
1425 ## @param metrics.containerSecurityContext.capabilities.drop Set container's Security Context runAsNonRoot
1426 ## @param metrics.containerSecurityContext.seccompProfile.type Set container's Security Context seccomp profile
1427 ## @param metrics.containerSecurityContext.readOnlyRootFilesystem Set container's Security Context read-only root filesystem
1429 containerSecurityContext:
1435 allowPrivilegeEscalation: false
1439 type: "RuntimeDefault"
1440 readOnlyRootFilesystem: true
1441 ## @param metrics.containerPorts.http Container port for http
1445 ## MySQL Prometheus exporter service parameters
1446 ## Mysqld Prometheus exporter liveness and readiness probes
1447 ## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
1448 ## @param metrics.service.type Kubernetes service type for MySQL Prometheus Exporter
1449 ## @param metrics.service.clusterIP Kubernetes service clusterIP for MySQL Prometheus Exporter
1450 ## @param metrics.service.port MySQL Prometheus Exporter service port
1451 ## @param metrics.service.annotations [object] Prometheus exporter service annotations
1458 prometheus.io/scrape: "true"
1459 prometheus.io/port: "{{ .Values.metrics.service.port }}"
1460 ## @param metrics.extraArgs.primary Extra args to be passed to mysqld_exporter on Primary pods
1461 ## @param metrics.extraArgs.secondary Extra args to be passed to mysqld_exporter on Secondary pods
1462 ## ref: https://github.com/prometheus/mysqld_exporter/
1464 ## - --collect.auto_increment.columns
1465 ## - --collect.binlog_size
1466 ## - --collect.engine_innodb_status
1467 ## - --collect.engine_tokudb_status
1468 ## - --collect.global_status
1469 ## - --collect.global_variables
1470 ## - --collect.info_schema.clientstats
1471 ## - --collect.info_schema.innodb_metrics
1472 ## - --collect.info_schema.innodb_tablespaces
1473 ## - --collect.info_schema.innodb_cmp
1474 ## - --collect.info_schema.innodb_cmpmem
1475 ## - --collect.info_schema.processlist
1476 ## - --collect.info_schema.processlist.min_time
1477 ## - --collect.info_schema.query_response_time
1478 ## - --collect.info_schema.tables
1479 ## - --collect.info_schema.tables.databases
1480 ## - --collect.info_schema.tablestats
1481 ## - --collect.info_schema.userstats
1482 ## - --collect.perf_schema.eventsstatements
1483 ## - --collect.perf_schema.eventsstatements.digest_text_limit
1484 ## - --collect.perf_schema.eventsstatements.limit
1485 ## - --collect.perf_schema.eventsstatements.timelimit
1486 ## - --collect.perf_schema.eventswaits
1487 ## - --collect.perf_schema.file_events
1488 ## - --collect.perf_schema.file_instances
1489 ## - --collect.perf_schema.indexiowaits
1490 ## - --collect.perf_schema.tableiowaits
1491 ## - --collect.perf_schema.tablelocks
1492 ## - --collect.perf_schema.replication_group_member_stats
1493 ## - --collect.slave_status
1494 ## - --collect.slave_hosts
1495 ## - --collect.heartbeat
1496 ## - --collect.heartbeat.database
1497 ## - --collect.heartbeat.table
1502 ## Mysqld Prometheus exporter resource requests and limits
1503 ## ref: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
1504 ## We usually recommend not to specify default resources and to leave this as a conscious
1505 ## choice for the user. This also increases chances charts run on environments with little
1506 ## resources, such as Minikube. If you do want to specify resources, uncomment the following
1507 ## lines, adjust them as necessary, and remove the curly braces after 'resources:'.
1508 ## @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).
1510 resourcesPreset: "nano"
1511 ## @param metrics.resources Set container requests and limits for different resources like CPU or memory (essential for production workloads)
1522 ## Mysqld Prometheus exporter liveness probe
1523 ## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
1524 ## @param metrics.livenessProbe.enabled Enable livenessProbe
1525 ## @param metrics.livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe
1526 ## @param metrics.livenessProbe.periodSeconds Period seconds for livenessProbe
1527 ## @param metrics.livenessProbe.timeoutSeconds Timeout seconds for livenessProbe
1528 ## @param metrics.livenessProbe.failureThreshold Failure threshold for livenessProbe
1529 ## @param metrics.livenessProbe.successThreshold Success threshold for livenessProbe
1533 initialDelaySeconds: 120
1538 ## Mysqld Prometheus exporter readiness probe
1539 ## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
1540 ## @param metrics.readinessProbe.enabled Enable readinessProbe
1541 ## @param metrics.readinessProbe.initialDelaySeconds Initial delay seconds for readinessProbe
1542 ## @param metrics.readinessProbe.periodSeconds Period seconds for readinessProbe
1543 ## @param metrics.readinessProbe.timeoutSeconds Timeout seconds for readinessProbe
1544 ## @param metrics.readinessProbe.failureThreshold Failure threshold for readinessProbe
1545 ## @param metrics.readinessProbe.successThreshold Success threshold for readinessProbe
1549 initialDelaySeconds: 30
1554 ## Prometheus Service Monitor
1555 ## ref: https://github.com/coreos/prometheus-operator
1558 ## @param metrics.serviceMonitor.enabled Create ServiceMonitor Resource for scraping metrics using PrometheusOperator
1561 ## @param metrics.serviceMonitor.namespace Specify the namespace in which the serviceMonitor resource will be created
1564 ## @param metrics.serviceMonitor.jobLabel The name of the label on the target service to use as the job name in prometheus.
1567 ## @param metrics.serviceMonitor.interval Specify the interval at which metrics should be scraped
1570 ## @param metrics.serviceMonitor.scrapeTimeout Specify the timeout after which the scrape is ended
1572 ## scrapeTimeout: 30s
1575 ## @param metrics.serviceMonitor.relabelings RelabelConfigs to apply to samples before scraping
1576 ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#relabelconfig
1579 ## @param metrics.serviceMonitor.metricRelabelings MetricRelabelConfigs to apply to samples before ingestion
1580 ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#relabelconfig
1582 metricRelabelings: []
1583 ## @param metrics.serviceMonitor.selector ServiceMonitor selector labels
1586 ## prometheus: my-prometheus
1589 ## @param metrics.serviceMonitor.honorLabels Specify honorLabels parameter to add the scrape endpoint
1592 ## @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
1593 ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#prometheusspec
1596 ## @param metrics.serviceMonitor.annotations ServiceMonitor annotations
1599 ## Prometheus Operator prometheusRule configuration
1602 ## @param metrics.prometheusRule.enabled Creates a Prometheus Operator prometheusRule (also requires `metrics.enabled` to be `true` and `metrics.prometheusRule.rules`)
1605 ## @param metrics.prometheusRule.namespace Namespace for the prometheusRule Resource (defaults to the Release Namespace)
1608 ## @param metrics.prometheusRule.additionalLabels Additional labels that can be used so prometheusRule will be discovered by Prometheus
1610 additionalLabels: {}
1611 ## @param metrics.prometheusRule.rules Prometheus Rule definitions
1612 ## - alert: Mysql-Down
1613 ## expr: absent(up{job="mysql"} == 1)
1616 ## severity: warning
1619 ## message: 'mysql instance {{`{{`}} $labels.instance {{`}}`}} is down'
1620 ## summary: mysql instance is down