Skip to content

feat(kro-rgds): BackupPolicy RGD with gold/silver/bronze tiers - #633

Draft
allamand wants to merge 6 commits into
aws-samples:mainfrom
allamand:feat/peeks-backup-policy-rgd
Draft

feat(kro-rgds): BackupPolicy RGD with gold/silver/bronze tiers#633
allamand wants to merge 6 commits into
aws-samples:mainfrom
allamand:feat/peeks-backup-policy-rgd

Conversation

@allamand

@allamand allamand commented May 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Introduces a kro ResourceGraphDefinition (BackupPolicy) that expands into an ACK-managed AWS Backup stack (BackupVault + BackupPlan + BackupSelection), parameterized by backup tier.

Enables AWS Backup as the data-plane source of truth alongside GitOps for control plane — used for cross-region DR, blue/green cluster migrations, and environment cloning (all three share the same BackupPlan/BackupSelection primitive).

Tiers

Tier RPO Retention Cross-region copy Cold storage
gold 1h 30d 90d
silver 24h 14d
bronze 24h 7d

Design

  • Platform team declares 3 BackupPolicy instances per spoke (one per tier) — typically via the SpokeCluster RGD in a follow-up
  • Developers opt in via namespace/PVC label peeks.io/backup-tier=<tier> — BackupSelection matches via propagated EBS volume tags
  • No central ConfigMap to maintain — opt-in is declarative in app manifests and auditable with kubectl get ns -l peeks.io/backup-tier=<tier>

What this RGD does NOT cover (documented explicitly in README)

  • Secrets → handled by External Secrets Operator
  • Anything derivable from Git → Argo CD re-syncs
  • Heavy stateful (Postgres, Kafka) → needs application-level backup on top
  • PVC restore targeting into a recovery cluster → separate RestoreSelection RGD (future PR)

Validation

  • kubectl apply --dry-run=server passes
  • RGD applied on hub cluster, status Active/Ready
  • instance-bronze.yaml expands into BackupVault + BackupPlan + BackupSelection
  • Delete cascades properly (all expanded resources removed)

Files

  • rgd-backup-policy.yaml — the ResourceGraphDefinition
  • examples/instance-{gold,silver,bronze}.yaml — per-tier example instances
  • README.md — use cases (DR, blue/green, cloning), tiers, developer contract, boundaries

allamand added 2 commits May 12, 2026 08:13
Introduces a kro ResourceGroupDefinition that expands into an ACK-managed
AWS Backup stack (BackupVault + BackupPlan + BackupSelection) parameterized
by tier:
- gold:   RPO 1h,  retention 30j, cross-region copy, cold storage 90j
- silver: RPO 24h, retention 14j, cross-region copy
- bronze: RPO 24h, retention 7j,  same-region only

Selection matches resources by tag (peeks.io/backup-tier + peeks.io/spoke),
so platform teams declare 3 policies per spoke and developers opt in via
namespace label.

Part of PeEKS DR Pattern B (GitOps control plane + AWS Backup data plane).
ADR: https://github.com/allamand/peeks-veille/blob/main/blogs/analyses/adr-peeks-dr-pattern-b.md
@allamand
allamand marked this pull request as draft May 12, 2026 10:14
@allamand

Copy link
Copy Markdown
Contributor Author

Scope expanded → PeEKS DR kit (in-progress, draft)

This PR is moving from a standalone BackupPolicy RGD to a cohesive DR kit telling the full story: produce + consume + heavy-stateful guidance. It will land as a single coherent merge, but expect several iterations before review.

