Skip to content

Commit

Permalink
Add flag to control config storage as secret
Browse files Browse the repository at this point in the history
  • Loading branch information
philipp94831 committed Dec 19, 2024
1 parent 8024f6c commit c478681
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
12 changes: 1 addition & 11 deletions charts/rclone-copy/templates/rclone-cron.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }}
Expand All @@ -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 }}
Expand Down Expand Up @@ -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 }}
4 changes: 0 additions & 4 deletions charts/rclone-copy/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,3 @@ secretRefs: {}
# key: secretKey

secretConfig: false

passwordSecret: {}
# name: secretName
# key: secretKey

0 comments on commit c478681

Please sign in to comment.