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