diff --git a/charts/perses/templates/config.yaml b/charts/perses/templates/config.yaml index 9b8b696..f013365 100644 --- a/charts/perses/templates/config.yaml +++ b/charts/perses/templates/config.yaml @@ -12,7 +12,7 @@ data: config.yaml: |- security: readonly: {{ .Values.config.security.readOnly }} - {{- if .Values.config.security.encryptionKeyFile }} + {{- if and .Values.config.security.encryptionKeyFile .Values.config.security.encriptionKey }} encryption_key_file: {{ printf "%s/key" (.Values.config.security.encryptionKeyFile | trimSuffix "/") }} {{- else }} encryption_key: {{ .Values.config.security.encryptionKey }} diff --git a/charts/perses/templates/secrets.yaml b/charts/perses/templates/secrets.yaml index 523da8c..9a16561 100644 --- a/charts/perses/templates/secrets.yaml +++ b/charts/perses/templates/secrets.yaml @@ -1,4 +1,4 @@ -{{- if .Values.config.security.encryptionKeyFile }} +{{- if and .Values.config.security.encryptionKeyFile .Values.config.security.encryptionKey }} apiVersion: v1 kind: Secret metadata: diff --git a/charts/perses/templates/statefulset.yaml b/charts/perses/templates/statefulset.yaml index bdb0ac5..0a04604 100644 --- a/charts/perses/templates/statefulset.yaml +++ b/charts/perses/templates/statefulset.yaml @@ -50,7 +50,7 @@ spec: - name: datasources mountPath: /etc/perses/datasources {{- end }} - {{- if .Values.config.security.encryptionKeyFile }} + {{- if and .Values.config.security.encryptionKeyFile .Values.config.security.encryptionKey }} - name: encryptionkey mountPath: {{ .Values.config.security.encryptionKeyFile }} readOnly: true @@ -103,7 +103,7 @@ spec: configMap: name: {{ include "perses.fullname" . }}-datasources {{- end }} - {{- if .Values.config.security.encryptionKeyFile }} + {{- if and .Values.config.security.encryptionKeyFile .Values.config.security.encryptionKey }} - name: encryptionkey secret: secretName: {{ include "perses.fullname" . }}-encryption-key