mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-09 05:25:14 +09:00
38 lines
1.6 KiB
YAML
38 lines
1.6 KiB
YAML
# CNPG backup strategy. String fields are go-templated against the live
|
|
# Postgres application object (.Application) and BackupClass parameters
|
|
# (.Parameters), letting one strategy CR serve every Postgres instance in
|
|
# the tenant.
|
|
---
|
|
apiVersion: strategy.backups.cozystack.io/v1alpha1
|
|
kind: CNPG
|
|
metadata:
|
|
name: cnpg-strategy-default
|
|
spec:
|
|
template:
|
|
serverName: "{{ .Application.metadata.name }}"
|
|
barmanObjectStore:
|
|
# destinationPath uses the COSI BucketClaim's actual bucket name (look
|
|
# it up via `kubectl -n <ns> get bucketclaim bucket-<name> -o
|
|
# jsonpath='{.status.bucketName}'`). The endpointURL is the S3 endpoint
|
|
# advertised in the BucketInfo Secret.
|
|
destinationPath: "s3://REPLACE_WITH_COSI_BUCKET_NAME/{{ .Application.metadata.name }}/"
|
|
endpointURL: "https://REPLACE_WITH_S3_ENDPOINT"
|
|
retentionPolicy: "30d"
|
|
# endpointCA is required when the S3 endpoint serves a self-signed
|
|
# certificate (the cozystack default seaweedfs-s3 ingress qualifies).
|
|
# Point this Secret at a key holding the PEM-encoded CA bundle - for
|
|
# cozystack's seaweedfs you can copy `seaweedfs-ca-cert.ca.crt` from
|
|
# the parent tenant. Drop the block entirely when the endpoint's
|
|
# certificate is signed by a publicly-trusted CA.
|
|
endpointCA:
|
|
secretRef:
|
|
name: "{{ .Application.metadata.name }}-cnpg-backup-ca"
|
|
key: "ca.crt"
|
|
s3Credentials:
|
|
secretRef:
|
|
name: "{{ .Application.metadata.name }}-cnpg-backup-creds"
|
|
data:
|
|
compression: gzip
|
|
wal:
|
|
compression: gzip
|