diff --git a/charts/rclone-copy/templates/configmap.yaml b/charts/rclone-copy/templates/configmap.yaml index 6255f67..d516b7a 100644 --- a/charts/rclone-copy/templates/configmap.yaml +++ b/charts/rclone-copy/templates/configmap.yaml @@ -3,7 +3,5 @@ kind: ConfigMap metadata: name: rclone-config-{{ .Release.Name }} data: - rclone.conf: | -{{ .Values.rcloneConf | indent 4 }} include-pattern.conf: | {{ .Values.includePattern | indent 4 }} diff --git a/charts/rclone-copy/templates/rclone-cron.yaml b/charts/rclone-copy/templates/rclone-cron.yaml index 73b36d1..8cb310d 100644 --- a/charts/rclone-copy/templates/rclone-cron.yaml +++ b/charts/rclone-copy/templates/rclone-cron.yaml @@ -72,7 +72,7 @@ spec: # This is the default path where the rclone implementation assumes the config is located mountPath: "/root/.config/rclone/rclone_ro.conf" subPath: "rclone.conf" - - name: config + - name: include-config mountPath: "/root/include-pattern.conf" subPath: "include-pattern.conf" @@ -91,6 +91,9 @@ spec: restartPolicy: {{ .Values.restartPolicy }} volumes: - name: config + secret: + secretName: rclone-config-{{ .Release.Name }} + - name: include-config configMap: name: rclone-config-{{ .Release.Name }} backoffLimit: {{ .Values.backoffLimit }} diff --git a/charts/rclone-copy/templates/secret.yaml b/charts/rclone-copy/templates/secret.yaml index ca6de3d..1bc7839 100644 --- a/charts/rclone-copy/templates/secret.yaml +++ b/charts/rclone-copy/templates/secret.yaml @@ -1,9 +1,10 @@ -{{- if .Values.configPassword }} apiVersion: v1 kind: Secret metadata: name: rclone-config-{{ .Release.Name }} type: Opaque data: + {{- if .Values.configPassword }} password: {{ .Values.configPassword | b64enc }} -{{- end }} + {{- end }} + rclone.conf: {{ .Values.rcloneConf | b64enc }}