github.com/aquasecurity/trivy-iac@v0.8.1-0.20240127024015-3d8e412cf0ab/pkg/scanners/helm/test/mysql/README.md (about)

     1  <!--- app-name: MySQL -->
     2  
     3  # MySQL packaged by Bitnami
     4  
     5  MySQL is a fast, reliable, scalable, and easy to use open source relational database system. Designed to handle mission-critical, heavy-load production applications.
     6  
     7  [Overview of MySQL](http://www.mysql.com)
     8  
     9  Trademarks: This software listing is packaged by Bitnami. The respective trademarks mentioned in the offering are owned by the respective companies, and use of them does not imply any affiliation or endorsement.
    10                             
    11  ## TL;DR
    12  
    13  ```bash
    14  $ helm repo add bitnami https://charts.bitnami.com/bitnami
    15  $ helm install my-release bitnami/mysql
    16  ```
    17  
    18  ## Introduction
    19  
    20  This chart bootstraps a [MySQL](https://github.com/bitnami/bitnami-docker-mysql) replication cluster deployment on a [Kubernetes](https://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
    21  
    22  Bitnami charts can be used with [Kubeapps](https://kubeapps.com/) for deployment and management of Helm Charts in clusters. This Helm chart has been tested on top of [Bitnami Kubernetes Production Runtime](https://kubeprod.io/) (BKPR). Deploy BKPR to get automated TLS certificates, logging and monitoring for your applications.
    23  
    24  ## Prerequisites
    25  
    26  - Kubernetes 1.19+
    27  - Helm 3.2.0+
    28  - PV provisioner support in the underlying infrastructure
    29  
    30  ## Installing the Chart
    31  
    32  To install the chart with the release name `my-release`:
    33  
    34  ```bash
    35  $ helm repo add bitnami https://charts.bitnami.com/bitnami
    36  $ helm install my-release bitnami/mysql
    37  ```
    38  
    39  These commands deploy MySQL on the Kubernetes cluster in the default configuration. The [Parameters](#parameters) section lists the parameters that can be configured during installation.
    40  
    41  > **Tip**: List all releases using `helm list`
    42  
    43  ## Uninstalling the Chart
    44  
    45  To uninstall/delete the `my-release` deployment:
    46  
    47  ```bash
    48  $ helm delete my-release
    49  ```
    50  
    51  The command removes all the Kubernetes components associated with the chart and deletes the release.
    52  
    53  ## Parameters
    54  
    55  ### Global parameters
    56  
    57  | Name                      | Description                                     | Value |
    58  | ------------------------- | ----------------------------------------------- | ----- |
    59  | `global.imageRegistry`    | Global Docker image registry                    | `""`  |
    60  | `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]`  |
    61  | `global.storageClass`     | Global StorageClass for Persistent Volume(s)    | `""`  |
    62  
    63  
    64  ### Common parameters
    65  
    66  | Name                     | Description                                                                                               | Value           |
    67  | ------------------------ | --------------------------------------------------------------------------------------------------------- | --------------- |
    68  | `nameOverride`           | String to partially override common.names.fullname template (will maintain the release name)              | `""`            |
    69  | `fullnameOverride`       | String to fully override common.names.fullname template                                                   | `""`            |
    70  | `clusterDomain`          | Cluster domain                                                                                            | `cluster.local` |
    71  | `commonAnnotations`      | Common annotations to add to all MySQL resources (sub-charts are not considered). Evaluated as a template | `{}`            |
    72  | `commonLabels`           | Common labels to add to all MySQL resources (sub-charts are not considered). Evaluated as a template      | `{}`            |
    73  | `extraDeploy`            | Array with extra yaml to deploy with the chart. Evaluated as a template                                   | `[]`            |
    74  | `schedulerName`          | Use an alternate scheduler, e.g. "stork".                                                                 | `""`            |
    75  | `diagnosticMode.enabled` | Enable diagnostic mode (all probes will be disabled and the command will be overridden)                   | `false`         |
    76  | `diagnosticMode.command` | Command to override all containers in the deployment                                                      | `["sleep"]`     |
    77  | `diagnosticMode.args`    | Args to override all containers in the deployment                                                         | `["infinity"]`  |
    78  
    79  
    80  ### MySQL common parameters
    81  
    82  | Name                       | Description                                                                                                                                                                         | Value                 |
    83  | -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------- |
    84  | `image.registry`           | MySQL image registry                                                                                                                                                                | `docker.io`           |
    85  | `image.repository`         | MySQL image repository                                                                                                                                                              | `bitnami/mysql`       |
    86  | `image.tag`                | MySQL image tag (immutable tags are recommended)                                                                                                                                    | `8.0.28-debian-10-r0` |
    87  | `image.pullPolicy`         | MySQL image pull policy                                                                                                                                                             | `IfNotPresent`        |
    88  | `image.pullSecrets`        | Specify docker-registry secret names as an array                                                                                                                                    | `[]`                  |
    89  | `image.debug`              | Specify if debug logs should be enabled                                                                                                                                             | `false`               |
    90  | `architecture`             | MySQL architecture (`standalone` or `replication`)                                                                                                                                  | `standalone`          |
    91  | `auth.rootPassword`        | Password for the `root` user. Ignored if existing secret is provided                                                                                                                | `""`                  |
    92  | `auth.database`            | Name for a custom database to create                                                                                                                                                | `my_database`         |
    93  | `auth.username`            | Name for a custom user to create                                                                                                                                                    | `""`                  |
    94  | `auth.password`            | Password for the new user. Ignored if existing secret is provided                                                                                                                   | `""`                  |
    95  | `auth.replicationUser`     | MySQL replication user                                                                                                                                                              | `replicator`          |
    96  | `auth.replicationPassword` | MySQL replication user password. Ignored if existing secret is provided                                                                                                             | `""`                  |
    97  | `auth.existingSecret`      | Use existing secret for password details. The secret has to contain the keys `mysql-root-password`, `mysql-replication-password` and `mysql-password`                               | `""`                  |
    98  | `auth.forcePassword`       | Force users to specify required passwords                                                                                                                                           | `false`               |
    99  | `auth.usePasswordFiles`    | Mount credentials as files instead of using an environment variable                                                                                                                 | `false`               |
   100  | `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` | `{}`                  |
   101  | `initdbScripts`            | Dictionary of initdb scripts                                                                                                                                                        | `{}`                  |
   102  | `initdbScriptsConfigMap`   | ConfigMap with the initdb scripts (Note: Overrides `initdbScripts`)                                                                                                                 | `""`                  |
   103  
   104  
   105  ### MySQL Primary parameters
   106  
   107  | Name                                         | Description                                                                                                     | Value               |
   108  | -------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | ------------------- |
   109  | `primary.command`                            | Override default container command on MySQL Primary container(s) (useful when using custom images)              | `[]`                |
   110  | `primary.args`                               | Override default container args on MySQL Primary container(s) (useful when using custom images)                 | `[]`                |
   111  | `primary.hostAliases`                        | Deployment pod host aliases                                                                                     | `[]`                |
   112  | `primary.configuration`                      | Configure MySQL Primary with a custom my.cnf file                                                               | `""`                |
   113  | `primary.existingConfigmap`                  | Name of existing ConfigMap with MySQL Primary configuration.                                                    | `""`                |
   114  | `primary.updateStrategy`                     | Update strategy type for the MySQL primary statefulset                                                          | `RollingUpdate`     |
   115  | `primary.rollingUpdatePartition`             | Partition update strategy for MySQL Primary statefulset                                                         | `""`                |
   116  | `primary.podAnnotations`                     | Additional pod annotations for MySQL primary pods                                                               | `{}`                |
   117  | `primary.podAffinityPreset`                  | MySQL primary pod affinity preset. Ignored if `primary.affinity` is set. Allowed values: `soft` or `hard`       | `""`                |
   118  | `primary.podAntiAffinityPreset`              | MySQL primary pod anti-affinity preset. Ignored if `primary.affinity` is set. Allowed values: `soft` or `hard`  | `soft`              |
   119  | `primary.nodeAffinityPreset.type`            | MySQL primary node affinity preset type. Ignored if `primary.affinity` is set. Allowed values: `soft` or `hard` | `""`                |
   120  | `primary.nodeAffinityPreset.key`             | MySQL primary node label key to match Ignored if `primary.affinity` is set.                                     | `""`                |
   121  | `primary.nodeAffinityPreset.values`          | MySQL primary node label values to match. Ignored if `primary.affinity` is set.                                 | `[]`                |
   122  | `primary.affinity`                           | Affinity for MySQL primary pods assignment                                                                      | `{}`                |
   123  | `primary.nodeSelector`                       | Node labels for MySQL primary pods assignment                                                                   | `{}`                |
   124  | `primary.tolerations`                        | Tolerations for MySQL primary pods assignment                                                                   | `[]`                |
   125  | `primary.podSecurityContext.enabled`         | Enable security context for MySQL primary pods                                                                  | `true`              |
   126  | `primary.podSecurityContext.fsGroup`         | Group ID for the mounted volumes' filesystem                                                                    | `1001`              |
   127  | `primary.containerSecurityContext.enabled`   | MySQL primary container securityContext                                                                         | `true`              |
   128  | `primary.containerSecurityContext.runAsUser` | User ID for the MySQL primary container                                                                         | `1001`              |
   129  | `primary.resources.limits`                   | The resources limits for MySQL primary containers                                                               | `{}`                |
   130  | `primary.resources.requests`                 | The requested resources for MySQL primary containers                                                            | `{}`                |
   131  | `primary.livenessProbe.enabled`              | Enable livenessProbe                                                                                            | `true`              |
   132  | `primary.livenessProbe.initialDelaySeconds`  | Initial delay seconds for livenessProbe                                                                         | `5`                 |
   133  | `primary.livenessProbe.periodSeconds`        | Period seconds for livenessProbe                                                                                | `10`                |
   134  | `primary.livenessProbe.timeoutSeconds`       | Timeout seconds for livenessProbe                                                                               | `1`                 |
   135  | `primary.livenessProbe.failureThreshold`     | Failure threshold for livenessProbe                                                                             | `3`                 |
   136  | `primary.livenessProbe.successThreshold`     | Success threshold for livenessProbe                                                                             | `1`                 |
   137  | `primary.readinessProbe.enabled`             | Enable readinessProbe                                                                                           | `true`              |
   138  | `primary.readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe                                                                        | `5`                 |
   139  | `primary.readinessProbe.periodSeconds`       | Period seconds for readinessProbe                                                                               | `10`                |
   140  | `primary.readinessProbe.timeoutSeconds`      | Timeout seconds for readinessProbe                                                                              | `1`                 |
   141  | `primary.readinessProbe.failureThreshold`    | Failure threshold for readinessProbe                                                                            | `3`                 |
   142  | `primary.readinessProbe.successThreshold`    | Success threshold for readinessProbe                                                                            | `1`                 |
   143  | `primary.startupProbe.enabled`               | Enable startupProbe                                                                                             | `true`              |
   144  | `primary.startupProbe.initialDelaySeconds`   | Initial delay seconds for startupProbe                                                                          | `15`                |
   145  | `primary.startupProbe.periodSeconds`         | Period seconds for startupProbe                                                                                 | `10`                |
   146  | `primary.startupProbe.timeoutSeconds`        | Timeout seconds for startupProbe                                                                                | `1`                 |
   147  | `primary.startupProbe.failureThreshold`      | Failure threshold for startupProbe                                                                              | `10`                |
   148  | `primary.startupProbe.successThreshold`      | Success threshold for startupProbe                                                                              | `1`                 |
   149  | `primary.customLivenessProbe`                | Override default liveness probe for MySQL primary containers                                                    | `{}`                |
   150  | `primary.customReadinessProbe`               | Override default readiness probe for MySQL primary containers                                                   | `{}`                |
   151  | `primary.customStartupProbe`                 | Override default startup probe for MySQL primary containers                                                     | `{}`                |
   152  | `primary.extraFlags`                         | MySQL primary additional command line flags                                                                     | `""`                |
   153  | `primary.extraEnvVars`                       | Extra environment variables to be set on MySQL primary containers                                               | `[]`                |
   154  | `primary.extraEnvVarsCM`                     | Name of existing ConfigMap containing extra env vars for MySQL primary containers                               | `""`                |
   155  | `primary.extraEnvVarsSecret`                 | Name of existing Secret containing extra env vars for MySQL primary containers                                  | `""`                |
   156  | `primary.persistence.enabled`                | Enable persistence on MySQL primary replicas using a `PersistentVolumeClaim`. If false, use emptyDir            | `true`              |
   157  | `primary.persistence.existingClaim`          | Name of an existing `PersistentVolumeClaim` for MySQL primary replicas                                          | `""`                |
   158  | `primary.persistence.storageClass`           | MySQL primary persistent volume storage Class                                                                   | `""`                |
   159  | `primary.persistence.annotations`            | MySQL primary persistent volume claim annotations                                                               | `{}`                |
   160  | `primary.persistence.accessModes`            | MySQL primary persistent volume access Modes                                                                    | `["ReadWriteOnce"]` |
   161  | `primary.persistence.size`                   | MySQL primary persistent volume size                                                                            | `8Gi`               |
   162  | `primary.persistence.selector`               | Selector to match an existing Persistent Volume                                                                 | `{}`                |
   163  | `primary.extraVolumes`                       | Optionally specify extra list of additional volumes to the MySQL Primary pod(s)                                 | `[]`                |
   164  | `primary.extraVolumeMounts`                  | Optionally specify extra list of additional volumeMounts for the MySQL Primary container(s)                     | `[]`                |
   165  | `primary.initContainers`                     | Add additional init containers for the MySQL Primary pod(s)                                                     | `[]`                |
   166  | `primary.sidecars`                           | Add additional sidecar containers for the MySQL Primary pod(s)                                                  | `[]`                |
   167  | `primary.service.type`                       | MySQL Primary K8s service type                                                                                  | `ClusterIP`         |
   168  | `primary.service.port`                       | MySQL Primary K8s service port                                                                                  | `3306`              |
   169  | `primary.service.nodePort`                   | MySQL Primary K8s service node port                                                                             | `""`                |
   170  | `primary.service.clusterIP`                  | MySQL Primary K8s service clusterIP IP                                                                          | `""`                |
   171  | `primary.service.loadBalancerIP`             | MySQL Primary loadBalancerIP if service type is `LoadBalancer`                                                  | `""`                |
   172  | `primary.service.externalTrafficPolicy`      | Enable client source IP preservation                                                                            | `Cluster`           |
   173  | `primary.service.loadBalancerSourceRanges`   | Addresses that are allowed when MySQL Primary service is LoadBalancer                                           | `[]`                |
   174  | `primary.service.annotations`                | Provide any additional annotations which may be required                                                        | `{}`                |
   175  | `primary.pdb.enabled`                        | Enable/disable a Pod Disruption Budget creation for MySQL primary pods                                          | `false`             |
   176  | `primary.pdb.minAvailable`                   | Minimum number/percentage of MySQL primary pods that should remain scheduled                                    | `1`                 |
   177  | `primary.pdb.maxUnavailable`                 | Maximum number/percentage of MySQL primary pods that may be made unavailable                                    | `""`                |
   178  | `primary.podLabels`                          | MySQL Primary pod label. If labels are same as commonLabels , this will take precedence                         | `{}`                |
   179  
   180  
   181  ### MySQL Secondary parameters
   182  
   183  | Name                                           | Description                                                                                                         | Value               |
   184  | ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------- |
   185  | `secondary.replicaCount`                       | Number of MySQL secondary replicas                                                                                  | `1`                 |
   186  | `secondary.hostAliases`                        | Deployment pod host aliases                                                                                         | `[]`                |
   187  | `secondary.command`                            | Override default container command on MySQL Secondary container(s) (useful when using custom images)                | `[]`                |
   188  | `secondary.args`                               | Override default container args on MySQL Secondary container(s) (useful when using custom images)                   | `[]`                |
   189  | `secondary.configuration`                      | Configure MySQL Secondary with a custom my.cnf file                                                                 | `""`                |
   190  | `secondary.existingConfigmap`                  | Name of existing ConfigMap with MySQL Secondary configuration.                                                      | `""`                |
   191  | `secondary.updateStrategy`                     | Update strategy type for the MySQL secondary statefulset                                                            | `RollingUpdate`     |
   192  | `secondary.rollingUpdatePartition`             | Partition update strategy for MySQL Secondary statefulset                                                           | `""`                |
   193  | `secondary.podAnnotations`                     | Additional pod annotations for MySQL secondary pods                                                                 | `{}`                |
   194  | `secondary.podAffinityPreset`                  | MySQL secondary pod affinity preset. Ignored if `secondary.affinity` is set. Allowed values: `soft` or `hard`       | `""`                |
   195  | `secondary.podAntiAffinityPreset`              | MySQL secondary pod anti-affinity preset. Ignored if `secondary.affinity` is set. Allowed values: `soft` or `hard`  | `soft`              |
   196  | `secondary.nodeAffinityPreset.type`            | MySQL secondary node affinity preset type. Ignored if `secondary.affinity` is set. Allowed values: `soft` or `hard` | `""`                |
   197  | `secondary.nodeAffinityPreset.key`             | MySQL secondary node label key to match Ignored if `secondary.affinity` is set.                                     | `""`                |
   198  | `secondary.nodeAffinityPreset.values`          | MySQL secondary node label values to match. Ignored if `secondary.affinity` is set.                                 | `[]`                |
   199  | `secondary.affinity`                           | Affinity for MySQL secondary pods assignment                                                                        | `{}`                |
   200  | `secondary.nodeSelector`                       | Node labels for MySQL secondary pods assignment                                                                     | `{}`                |
   201  | `secondary.tolerations`                        | Tolerations for MySQL secondary pods assignment                                                                     | `[]`                |
   202  | `secondary.podSecurityContext.enabled`         | Enable security context for MySQL secondary pods                                                                    | `true`              |
   203  | `secondary.podSecurityContext.fsGroup`         | Group ID for the mounted volumes' filesystem                                                                        | `1001`              |
   204  | `secondary.containerSecurityContext.enabled`   | MySQL secondary container securityContext                                                                           | `true`              |
   205  | `secondary.containerSecurityContext.runAsUser` | User ID for the MySQL secondary container                                                                           | `1001`              |
   206  | `secondary.resources.limits`                   | The resources limits for MySQL secondary containers                                                                 | `{}`                |
   207  | `secondary.resources.requests`                 | The requested resources for MySQL secondary containers                                                              | `{}`                |
   208  | `secondary.livenessProbe.enabled`              | Enable livenessProbe                                                                                                | `true`              |
   209  | `secondary.livenessProbe.initialDelaySeconds`  | Initial delay seconds for livenessProbe                                                                             | `5`                 |
   210  | `secondary.livenessProbe.periodSeconds`        | Period seconds for livenessProbe                                                                                    | `10`                |
   211  | `secondary.livenessProbe.timeoutSeconds`       | Timeout seconds for livenessProbe                                                                                   | `1`                 |
   212  | `secondary.livenessProbe.failureThreshold`     | Failure threshold for livenessProbe                                                                                 | `3`                 |
   213  | `secondary.livenessProbe.successThreshold`     | Success threshold for livenessProbe                                                                                 | `1`                 |
   214  | `secondary.readinessProbe.enabled`             | Enable readinessProbe                                                                                               | `true`              |
   215  | `secondary.readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe                                                                            | `5`                 |
   216  | `secondary.readinessProbe.periodSeconds`       | Period seconds for readinessProbe                                                                                   | `10`                |
   217  | `secondary.readinessProbe.timeoutSeconds`      | Timeout seconds for readinessProbe                                                                                  | `1`                 |
   218  | `secondary.readinessProbe.failureThreshold`    | Failure threshold for readinessProbe                                                                                | `3`                 |
   219  | `secondary.readinessProbe.successThreshold`    | Success threshold for readinessProbe                                                                                | `1`                 |
   220  | `secondary.startupProbe.enabled`               | Enable startupProbe                                                                                                 | `true`              |
   221  | `secondary.startupProbe.initialDelaySeconds`   | Initial delay seconds for startupProbe                                                                              | `15`                |
   222  | `secondary.startupProbe.periodSeconds`         | Period seconds for startupProbe                                                                                     | `10`                |
   223  | `secondary.startupProbe.timeoutSeconds`        | Timeout seconds for startupProbe                                                                                    | `1`                 |
   224  | `secondary.startupProbe.failureThreshold`      | Failure threshold for startupProbe                                                                                  | `15`                |
   225  | `secondary.startupProbe.successThreshold`      | Success threshold for startupProbe                                                                                  | `1`                 |
   226  | `secondary.customLivenessProbe`                | Override default liveness probe for MySQL secondary containers                                                      | `{}`                |
   227  | `secondary.customReadinessProbe`               | Override default readiness probe for MySQL secondary containers                                                     | `{}`                |
   228  | `secondary.customStartupProbe`                 | Override default startup probe for MySQL secondary containers                                                       | `{}`                |
   229  | `secondary.extraFlags`                         | MySQL secondary additional command line flags                                                                       | `""`                |
   230  | `secondary.extraEnvVars`                       | An array to add extra environment variables on MySQL secondary containers                                           | `[]`                |
   231  | `secondary.extraEnvVarsCM`                     | Name of existing ConfigMap containing extra env vars for MySQL secondary containers                                 | `""`                |
   232  | `secondary.extraEnvVarsSecret`                 | Name of existing Secret containing extra env vars for MySQL secondary containers                                    | `""`                |
   233  | `secondary.persistence.enabled`                | Enable persistence on MySQL secondary replicas using a `PersistentVolumeClaim`                                      | `true`              |
   234  | `secondary.persistence.storageClass`           | MySQL secondary persistent volume storage Class                                                                     | `""`                |
   235  | `secondary.persistence.annotations`            | MySQL secondary persistent volume claim annotations                                                                 | `{}`                |
   236  | `secondary.persistence.accessModes`            | MySQL secondary persistent volume access Modes                                                                      | `["ReadWriteOnce"]` |
   237  | `secondary.persistence.size`                   | MySQL secondary persistent volume size                                                                              | `8Gi`               |
   238  | `secondary.persistence.selector`               | Selector to match an existing Persistent Volume                                                                     | `{}`                |
   239  | `secondary.extraVolumes`                       | Optionally specify extra list of additional volumes to the MySQL secondary pod(s)                                   | `[]`                |
   240  | `secondary.extraVolumeMounts`                  | Optionally specify extra list of additional volumeMounts for the MySQL secondary container(s)                       | `[]`                |
   241  | `secondary.initContainers`                     | Add additional init containers for the MySQL secondary pod(s)                                                       | `[]`                |
   242  | `secondary.sidecars`                           | Add additional sidecar containers for the MySQL secondary pod(s)                                                    | `[]`                |
   243  | `secondary.service.type`                       | MySQL secondary Kubernetes service type                                                                             | `ClusterIP`         |
   244  | `secondary.service.port`                       | MySQL secondary Kubernetes service port                                                                             | `3306`              |
   245  | `secondary.service.nodePort`                   | MySQL secondary Kubernetes service node port                                                                        | `""`                |
   246  | `secondary.service.clusterIP`                  | MySQL secondary Kubernetes service clusterIP IP                                                                     | `""`                |
   247  | `secondary.service.loadBalancerIP`             | MySQL secondary loadBalancerIP if service type is `LoadBalancer`                                                    | `""`                |
   248  | `secondary.service.externalTrafficPolicy`      | Enable client source IP preservation                                                                                | `Cluster`           |
   249  | `secondary.service.loadBalancerSourceRanges`   | Addresses that are allowed when MySQL secondary service is LoadBalancer                                             | `[]`                |
   250  | `secondary.service.annotations`                | Provide any additional annotations which may be required                                                            | `{}`                |
   251  | `secondary.pdb.enabled`                        | Enable/disable a Pod Disruption Budget creation for MySQL secondary pods                                            | `false`             |
   252  | `secondary.pdb.minAvailable`                   | Minimum number/percentage of MySQL secondary pods that should remain scheduled                                      | `1`                 |
   253  | `secondary.pdb.maxUnavailable`                 | Maximum number/percentage of MySQL secondary pods that may be made unavailable                                      | `""`                |
   254  | `secondary.podLabels`                          | Additional pod labels for MySQL secondary pods                                                                      | `{}`                |
   255  
   256  
   257  ### RBAC parameters
   258  
   259  | Name                         | Description                                            | Value   |
   260  | ---------------------------- | ------------------------------------------------------ | ------- |
   261  | `serviceAccount.create`      | Enable the creation of a ServiceAccount for MySQL pods | `true`  |
   262  | `serviceAccount.name`        | Name of the created ServiceAccount                     | `""`    |
   263  | `serviceAccount.annotations` | Annotations for MySQL Service Account                  | `{}`    |
   264  | `rbac.create`                | Whether to create & use RBAC resources or not          | `false` |
   265  
   266  
   267  ### Network Policy
   268  
   269  | Name                                       | Description                                                                                                     | Value   |
   270  | ------------------------------------------ | --------------------------------------------------------------------------------------------------------------- | ------- |
   271  | `networkPolicy.enabled`                    | Enable creation of NetworkPolicy resources                                                                      | `false` |
   272  | `networkPolicy.allowExternal`              | The Policy model to apply.                                                                                      | `true`  |
   273  | `networkPolicy.explicitNamespacesSelector` | A Kubernetes LabelSelector to explicitly select namespaces from which ingress traffic could be allowed to MySQL | `{}`    |
   274  
   275  
   276  ### Volume Permissions parameters
   277  
   278  | Name                                  | Description                                                                                                          | Value                   |
   279  | ------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | ----------------------- |
   280  | `volumePermissions.enabled`           | Enable init container that changes the owner and group of the persistent volume(s) mountpoint to `runAsUser:fsGroup` | `false`                 |
   281  | `volumePermissions.image.registry`    | Init container volume-permissions image registry                                                                     | `docker.io`             |
   282  | `volumePermissions.image.repository`  | Init container volume-permissions image repository                                                                   | `bitnami/bitnami-shell` |
   283  | `volumePermissions.image.tag`         | Init container volume-permissions image tag (immutable tags are recommended)                                         | `10-debian-10-r312`     |
   284  | `volumePermissions.image.pullPolicy`  | Init container volume-permissions image pull policy                                                                  | `IfNotPresent`          |
   285  | `volumePermissions.image.pullSecrets` | Specify docker-registry secret names as an array                                                                     | `[]`                    |
   286  | `volumePermissions.resources`         | Init container volume-permissions resources                                                                          | `{}`                    |
   287  
   288  
   289  ### Metrics parameters
   290  
   291  | Name                                         | Description                                                                                                           | Value                     |
   292  | -------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | ------------------------- |
   293  | `metrics.enabled`                            | Start a side-car prometheus exporter                                                                                  | `false`                   |
   294  | `metrics.image.registry`                     | Exporter image registry                                                                                               | `docker.io`               |
   295  | `metrics.image.repository`                   | Exporter image repository                                                                                             | `bitnami/mysqld-exporter` |
   296  | `metrics.image.tag`                          | Exporter image tag (immutable tags are recommended)                                                                   | `0.13.0-debian-10-r216`   |
   297  | `metrics.image.pullPolicy`                   | Exporter image pull policy                                                                                            | `IfNotPresent`            |
   298  | `metrics.image.pullSecrets`                  | Specify docker-registry secret names as an array                                                                      | `[]`                      |
   299  | `metrics.service.type`                       | Kubernetes service type for MySQL Prometheus Exporter                                                                 | `ClusterIP`               |
   300  | `metrics.service.port`                       | MySQL Prometheus Exporter service port                                                                                | `9104`                    |
   301  | `metrics.service.annotations`                | Prometheus exporter service annotations                                                                               | `{}`                      |
   302  | `metrics.extraArgs.primary`                  | Extra args to be passed to mysqld_exporter on Primary pods                                                            | `[]`                      |
   303  | `metrics.extraArgs.secondary`                | Extra args to be passed to mysqld_exporter on Secondary pods                                                          | `[]`                      |
   304  | `metrics.resources.limits`                   | The resources limits for MySQL prometheus exporter containers                                                         | `{}`                      |
   305  | `metrics.resources.requests`                 | The requested resources for MySQL prometheus exporter containers                                                      | `{}`                      |
   306  | `metrics.livenessProbe.enabled`              | Enable livenessProbe                                                                                                  | `true`                    |
   307  | `metrics.livenessProbe.initialDelaySeconds`  | Initial delay seconds for livenessProbe                                                                               | `120`                     |
   308  | `metrics.livenessProbe.periodSeconds`        | Period seconds for livenessProbe                                                                                      | `10`                      |
   309  | `metrics.livenessProbe.timeoutSeconds`       | Timeout seconds for livenessProbe                                                                                     | `1`                       |
   310  | `metrics.livenessProbe.failureThreshold`     | Failure threshold for livenessProbe                                                                                   | `3`                       |
   311  | `metrics.livenessProbe.successThreshold`     | Success threshold for livenessProbe                                                                                   | `1`                       |
   312  | `metrics.readinessProbe.enabled`             | Enable readinessProbe                                                                                                 | `true`                    |
   313  | `metrics.readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe                                                                              | `30`                      |
   314  | `metrics.readinessProbe.periodSeconds`       | Period seconds for readinessProbe                                                                                     | `10`                      |
   315  | `metrics.readinessProbe.timeoutSeconds`      | Timeout seconds for readinessProbe                                                                                    | `1`                       |
   316  | `metrics.readinessProbe.failureThreshold`    | Failure threshold for readinessProbe                                                                                  | `3`                       |
   317  | `metrics.readinessProbe.successThreshold`    | Success threshold for readinessProbe                                                                                  | `1`                       |
   318  | `metrics.serviceMonitor.enabled`             | Create ServiceMonitor Resource for scraping metrics using PrometheusOperator                                          | `false`                   |
   319  | `metrics.serviceMonitor.namespace`           | Specify the namespace in which the serviceMonitor resource will be created                                            | `""`                      |
   320  | `metrics.serviceMonitor.interval`            | Specify the interval at which metrics should be scraped                                                               | `30s`                     |
   321  | `metrics.serviceMonitor.scrapeTimeout`       | Specify the timeout after which the scrape is ended                                                                   | `""`                      |
   322  | `metrics.serviceMonitor.relabellings`        | Specify Metric Relabellings to add to the scrape endpoint                                                             | `[]`                      |
   323  | `metrics.serviceMonitor.honorLabels`         | Specify honorLabels parameter to add the scrape endpoint                                                              | `false`                   |
   324  | `metrics.serviceMonitor.additionalLabels`    | Used to pass Labels that are used by the Prometheus installed in your cluster to select Service Monitors to work with | `{}`                      |
   325  
   326  
   327  The above parameters map to the env variables defined in [bitnami/mysql](https://github.com/bitnami/bitnami-docker-mysql). For more information please refer to the [bitnami/mysql](https://github.com/bitnami/bitnami-docker-mysql) image documentation.
   328  
   329  Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
   330  
   331  ```bash
   332  $ helm install my-release \
   333    --set auth.rootPassword=secretpassword,auth.database=app_database \
   334      bitnami/mysql
   335  ```
   336  
   337  The above command sets the MySQL `root` account password to `secretpassword`. Additionally it creates a database named `app_database`.
   338  
   339  > NOTE: Once this chart is deployed, it is not possible to change the application's access credentials, such as usernames or passwords, using Helm. To change these application credentials after deployment, delete any persistent volumes (PVs) used by the chart and re-deploy it, or use the application's built-in administrative tools if available.
   340  
   341  Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,
   342  
   343  ```bash
   344  $ helm install my-release -f values.yaml bitnami/mysql
   345  ```
   346  
   347  > **Tip**: You can use the default [values.yaml](values.yaml)
   348  
   349  ## Configuration and installation details
   350  
   351  ### [Rolling VS Immutable tags](https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/)
   352  
   353  It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image.
   354  
   355  Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist.
   356  
   357  ### Use a different MySQL version
   358  
   359  To modify the application version used in this chart, specify a different version of the image using the `image.tag` parameter and/or a different repository using the `image.repository` parameter. Refer to the [chart documentation for more information on these parameters and how to use them with images from a private registry](https://docs.bitnami.com/kubernetes/infrastructure/mysql/configuration/change-image-version/).
   360  
   361  ### Customize a new MySQL instance
   362  
   363  The [Bitnami MySQL](https://github.com/bitnami/bitnami-docker-mysql) image allows you to use your custom scripts to initialize a fresh instance. Custom scripts may be specified using the `initdbScripts` parameter. Alternatively, an external ConfigMap may be created with all the initialization scripts and the ConfigMap passed to the chart via the `initdbScriptsConfigMap` parameter. Note that this will override the `initdbScripts` parameter.
   364  
   365  The allowed extensions are `.sh`, `.sql` and `.sql.gz`.
   366  
   367  These scripts are treated differently depending on their extension. While `.sh` scripts are executed on all the nodes, `.sql` and `.sql.gz` scripts are only executed on the primary nodes. This is because `.sh` scripts support conditional tests to identify the type of node they are running on, while such tests are not supported in `.sql` or `sql.gz` files.
   368  
   369  Refer to the [chart documentation for more information and a usage example](http://docs.bitnami.com/kubernetes/infrastructure/mysql/configuration/customize-new-instance/).
   370  
   371  ### Sidecars and Init Containers
   372  
   373  If you have a need for additional containers to run within the same pod as MySQL, you can do so via the `sidecars` config parameter. Simply define your container according to the Kubernetes container spec.
   374  
   375  ```yaml
   376  sidecars:
   377    - name: your-image-name
   378      image: your-image
   379      imagePullPolicy: Always
   380      ports:
   381        - name: portname
   382         containerPort: 1234
   383  ```
   384  
   385  Similarly, you can add extra init containers using the `initContainers` parameter.
   386  
   387  ```yaml
   388  initContainers:
   389    - name: your-image-name
   390      image: your-image
   391      imagePullPolicy: Always
   392      ports:
   393        - name: portname
   394          containerPort: 1234
   395  ```
   396  
   397  ## Persistence
   398  
   399  The [Bitnami MySQL](https://github.com/bitnami/bitnami-docker-mysql) image stores the MySQL data and configurations at the `/bitnami/mysql` path of the container.
   400  
   401  The chart mounts a [Persistent Volume](https://kubernetes.io/docs/concepts/storage/persistent-volumes/) volume at this location. The volume is created using dynamic volume provisioning by default. An existing PersistentVolumeClaim can also be defined for this purpose.
   402  
   403  If you encounter errors when working with persistent volumes, refer to our [troubleshooting guide for persistent volumes](https://docs.bitnami.com/kubernetes/faq/troubleshooting/troubleshooting-persistence-volumes/).
   404  
   405  ## Network Policy
   406  
   407  To enable network policy for MySQL, install [a networking plugin that implements the Kubernetes NetworkPolicy spec](https://kubernetes.io/docs/tasks/administer-cluster/declare-network-policy#before-you-begin), and set `networkPolicy.enabled` to `true`.
   408  
   409  For Kubernetes v1.5 & v1.6, you must also turn on NetworkPolicy by setting the DefaultDeny namespace annotation. Note: this will enforce policy for _all_ pods in the namespace:
   410  
   411  ```console
   412  $ kubectl annotate namespace default "net.beta.kubernetes.io/network-policy={\"ingress\":{\"isolation\":\"DefaultDeny\"}}"
   413  ```
   414  
   415  With NetworkPolicy enabled, traffic will be limited to just port 3306.
   416  
   417  For more precise policy, set `networkPolicy.allowExternal=false`. This will only allow pods with the generated client label to connect to MySQL.
   418  This label will be displayed in the output of a successful install.
   419  
   420  ## Pod affinity
   421  
   422  This chart allows you to set your custom affinity using the `XXX.affinity` parameter(s). Find more information about Pod affinity in the [Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity).
   423  
   424  As an alternative, you can use the preset configurations for pod affinity, pod anti-affinity, and node affinity available at the [bitnami/common](https://github.com/bitnami/charts/tree/master/bitnami/common#affinities) chart. To do so, set the `XXX.podAffinityPreset`, `XXX.podAntiAffinityPreset`, or `XXX.nodeAffinityPreset` parameters.
   425  
   426  ## Troubleshooting
   427  
   428  Find more information about how to deal with common errors related to Bitnami's Helm charts in [this troubleshooting guide](https://docs.bitnami.com/general/how-to/troubleshoot-helm-chart-issues).
   429  
   430  ## Upgrading
   431  
   432  It's necessary to set the `auth.rootPassword` parameter when upgrading for readiness/liveness probes to work properly. When you install this chart for the first time, some notes will be displayed providing the credentials you must use under the 'Administrator credentials' section. Please note down the password and run the command below to upgrade your chart:
   433  
   434  ```bash
   435  $ helm upgrade my-release bitnami/mysql --set auth.rootPassword=[ROOT_PASSWORD]
   436  ```
   437  
   438  | Note: you need to substitute the placeholder _[ROOT_PASSWORD]_ with the value obtained in the installation notes.
   439  
   440  ### To 8.0.0
   441  
   442  - Several parameters were renamed or disappeared in favor of new ones on this major version:
   443    - The terms *master* and *slave* have been replaced by the terms *primary* and *secondary*. Therefore, parameters prefixed with `master` or `slave` are now prefixed with `primary` or `secondary`, respectively.
   444    - Credentials parameters are reorganized under the `auth` parameter.
   445    - `replication.enabled` parameter is deprecated in favor of `architecture` parameter that accepts two values: `standalone` and `replication`.
   446  - Chart labels were adapted to follow the [Helm charts standard labels](https://helm.sh/docs/chart_best_practices/labels/#standard-labels).
   447  - This version also introduces `bitnami/common`, a [library chart](https://helm.sh/docs/topics/library_charts/#helm) as a dependency. More documentation about this new utility could be found [here](https://github.com/bitnami/charts/tree/master/bitnami/common#bitnami-common-library-chart). Please, make sure that you have updated the chart dependencies before executing any upgrade.
   448  
   449  Consequences:
   450  
   451  - Backwards compatibility is not guaranteed. To upgrade to `8.0.0`, install a new release of the MySQL chart, and migrate the data from your previous release. You have 2 alternatives to do so:
   452    - Create a backup of the database, and restore it on the new release using tools such as [mysqldump](https://dev.mysql.com/doc/refman/8.0/en/mysqldump.html).
   453    - Reuse the PVC used to hold the master data on your previous release. To do so, use the `primary.persistence.existingClaim` parameter. The following example assumes that the release name is `mysql`:
   454  
   455  ```bash
   456  $ helm install mysql bitnami/mysql --set auth.rootPassword=[ROOT_PASSWORD] --set primary.persistence.existingClaim=[EXISTING_PVC]
   457  ```
   458  
   459  | Note: you need to substitute the placeholder _[EXISTING_PVC]_ with the name of the PVC used on your previous release, and _[ROOT_PASSWORD]_ with the root password used in your previous release.
   460  
   461  ### To 7.0.0
   462  
   463  [On November 13, 2020, Helm v2 support formally ended](https://github.com/helm/charts#status-of-the-project). This major version is the result of the required changes applied to the Helm Chart to be able to incorporate the different features added in Helm v3 and to be consistent with the Helm project itself regarding the Helm v2 EOL.
   464  
   465  [Learn more about this change and related upgrade considerations](https://docs.bitnami.com/kubernetes/infrastructure/mysql/administration/upgrade-helm3/).
   466  
   467  ### To 3.0.0
   468  
   469  Backwards compatibility is not guaranteed unless you modify the labels used on the chart's deployments.
   470  Use the workaround below to upgrade from versions previous to 3.0.0. The following example assumes that the release name is mysql:
   471  
   472  ```console
   473  $ kubectl delete statefulset mysql-master --cascade=false
   474  $ kubectl delete statefulset mysql-slave --cascade=false
   475  ```
   476  
   477  ## License
   478  
   479  Copyright &copy; 2022 Bitnami
   480  
   481  Licensed under the Apache License, Version 2.0 (the "License");
   482  you may not use this file except in compliance with the License.
   483  You may obtain a copy of the License at
   484  
   485      http://www.apache.org/licenses/LICENSE-2.0
   486  
   487  Unless required by applicable law or agreed to in writing, software
   488  distributed under the License is distributed on an "AS IS" BASIS,
   489  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   490  See the License for the specific language governing permissions and
   491  limitations under the License.