From fc3b1fa8b98a33a88b2bf3126c0051d3b155be71 Mon Sep 17 00:00:00 2001 From: Philipp Schirmer Date: Wed, 18 Dec 2024 19:28:47 +0100 Subject: [PATCH] Add flag to control config storage as secret --- charts/rclone-copy/templates/rclone-cron.yaml | 7 ++++++- charts/rclone-copy/values.yaml | 4 +++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/charts/rclone-copy/templates/rclone-cron.yaml b/charts/rclone-copy/templates/rclone-cron.yaml index f512712..91be847 100644 --- a/charts/rclone-copy/templates/rclone-cron.yaml +++ b/charts/rclone-copy/templates/rclone-cron.yaml @@ -102,7 +102,12 @@ spec: {{- end }} {{- if .Values.passwordVariable }} - name: RCLONE_PASSWORD_COMMAND - value: {{ printf "echo $%s" .Values.passwordVariable | quote }} + value: "echo $PASSWORD" + - name: PASSWORD + valueFrom: + secretKeyRef: + name: {{ .Values.passwordVariable.name }} + key: "{{ .Values.passwordVariable.key }}" {{- end }} {{- end }} diff --git a/charts/rclone-copy/values.yaml b/charts/rclone-copy/values.yaml index 4b1a30e..5412403 100644 --- a/charts/rclone-copy/values.yaml +++ b/charts/rclone-copy/values.yaml @@ -93,4 +93,6 @@ secretRefs: {} secretConfig: false -# passwordVariable: MY_SECRET +passwordVariable: {} +# name: secretName +# key: secretKey