Skip to content

Commit

Permalink
Move rclone.conf to Kubernetes secret (#6)
Browse files Browse the repository at this point in the history
Fixes #3
  • Loading branch information
philipp94831 authored Jul 8, 2024
1 parent 360327d commit 1ee0503
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 0 additions & 2 deletions charts/rclone-copy/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
5 changes: 4 additions & 1 deletion charts/rclone-copy/templates/rclone-cron.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -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 }}
Expand Down
5 changes: 3 additions & 2 deletions charts/rclone-copy/templates/secret.yaml
Original file line number Diff line number Diff line change
@@ -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 }}

0 comments on commit 1ee0503

Please sign in to comment.