Skip to content

Commit

Permalink
fix: postgres backup can use r2 too
Browse files Browse the repository at this point in the history
  • Loading branch information
JannikZed committed Nov 16, 2023
1 parent 1fdf3ee commit db17ee6
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 7 deletions.
2 changes: 1 addition & 1 deletion charts/strapi/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.57
version: 0.1.58

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
28 changes: 23 additions & 5 deletions charts/strapi/templates/postgres_backup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,24 @@ spec:
value: {{ .Values.postgresBackup.historyLimit | quote }}
- name: DATABASES
value: {{ .Values.postgresql.auth.database | quote }}

{{- if .Values.r2.enabled }}
- name: S3_KEY
valueFrom:
secretKeyRef:
key: AWS_ACCESS_KEY_ID
name: {{ include "strapi.fullname" . }}
- name: S3_ENDPOINT
valueFrom:
secretKeyRef:
key: CF_ENDPOINT
name: {{ include "strapi.fullname" . }}
- name: AWS_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
key: CF_SECRET_ACCESS_KEY
name: {{ include "strapi.fullname" . }}
{{- else }}
- name: S3_KEY
valueFrom:
secretKeyRef:
Expand All @@ -41,6 +59,7 @@ spec:
secretKeyRef:
key: AWS_SECRET_ACCESS_KEY
name: {{ include "strapi.fullname" . }}
{{- end }}
- name: S3_BUCKET_NAME
value: {{ .Values.postgresBackup.bucketName | quote }}
- name: POSTGRES_DB_PASSWORD
Expand All @@ -64,8 +83,7 @@ spec:
allowPrivilegeEscalation: false
privileged: false
readOnlyRootFilesystem: false
restartPolicy: Never
terminationGracePeriodSeconds: 30
schedule: {{ .Values.postgresBackup.schedule }}

{{- end -}}
restartPolicy: Never
terminationGracePeriodSeconds: 30
schedule: {{ .Values.postgresBackup.schedule }}
{{- end -}}
4 changes: 3 additions & 1 deletion charts/strapi/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ postgresql:
# set the master PW here
postgresPassword:
username: strapi
# set a password here!
password:
database: strapi
tls:
Expand All @@ -49,7 +50,8 @@ postgresql:
tag: "13.5.0"
primary:
persistence:
enabled: false
enabled: false
size:

serviceAccount:
# Specifies whether a service account should be created
Expand Down

0 comments on commit db17ee6

Please sign in to comment.