What's added to the scope:

  • RestoreSelection RGD — produces static PVs with claimRef (sync-wave -5) so Argo CD can bind them at wave 0. Two approaches being tested: kro-native (RGD generating a K8s Job that pre-creates PVs) vs a two-step fallback (RestoreSelection + external hook). Decision after hub-cluster validation.
  • Heavy-stateful patterns — Postgres (pg_basebackup + WAL archive to S3) as the reference, plus a short investigation on how AWS Backup for EKS already handles complex stateful workloads natively (consistency groups, pre/post-snapshot hooks, documented limitations). The goal is to clearly draw the line between "AWS Backup covers this" vs "application-level backup required on top".
  • End-to-end drill documentation — cross-region spoke destruction + recreation via SpokeCluster RGD, with Argo CD resync + RestoreSelection hydrating the data plane. Validates the two RGDs compose correctly.

Why a single PR: reviewers get the full Pattern B story in one place. The BackupPolicy alone produces snapshots no-one knows how to consume; the kit as a whole is the artefact.

Keeping this draft until the RestoreSelection approach is validated on the hub cluster and the AWS-Backup-for-EKS investigation informs the Postgres pattern. The existing BackupPolicy work already validated (RGD Active, instance expands correctly, delete cascades) stays — nothing ripped out, only additions.

allamand added 3 commits May 12, 2026 10:14
…up-tier tags

Extends the chart to support arbitrary AWS tag propagation on EBS volumes
via the new per-SC 'tags:' map (rendered as 'tagSpecification_<N>' params
on the EBS CSI driver).

Adds three tier-labeled StorageClasses — 'peeks-gold-gp3',
'peeks-silver-gp3', 'peeks-bronze-gp3' — so workloads opt into a backup
tier by picking the right SC in their PVC manifest. The tier tag is what
BackupSelection (from BackupPolicy RGD) matches on — no central ConfigMap,
no platform ticket.

A top-level 'spokeName' value is merged into every EBS SC as
'peeks.io/spoke=<spokeName>' so cross-tenant selection works at scale.

Legacy 'ebs-sc-gp3' preserved (backward compat).
Backup protection is decided at the cluster/namespace level by the
AWS Backup for EKS resource selection (cluster ARN + namespace filter),
not at the StorageClass level. Drop the per-tier SCs (gold/silver/bronze)
to keep the StorageClass concern purely about performance.

Tier semantics (RPO, retention, cross-region) now live exclusively on
the BackupPolicy RGD, not on the SC.
allamand added a commit to allamand/appmod-blueprints that referenced this pull request May 15, 2026
Port from PR aws-samples#633 (feat/peeks-backup-policy-rgd) to the new structure
introduced by PR aws-samples#642 (feature/platform-cluster-kro-ack).

The RGD provisions BackupVault + BackupPlan + BackupSelection per tier
via ACK backup-controller. Tier semantics live on the BackupPolicy CR,
not on the StorageClass — backup selection happens at cluster/namespace
level via tag matching (peeks.io/backup-tier + peeks.io/spoke).

- gold: RPO 1h, retention 30d, cold 90d, cross-region copy
- silver: RPO 24h, retention 14d, cross-region copy
- bronze: RPO 24h, retention 7d, same-region only
allamand added a commit to allamand/appmod-blueprints that referenced this pull request May 15, 2026
Port the storageclass-resources chart from PR aws-samples#633 into the new
platform-manifests-bootstrap chart from PR aws-samples#642 — single bootstrap
chart for early cluster resources (NodePools, ClusterSecretStore,
StorageClasses).

- New template peeks-storageclass.yaml renders ebs/efs SCs from values
- New values.yaml with defaults (gpu/customNodepools/storageClasses)
- peeks-gp3: single PeEKS default SC, tier semantics live on BackupPolicy
- Volume tags propagated via tagSpecification_N parameters for AWS Backup
  selection (peeks.io/spoke, peeks.io/managed-by)
- README-storageclasses.md preserves design notes from the standalone chart
…-backup-policy-rgd-on-pr642

This branch was forked from main and is 99 commits behind
feature/platform-cluster-kro-ack. The BackupPolicy RGD has been re-homed
onto a branch that targets PR aws-samples#642 directly. Add a banner so anyone
landing here is redirected to the active branch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant