diff --git a/charts/mysql/Chart.yaml b/charts/mysql/Chart.yaml index 2bb3f69608434db5f4c02121277b07a07fd0bb15..aca6fad00e62a406b9de9ec440b9456a9da8842d 100644 --- a/charts/mysql/Chart.yaml +++ b/charts/mysql/Chart.yaml @@ -12,7 +12,7 @@ keywords: - database - mysql -version: "1.2.0" +version: "2.0.0" -appVersion: "8.3.0" +appVersion: "8.0.36" icon: https://www.mysql.com/common/logos/powered-by-mysql-88x31.png diff --git a/charts/mysql/README.md b/charts/mysql/README.md index b4b41836705c467f2bf71e445df61b93904c5c01..312b3712d941e32ea22d1c7249c54016efd199be 100644 --- a/charts/mysql/README.md +++ b/charts/mysql/README.md @@ -1,6 +1,6 @@ # MySQL -   +   ## Changelog @@ -121,6 +121,9 @@ The policyTypes will be automatically set | storage.keepPvc | bool | `false` | Keep a created Persistent volume claim when uninstalling the helm chart (only for option `useDeployment: true`) | | storage.annotations | object | `{}` | Additional storage annotations | | storage.labels | object | `{}` | Additional storage labels | +| extraStorage[].name | string | `nil` | Internal name of the volume | +| extraStorage[].pvcName | string | `nil` | Name of the existing PVC | +| extraStorage[].mountPath | string | `nil` | Mount path where the PVC should be mounted into the container | ## MySQL parameters @@ -149,3 +152,6 @@ The policyTypes will be automatically set | extraSecrets | list | `[]` | A list of additional existing secrets that will be mounted into the container | | extraSecrets[].name | string | `nil` | Name of the existing K8s secret | | extraSecrets[].mountPath | string | `nil` | Mount path where the secret should be mounted into the container (f.e. /mysecretfolder) | +| extraConfigs[].name | string | `nil` | Name of the existing K8s configMap | +| extraConfigs[].defaultMode | int | `0440` | Mount default access mode | +| extraConfigs[].mountPath | string | `nil` | Mount path where the configMap should be mounted into the container (f.e. /myconfigfolder) | diff --git a/charts/mysql/RELEASENOTES.md b/charts/mysql/RELEASENOTES.md index 105b9085403a929d622fa3f58814290d3aa0a249..4a199bd4a7c6879a9bcce22471a105da1001172c 100644 --- a/charts/mysql/RELEASENOTES.md +++ b/charts/mysql/RELEASENOTES.md @@ -21,4 +21,5 @@ | 1.1.0 | 8.2.0 | Bumped to stable major chart version - Allows usage of existing secret references and network policies | | 1.1.1 | 8.2.0 | Added support for network policies and additional labels and annotations | | 1.2.0 | 8.3.0 | Upgraded MySQL to 8.3.0 | +| 2.0.0 | 8.0.36 (LTS) | Final version with configuration secret, extra config and extra volume support | | | | | diff --git a/charts/mysql/templates/statefulset.yaml b/charts/mysql/templates/statefulset.yaml index d5bad76e5f689eb8d41b664b45ad2e707ed380c0..a551de9099382244fd22929beaa85f11fe45aad5 100644 --- a/charts/mysql/templates/statefulset.yaml +++ b/charts/mysql/templates/statefulset.yaml @@ -189,6 +189,14 @@ spec: - name: {{ $secret.name }} mountPath: {{ $secret.mountPath }} {{- end }} + {{- range $config := .Values.extraConfigs }} + - name: {{ $config.name }} + mountPath: {{ $config.mountPath }} + {{- end }} + {{- range $storage := .Values.extraStorage }} + - name: {{ $storage.name }} + mountPath: {{ $storage.mountPath }} + {{- end }} {{- if .Values.settings.arguments }} args: {{- range .Values.settings.arguments }} @@ -294,7 +302,18 @@ spec: - name: {{ $secret.name }} secret: secretName: {{ $secret.name }} - defaultMode: 0440 + defaultMode: {{ $secret.defaultMode | default 0440 }} + {{- end }} + {{- range $config := .Values.extraConfigs }} + - name: {{ $config.name }} + configMap: + name: {{ $config.name }} + defaultMode: {{ $config.defaultMode | default 0440 }} + {{- end }} + {{- range $storage := .Values.extraStorage }} + - name: {{ $storage.name }} + persistentVolumeClaim: + claimName: {{ $storage.pvcName }} {{- end }} {{- with .Values.storage }} {{- $createPvc := and (empty .persistentVolumeClaimName) .requestedSize }} diff --git a/charts/mysql/values.yaml b/charts/mysql/values.yaml index 42ebfe1836e9f7a2100b9f0385a4160c14b0ad56..e02df95820d8a23986cce9ff716ecb1d35727f8a 100644 --- a/charts/mysql/values.yaml +++ b/charts/mysql/values.yaml @@ -231,9 +231,20 @@ extraScripts: extraSecrets: [] ## Name of the existing K8s secret # - name: + ## Mount default mode (0440 if parameter is omitted) +# defaultMode: 0440 ## Mount path where the secret should be mounted into the container (f.e. /mysecretfolder) # mountPath: +## A list of additional existing configMaps that will be mounted into the container +extraConfigs: [] + ## Name of the existing K8s configMap +# - name: + ## Mount default mode (0440 if parameter is omitted) +# defaultMode: 0440 + ## Mount path where the configMap should be mounted into the container (f.e. /mysecretfolder) +# mountPath: + ## Storage parameters storage: ## Set persistentVolumenClaimName to reference an existing PVC @@ -260,3 +271,12 @@ storage: ## Additional storage labels labels: {} + +## Mount existing extra PVC +extraStorage: {} + ## Internal volume name +# - name: + ## Container mount path +# mountPath: + ## Name of existing PVC +# pvcName: