From c478681cd3ba9f596fdf9562a8df1767213865eb Mon Sep 17 00:00:00 2001 From: Philipp Schirmer Date: Thu, 19 Dec 2024 08:14:41 +0100 Subject: [PATCH] Add flag to control config storage as secret --- charts/rclone-copy/templates/rclone-cron.yaml | 12 +----------- charts/rclone-copy/values.yaml | 4 ---- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/charts/rclone-copy/templates/rclone-cron.yaml b/charts/rclone-copy/templates/rclone-cron.yaml index f3048f3..b2ebe7d 100644 --- a/charts/rclone-copy/templates/rclone-cron.yaml +++ b/charts/rclone-copy/templates/rclone-cron.yaml @@ -66,7 +66,7 @@ spec: # copy as workaround for rclone.conf read only (see https://github.com/rclone/rclone/issues/3655) - >- cp /root/.config/rclone/rclone_ro.conf /root/.config/rclone/rclone.conf && - rclone {{ .Values.command }} -v {{ if .Values.passwordSecret }}--password-command="cat /root/password"{{ end }} {{ .Values.arguments | join " " }} --include-from /root/include-pattern.conf "{{ include "rclone-copy.getSourceOrUrl" . }}" "{{ .Values.sync.dest.name }}:{{ .Values.sync.dest.path }}" + rclone {{ .Values.command }} -v {{ .Values.arguments | join " " }} --include-from /root/include-pattern.conf "{{ include "rclone-copy.getSourceOrUrl" . }}" "{{ .Values.sync.dest.name }}:{{ .Values.sync.dest.path }}" volumeMounts: - name: {{ .Values.secretConfig | ternary "secret-config" "config" }} @@ -76,11 +76,6 @@ spec: - name: config mountPath: "/root/include-pattern.conf" subPath: "include-pattern.conf" - {{- if .Values.passwordSecret }} - - name: password - mountPath: "/root/password" - subPath: {{ .Values.passwordSecret.key | quote }} - {{- end }} resources: {{ toYaml .Values.resources | indent 14 }} @@ -113,9 +108,4 @@ spec: - name: config configMap: name: rclone-config-{{ .Release.Name }} - {{- if .Values.passwordSecret }} - - name: password - secret: - secretName: {{ .Values.passwordSecret.name }} - {{- end }} backoffLimit: {{ .Values.backoffLimit }} diff --git a/charts/rclone-copy/values.yaml b/charts/rclone-copy/values.yaml index 393d6ad..4a86128 100644 --- a/charts/rclone-copy/values.yaml +++ b/charts/rclone-copy/values.yaml @@ -92,7 +92,3 @@ secretRefs: {} # key: secretKey secretConfig: false - -passwordSecret: {} -# name: secretName -# key: secretKey