diff --git a/charts/rclone-copy/templates/rclone-cron.yaml b/charts/rclone-copy/templates/rclone-cron.yaml index 7ddf601..90fb402 100644 --- a/charts/rclone-copy/templates/rclone-cron.yaml +++ b/charts/rclone-copy/templates/rclone-cron.yaml @@ -78,6 +78,13 @@ spec: resources: {{ toYaml .Values.resources | indent 14 }} + + env: + - name: RCLONE_CONFIG_PASS + valueFrom: + secretKeyRef: + name: rclone-config-{{ .Release.Name }} + key: password restartPolicy: {{ .Values.restartPolicy }} volumes: diff --git a/charts/rclone-copy/templates/secret.yaml b/charts/rclone-copy/templates/secret.yaml new file mode 100644 index 0000000..ca6de3d --- /dev/null +++ b/charts/rclone-copy/templates/secret.yaml @@ -0,0 +1,9 @@ +{{- if .Values.configPassword }} +apiVersion: v1 +kind: Secret +metadata: + name: rclone-config-{{ .Release.Name }} +type: Opaque +data: + password: {{ .Values.configPassword | b64enc }} +{{- end }} diff --git a/charts/rclone-copy/values.yaml b/charts/rclone-copy/values.yaml index ace2fc0..518cbea 100644 --- a/charts/rclone-copy/values.yaml +++ b/charts/rclone-copy/values.yaml @@ -76,3 +76,5 @@ backoffLimit: 6 podAnnotations: {} podLabels: {} + +# configPassword: password