Files
cozystack/examples/backups/mongodb/05-mongodb-src.yaml
T
Myasnikov Daniil b83cc087cc docs: move the repo-only guides onto the website
Seven guides in docs/ were written next to the code and left in the
source tree, where no operator looks. The website carries them now, so
a second copy here only lets the two drift again: the Backup Classes
page had already fallen behind its original.

docs/release.md, docs/deprecating-applications.md and the two SeaweedFS
runbooks in docs/operations stay. A migration, a bats suite, a workflow
or AGENTS.md reads each of them by path, which is the test for keeping
a document in this repository.

Assisted-by: LLM
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-10-21 17:50:46 +05:00

45 lines
1.7 KiB
YAML

# Source MongoDB instance.
#
# The psmdb operator can only service on-demand PerconaServerMongoDBBackup CRs
# when the cluster has the percona-backup-mongodb agents running and a storage
# declared — that is what `backup.enabled: true` wires up. The cozystack
# backup-strategy driver names that storage ("s3-storage", the one the chart
# declares) via the cozy-default-mongodb Strategy. This example uses the default
# flow, where the application owns the storage and the driver does not inject it
# — so, unlike MariaDB, the application must opt into backups. (Set
# backup.useSystemBucket: true instead to have the driver inject the platform
# system-bucket storage; see https://cozystack.io/docs/v1/operations/services/backup-classes/.)
#
# The bucket coordinates (destinationPath / endpointURL / s3AccessKey /
# s3SecretKey) point the storage at the Bucket provisioned in 00-bucket.yaml.
# insecureSkipTLSVerify is true because Cozystack's default in-cluster
# seaweedfs serves a self-signed cert and the psmdb s3 storage has no CA-bundle
# field. run-all.sh fills the REPLACE_WITH_* placeholders from the Bucket's
# BucketInfo Secret.
#
# The "app" user + "demo" database let a smoke harness (or a human) write a
# sentinel document before the BackupJob fires.
---
apiVersion: apps.cozystack.io/v1alpha1
kind: MongoDB
metadata:
name: mongodb-src
spec:
replicas: 1
size: 1Gi
databases:
demo:
roles:
admin:
- app
users:
app:
password: REPLACE_WITH_PASSWORD
backup:
enabled: true
destinationPath: "s3://REPLACE_WITH_COSI_BUCKET_NAME/mongodb-src/"
endpointURL: "REPLACE_WITH_S3_ENDPOINT"
insecureSkipTLSVerify: true
s3AccessKey: "REPLACE_WITH_S3_ACCESS_KEY"
s3SecretKey: "REPLACE_WITH_S3_SECRET_KEY"