From 6cbd9a3f09d619533f327d62666ca7cb27c6c036 Mon Sep 17 00:00:00 2001 From: jessebot Date: Sun, 29 Dec 2024 23:52:31 +0100 Subject: [PATCH] clean up valkey secret reference in deployment --- charts/pixelfed/templates/deployment.yaml | 36 +++++++++++++++++------ 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/charts/pixelfed/templates/deployment.yaml b/charts/pixelfed/templates/deployment.yaml index 81cdf14..84c6105 100644 --- a/charts/pixelfed/templates/deployment.yaml +++ b/charts/pixelfed/templates/deployment.yaml @@ -178,18 +178,36 @@ spec: value: {{ .Values.pixelfed.activity_pub.outbox | quote }} # redis - {{- with .Values.externalValkey.host }} - name: REDIS_HOST - value: {{ . }} - {{- end }} - {{- with .Values.externalValkey.port }} + valueFrom: + secretKeyRef: + {{- if .Values.externalValkey.existingSecret }} + name: {{ .Values.externalValkey.existingSecret }} + key: {{ .Values.externalValkey.existingSecretKeys.host }} + {{- else }} + name: pixelfed-valkey + key: host + {{- end }} - name: REDIS_PORT - value: {{ . }} - {{- end }} - {{- with .Values.externalValkey.password }} + valueFrom: + secretKeyRef: + {{- if .Values.externalValkey.existingSecret }} + name: {{ .Values.externalValkey.existingSecret }} + key: {{ .Values.externalValkey.existingSecretKeys.port }} + {{- else }} + name: pixelfed-valkey + key: port + {{- end }} - name: REDIS_PASSWORD - value: {{ . }} - {{- end }} + valueFrom: + secretKeyRef: + {{- if .Values.externalValkey.existingSecret }} + name: {{ .Values.externalValkey.existingSecret }} + key: {{ .Values.externalValkey.existingSecretKeys.password }} + {{- else }} + name: pixelfed-valkey + key: password + {{- end }} # mail - name: MAIL_DRIVER