charts/postgres/templates/pgbackrest-s3-secret.yaml
{{- $secretExists := (lookup "v1" "Secret" $.Release.Namespace "pgbackrest-s3" ) }}
{{- if not $secretExists }}
# this secret allows crunchyDb (pgbackrest) to connect to an S3 host for saving backups.
# manually update the values outside of the pipeline
apiVersion: v1
kind: Secret
metadata:
name: pgbackrest-s3
annotations:
"helm.sh/resource-policy": keep
type: Opaque
stringData:
s3.conf: |
[global]
repo2-s3-key=<s3 access key id>
repo2-s3-key-secret=<s3 secret access key>
{{- end }}