Add cluster backups guide (etcd + Velero)#219
Conversation
Adds examples/BACKUPS.md (etcd S3 snapshots + Velero: bucket/IAM, Terraform, verify, restore) and links it from examples/README.md (TOC + section 12). Docs only; no module changes.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds a new ChangesBackup Documentation
Estimated code review effort: 2 (Simple) | ~15 minutes Related issues: Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@modules/tenancy/k8s-cluster/examples/BACKUPS.md`:
- Around line 62-63: The backup example currently enables S3 bucket versioning
without handling noncurrent versions, so snapshot retention does not truly cap
stored data. Update the BACKUPS.md example to either remove the versioning step
or add a lifecycle rule for noncurrent object versions in the same flow, and
then revise the later retention note so it matches the chosen behavior. Use the
S3 setup example around the bucket versioning command and the snapshot_retention
guidance to keep the instructions consistent.
- Around line 58-63: The S3 bucket setup example needs to handle the us-east-1
special case in the bucket creation step. Update the create-bucket example in
the BACKUPS documentation so the aws s3api create-bucket command omits
--create-bucket-configuration when REGION is us-east-1, while preserving the
existing LocationConstraint behavior for other regions. Use the bucket example
block in the document to apply the conditional logic clearly.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: de18ebb4-bd3c-4c3a-8f0a-3c8faa0344c7
📒 Files selected for processing (2)
modules/tenancy/k8s-cluster/examples/BACKUPS.mdmodules/tenancy/k8s-cluster/examples/README.md
us-east-1 rejects a LocationConstraint; branch the create-bucket call so the etcd and Velero bucket snippets are correct for every region (CodeRabbit, PR wso2#219).
With versioning enabled, deleted/rotated backups leave noncurrent versions, so snapshot_retention/ttl only cap current objects. Add a NoncurrentVersionExpiration lifecycle rule to both bucket setups and clarify the retention note + hardening checklist (CodeRabbit, PR wso2#219).
us-east-1 rejects a LocationConstraint; branch the create-bucket call so the etcd and Velero bucket snippets are correct for every region (CodeRabbit, PR #219).
Purpose
Resolves #218. The
k8s-clusterexamples document how to provision a tenant cluster but not how to back it up. Product teams own their cluster backups to their own S3 buckets and had no guide.Goals
Provide a self-service backup guide, as a companion to the cluster-provisioning guide, covering both backup layers a tenant needs.
Approach
modules/tenancy/k8s-cluster/examples/BACKUPS.md:rancher2_cloud_credential, the module'setcd_s3input, verify, restore, and theetcd_snapshot_createdrift note.rancher2_catalog_v2+rancher2_app_v2(chart 8.1.0, plugin v1.9.0,upgradeCRDs: false), schedule, verify (incl. thevelero-schedule-name prefix), backup + restore.examples/README.md(TOC + new section 12 "Backups").Release note
Docs: add a self-service etcd + Velero backup guide for tenant RKE2 clusters.
Documentation
This PR is documentation:
modules/tenancy/k8s-cluster/examples/BACKUPS.md.Automation tests
N/A — documentation only. Validated end-to-end on a live tenant cluster: a non-admin tenant user provisioned an RKE2 cluster, configured etcd S3 snapshots (objects confirmed in S3), and installed Velero + ran a namespace backup and restore.
Security checks
my-team,AKIAxxx).Related PRs
A follow-up module PR will add
rke_config[0].etcd_snapshot_createto thek8s-clusterignore_changes(the drift noted in the guide).Other template sections (Training, Certification, Marketing, Migrations): N/A.
Summary by CodeRabbit