From d1dff31baa509a31f3342d8781609c99f92ed0bd Mon Sep 17 00:00:00 2001 From: Fabian Haenel Date: Tue, 12 Sep 2023 16:48:15 +0200 Subject: [PATCH] Add possibility to configure configSecretKey (#112) Co-authored-by: Elio Bischof --- charts/zitadel/Chart.yaml | 2 +- charts/zitadel/templates/deployment.yaml | 4 ++-- charts/zitadel/templates/initjob.yaml | 4 ++-- charts/zitadel/templates/setupjob.yaml | 4 ++-- charts/zitadel/values.yaml | 4 ++-- examples/5-referenced-secrets/zitadel-secrets.yaml | 2 +- examples/5-referenced-secrets/zitadel-values.yaml | 1 + 7 files changed, 11 insertions(+), 10 deletions(-) diff --git a/charts/zitadel/Chart.yaml b/charts/zitadel/Chart.yaml index 1fbf8a6c..af9c4d5d 100644 --- a/charts/zitadel/Chart.yaml +++ b/charts/zitadel/Chart.yaml @@ -3,7 +3,7 @@ name: zitadel description: A Helm chart for ZITADEL type: application appVersion: "v2.35.0" -version: 6.1.0 +version: 6.2.0 kubeVersion: ">= 1.21.0-0" icon: https://zitadel.com/zitadel-logo-dark.svg maintainers: diff --git a/charts/zitadel/templates/deployment.yaml b/charts/zitadel/templates/deployment.yaml index fb90f767..46b74eeb 100644 --- a/charts/zitadel/templates/deployment.yaml +++ b/charts/zitadel/templates/deployment.yaml @@ -45,9 +45,9 @@ spec: - --config - /.secrets/zitadel-secrets-yaml/zitadel-secrets-yaml {{- end }} - {{- if .Values.zitadel.configSecretName }} + {{- if and .Values.zitadel.configSecretName .Values.zitadel.configSecretKey }} - --config - - /.secrets/zitadel-secret-config-yaml/config-yaml + - /.secrets/zitadel-secret-config-yaml/{{ .Values.zitadel.configSecretKey }} {{- end }} - --masterkeyFromEnv env: diff --git a/charts/zitadel/templates/initjob.yaml b/charts/zitadel/templates/initjob.yaml index d0464345..74c92612 100644 --- a/charts/zitadel/templates/initjob.yaml +++ b/charts/zitadel/templates/initjob.yaml @@ -46,9 +46,9 @@ spec: - --config - /.secrets/zitadel-secrets-yaml/zitadel-secrets-yaml {{- end }} - {{- if .Values.zitadel.configSecretName }} + {{- if and .Values.zitadel.configSecretName .Values.zitadel.configSecretKey }} - --config - - /.secrets/zitadel-secret-config-yaml/config-yaml + - /.secrets/zitadel-secret-config-yaml/{{ .Values.zitadel.configSecretKey }} {{- end }} env: - name: POD_IP diff --git a/charts/zitadel/templates/setupjob.yaml b/charts/zitadel/templates/setupjob.yaml index 17a2bc92..26d74a1c 100644 --- a/charts/zitadel/templates/setupjob.yaml +++ b/charts/zitadel/templates/setupjob.yaml @@ -48,9 +48,9 @@ spec: - --config - /.secrets/zitadel-secrets-yaml/zitadel-secrets-yaml {{- end }} - {{- if .Values.zitadel.configSecretName }} + {{- if and .Values.zitadel.configSecretName .Values.zitadel.configSecretKey }} - --config - - /.secrets/zitadel-secret-config-yaml/config-yaml + - /.secrets/zitadel-secret-config-yaml/{{ .Values.zitadel.configSecretKey }} {{- end }} - --steps - /config/zitadel-config-yaml diff --git a/charts/zitadel/values.yaml b/charts/zitadel/values.yaml index d03db598..b4c5d1db 100644 --- a/charts/zitadel/values.yaml +++ b/charts/zitadel/values.yaml @@ -17,8 +17,9 @@ zitadel: secretConfig: # Reference the name of a secret that contains ZITADEL configuration. - # The key should be named "config-yaml". configSecretName: + # The key under which the ZITADEL configuration is located in the secret. + configSecretKey: config-yaml # ZITADEL uses the masterkey for symmetric encryption. # You can generate it for example with tr -dc A-Za-z0-9