From e41368d2295751eba01e45cccbf244a2b47efe84 Mon Sep 17 00:00:00 2001 From: Goeran Poehner <goeran.poehner@gmail.com> Date: Fri, 5 May 2023 20:39:29 +0200 Subject: [PATCH] Implement support for custom secrets and additional environment configurations Fixes #1235 --- charts/etcd/Chart.yaml | 2 +- charts/etcd/README.md | 3 ++- charts/etcd/RELEASENOTES.md | 1 + charts/etcd/templates/statefulset.yaml | 4 ++++ charts/etcd/values.yaml | 3 +++ charts/ghost/README.md | 2 ++ charts/nextcloud/README.md | 2 ++ charts/wordpress/README.md | 2 ++ 8 files changed, 17 insertions(+), 2 deletions(-) diff --git a/charts/etcd/Chart.yaml b/charts/etcd/Chart.yaml index d797d8f9..72e56f63 100644 --- a/charts/etcd/Chart.yaml +++ b/charts/etcd/Chart.yaml @@ -7,6 +7,6 @@ type: application maintainers: - name: groundhog2k -version: 0.1.5 +version: "0.1.6" appVersion: "v3.5.9" diff --git a/charts/etcd/README.md b/charts/etcd/README.md index bc822027..fbe23e4f 100644 --- a/charts/etcd/README.md +++ b/charts/etcd/README.md @@ -1,6 +1,6 @@ # Etcd -   +   ## Changelog @@ -145,3 +145,4 @@ helm uninstall my-release | 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) | | extraEnvSecrets | list | `[]` | A list of existing secrets that will be mounted into the container as environment variables | +| extraEnvConfigs | list | `[]` | A list of existing configmaps that will be mounted into the container as environment variables | diff --git a/charts/etcd/RELEASENOTES.md b/charts/etcd/RELEASENOTES.md index 2f8c4822..d207dd69 100644 --- a/charts/etcd/RELEASENOTES.md +++ b/charts/etcd/RELEASENOTES.md @@ -8,4 +8,5 @@ | 0.1.3 | v3.5.7 | Fixed "nil" syntax error for health checks (thx @omegazeng) | | 0.1.4 | v3.5.8 | Upgraded etcd to v3.5.8 | | 0.1.5 | v3.5.9 | Upgraded etcd to v3.5.9 | +| 0.1.6 | v3.5.8 | Added support for custom secrets and additional environment configurations | | | | | diff --git a/charts/etcd/templates/statefulset.yaml b/charts/etcd/templates/statefulset.yaml index 08ff2280..ed75e272 100644 --- a/charts/etcd/templates/statefulset.yaml +++ b/charts/etcd/templates/statefulset.yaml @@ -169,6 +169,10 @@ spec: - secretRef: name: {{ . }} {{- end }} + {{- range .Values.extraEnvConfigs }} + - configMapRef: + name: {{ . }} + {{- end }} volumeMounts: - name: {{ .Values.storage.volumeName }} mountPath: /data diff --git a/charts/etcd/values.yaml b/charts/etcd/values.yaml index 8e4a2c57..475f7c26 100644 --- a/charts/etcd/values.yaml +++ b/charts/etcd/values.yaml @@ -172,6 +172,9 @@ args: [] ## A list of existing secrets that will be mounted into the container as environment variables extraEnvSecrets: [] +## A list of existing configmaps that will be mounted into the container as environment variables +extraEnvConfigs: [] + ## A list of additional existing secrets that will be mounted into the etcd container ## The mounted files of the secrets can be used for custom configuration options (see https.enabled) extraSecrets: [] diff --git a/charts/ghost/README.md b/charts/ghost/README.md index 735d16c0..9895db5f 100644 --- a/charts/ghost/README.md +++ b/charts/ghost/README.md @@ -159,3 +159,5 @@ helm uninstall my-release | extraEnvSecrets | list | `[]` | A list of existing secrets that will be mounted into the container as environment variables | | extraEnvConfigs | list | `[]` | A list of existing configmaps that will be mounted into the container as environment variables | | 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) | diff --git a/charts/nextcloud/README.md b/charts/nextcloud/README.md index c1ef4733..6126ba19 100644 --- a/charts/nextcloud/README.md +++ b/charts/nextcloud/README.md @@ -243,6 +243,8 @@ helm uninstall my-release | extraEnvSecrets | list | `[]` | A list of existing secrets that will be mounted into the container as environment variables | | extraEnvConfigs | list | `[]` | A list of existing configmaps that will be mounted into the container as environment variables | | 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) | ## Storage parameters diff --git a/charts/wordpress/README.md b/charts/wordpress/README.md index abebc897..beb642c3 100644 --- a/charts/wordpress/README.md +++ b/charts/wordpress/README.md @@ -145,6 +145,8 @@ helm uninstall my-release | extraEnvSecrets | list | `[]` | A list of existing secrets that will be mounted into the container as environment variables | | extraEnvConfigs | list | `[]` | A list of existing configmaps that will be mounted into the container as environment variables | | 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) | ## Storage parameters -- GitLab