diff --git a/charts/rclone-copy/templates/rclone-cron.yaml b/charts/rclone-copy/templates/rclone-cron.yaml index 6977fcb..f512712 100644 --- a/charts/rclone-copy/templates/rclone-cron.yaml +++ b/charts/rclone-copy/templates/rclone-cron.yaml @@ -84,7 +84,7 @@ spec: resources: {{ toYaml .Values.resources | indent 14 }} - {{- if or .Values.configPassword .Values.secretRefs }} + {{- if or .Values.configPassword .Values.secretRefs .Values.passwordVariable }} env: {{- if .Values.configPassword }} - name: RCLONE_CONFIG_PASS @@ -100,6 +100,10 @@ spec: name: {{ $value.name }} key: "{{ $value.key }}" {{- end }} + {{- if .Values.passwordVariable }} + - name: RCLONE_PASSWORD_COMMAND + value: {{ printf "echo $%s" .Values.passwordVariable | quote }} + {{- end }} {{- end }} restartPolicy: {{ .Values.restartPolicy }} diff --git a/charts/rclone-copy/values.yaml b/charts/rclone-copy/values.yaml index 4a86128..4b1a30e 100644 --- a/charts/rclone-copy/values.yaml +++ b/charts/rclone-copy/values.yaml @@ -92,3 +92,5 @@ secretRefs: {} # key: secretKey secretConfig: false + +# passwordVariable: MY_SECRET