7daeb4af65
Step 2 of the ec placement migration: with purge-on-delete now allowed (#313), removing the Bucket CRs makes the operator delete the underlying RGW buckets and their objects, freeing the names to be recreated on ec in step 3. - remove the nine cnpg backup Bucket resources - keep ObjectStoreUser and ScheduledBackup so the backup-s3 secrets and schedules survive Reviewed-on: #315 Co-authored-by: Ben Vincent <ben@unkin.net> Co-committed-by: Ben Vincent <ben@unkin.net>
39 lines
1.5 KiB
YAML
39 lines
1.5 KiB
YAML
---
|
|
# Ceph RGW (S3) backup target for the artifactapi CNPG cluster, provisioned by the
|
|
# in-estate cephrgw-operator. One dedicated bucket + owner user per cluster:
|
|
# cephrgw CRs are namespace-scoped and CNPG reads its S3 credential Secret from
|
|
# its own namespace, so backups are per-database rather than one shared bucket.
|
|
apiVersion: ceph.unkin.net/v1alpha1
|
|
kind: ObjectStoreUser
|
|
metadata:
|
|
name: cnpg-artifactapi-backup
|
|
namespace: artifactapi
|
|
spec:
|
|
displayName: "CNPG backup owner (artifactapi)"
|
|
# RGW users are global; keep the uid namespace-qualified so it never collides.
|
|
uid: cnpg-artifactapi-backup
|
|
maxBuckets: 5
|
|
# Operator writes AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY (+ RGW_UID,
|
|
# S3_ENDPOINT) into this Secret; the Cluster's barmanObjectStore consumes it.
|
|
secretName: cnpg-artifactapi-backup-s3
|
|
# Keep the RGW user (and thus the keys) if this CR is ever deleted, so an
|
|
# in-flight restore can still reach the archive.
|
|
retainOnDelete: true
|
|
---
|
|
# Nightly base backup. Continuous WAL archiving is always-on via the Cluster's
|
|
# spec.backup.barmanObjectStore; this schedules the periodic full backup that
|
|
# WAL is layered on top of. Schedules are staggered across clusters so the 8
|
|
# base backups do not hit RGW at once (CNPG cron is 6-field, seconds first).
|
|
apiVersion: postgresql.cnpg.io/v1
|
|
kind: ScheduledBackup
|
|
metadata:
|
|
name: cnpg-artifactapi-nightly
|
|
namespace: artifactapi
|
|
spec:
|
|
schedule: "0 40 1 * * *"
|
|
immediate: false
|
|
backupOwnerReference: self
|
|
method: barmanObjectStore
|
|
cluster:
|
|
name: postgres
|