diff --git a/charts/rclone-copy/templates/rclone-cron.yaml b/charts/rclone-copy/templates/rclone-cron.yaml index 8cb310d..820bc70 100644 --- a/charts/rclone-copy/templates/rclone-cron.yaml +++ b/charts/rclone-copy/templates/rclone-cron.yaml @@ -79,14 +79,23 @@ spec: resources: {{ toYaml .Values.resources | indent 14 }} - {{- if .Values.configPassword }} + {{- if or .Values.configPassword .Values.secretRefs }} env: + {{- if .Values.configPassword }} - name: RCLONE_CONFIG_PASS valueFrom: secretKeyRef: name: rclone-config-{{ .Release.Name }} key: password {{- end }} + {{- range $key, $value := .Values.secretRefs }} + - name: "{{ $key }}" + valueFrom: + secretKeyRef: + name: {{ $value.name }} + key: "{{ $value.key }}" + {{- end }} + {{- end }} restartPolicy: {{ .Values.restartPolicy }} volumes: diff --git a/charts/rclone-copy/values.yaml b/charts/rclone-copy/values.yaml index 518cbea..89cf87c 100644 --- a/charts/rclone-copy/values.yaml +++ b/charts/rclone-copy/values.yaml @@ -78,3 +78,8 @@ podAnnotations: {} podLabels: {} # configPassword: password + +secretRefs: {} +# RCLONE_CONFIG_PASS: +# name: secretName +# key: secretKey