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 18, 2024
1 parent 3e5c8f5 commit e3ffa32
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion charts/rclone-copy/templates/rclone-cron.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ spec:
resources:
{{ toYaml .Values.resources | indent 14 }}

{{- if or .Values.configPassword .Values.secretRefs }}
{{- if or .Values.configPassword .Values.secretRefs .Values.passwordVariable }}
env:
{{- if .Values.configPassword }}
- name: RCLONE_CONFIG_PASS
Expand All @@ -100,6 +100,10 @@ spec:
name: {{ $value.name }}
key: "{{ $value.key }}"
{{- end }}
{{- if .Values.passwordVariable }}
- name: RCLONE_PASSWORD_COMMAND
value: {{ printf "echo $%s" .Values.passwordVariable | quote }}
{{- end }}
{{- end }}

restartPolicy: {{ .Values.restartPolicy }}
Expand Down
2 changes: 2 additions & 0 deletions charts/rclone-copy/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,5 @@ secretRefs: {}
# key: secretKey

secretConfig: false

# passwordVariable: MY_SECRET

0 comments on commit e3ffa32

Please sign in to comment.