Skip to content

Commit

Permalink
feat: using a secret to store the space credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
dcoraboeuf committed Dec 27, 2023
1 parent 320dee2 commit 5218691
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
13 changes: 13 additions & 0 deletions charts/pg-db-backup-do-space/templates/db-extraction-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,20 @@ spec:
value: "require"
- name: PGPASSWORD
value: {{ .Values.auth.password | quote }}
{{- if .Values.digitalocean.space.secretName }}
- name: DO_SPACE_ACCESS_KEY
valueFrom:
secretKeyRef:
name: {{ .Values.digitalocean.space.secretName | quote }}
key: accessKey
- name: DO_SPACE_SECRET_KEY
valueFrom:
secretKeyRef:
name: {{ .Values.digitalocean.space.secretName | quote }}
key: secretKey
{{- else }}
- name: DO_SPACE_ACCESS_KEY
value: {{ .Values.digitalocean.space.accessKey | quote }}
- name: DO_SPACE_SECRET_KEY
value: {{ .Values.digitalocean.space.secretKey | quote }}
{{- end }}
2 changes: 2 additions & 0 deletions charts/pg-db-backup-do-space/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ digitalocean:
accessKey: ""
# Secret key
secretKey: ""
# Name of the secret containing the keys
secretName: ""
# Region
region: "fra1"
# Bucket
Expand Down

0 comments on commit 5218691

Please sign in to comment.