Skip to content

Commit

Permalink
Reference existing secret for Rclone config password
Browse files Browse the repository at this point in the history
  • Loading branch information
philipp94831 committed Aug 9, 2024
1 parent 7b35ce1 commit 71010bf
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
11 changes: 10 additions & 1 deletion charts/rclone-copy/templates/rclone-cron.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,23 @@ spec:
resources:
{{ toYaml .Values.resources | indent 14 }}

{{- if .Values.configPassword }}
{{- if or .Values.configPassword .Values.secretRefs }}
env:
{{- if .Values.configPassword }}
- name: RCLONE_CONFIG_PASS
valueFrom:
secretKeyRef:
name: rclone-config-{{ .Release.Name }}
key: password
{{- end }}
{{- range $key, $value := .Values.secretRefs }}
- name: "{{ $key }}"
valueFrom:
secretKeyRef:
name: {{ $value.name }}
key: "{{ $value.key }}"
{{- end }}
{{- end }}

restartPolicy: {{ .Values.restartPolicy }}
volumes:
Expand Down
5 changes: 5 additions & 0 deletions charts/rclone-copy/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,8 @@ podAnnotations: {}
podLabels: {}

# configPassword: password

secretRefs: {}
# RCLONE_CONFIG_PASS:
# name: secretName
# key: secretKey

0 comments on commit 71010bf

Please sign in to comment.