Skip to content

Commit

Permalink
Add missing checks to secret to be mount
Browse files Browse the repository at this point in the history
Signed-off-by: Gabriel Santos <[email protected]>
  • Loading branch information
Gabrielopesantos committed Feb 18, 2024
1 parent 45de2e2 commit 1ff4a56
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion charts/perses/templates/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.encriptionKeyFile }}
encryption_key_file: {{ printf "%s/key" (.Values.config.security.encryptionKeyFile | trimSuffix "/") }}
{{- else }}
encryption_key: {{ .Values.config.security.encryptionKey }}
Expand Down
2 changes: 1 addition & 1 deletion charts/perses/templates/secrets.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.config.security.encryptionKeyFile }}
{{- if and .Values.config.security.encryptionKeyFile .Values.config.security.encryptionKey }}
apiVersion: v1
kind: Secret
metadata:
Expand Down
4 changes: 2 additions & 2 deletions charts/perses/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 1ff4a56

Please sign in to comment.