Skip to content

feat(kro): add protectFromDeletion parameter to EksCluster and Vpc RGDs - #753

Draft
allamand wants to merge 1 commit into
mainfrom
feat/springclean-protection
Draft

feat(kro): add protectFromDeletion parameter to EksCluster and Vpc RGDs#753
allamand wants to merge 1 commit into
mainfrom
feat/springclean-protection

Conversation

@allamand

Copy link
Copy Markdown
Contributor

Problem

SpringClean deletes EKS clusters and NAT Gateways managed by kro because manually-applied auto-delete: no tags are overwritten by kro reconciliation.

Solution

Adds a new optional schema field protectFromDeletion (default: "true") to both the EksCluster and Vpc RGDs. This propagates an auto-delete tag via CEL ternary:

auto-delete: ${schema.spec.protectFromDeletion == "true" ? "no" : "yes"}

Default behavior: all clusters and VPCs are protected (opt-out model).

To allow cleanup, set protectFromDeletion: "false" in the EksCluster/Vpc instance.

Changes

  • rg-eks.yaml: added schema field + auto-delete tag on EKS Cluster
  • rg-vpc.yaml: added schema field + auto-delete tag on VPC and NAT Gateway

Testing

Existing instances don't need changes — the new field defaults to true, so next ArgoCD sync will tag all clusters/VPCs with auto-delete: no automatically.

Adds a new optional schema field 'protectFromDeletion' (default: true) that
propagates an 'auto-delete' tag to EKS clusters, VPCs, and NAT Gateways.

When set to 'true' (default), resources are tagged with 'auto-delete: no',
preventing SpringClean from scheduling them for deletion. When set to 'false',
the tag value is 'yes' (opt-in to cleanup).

This fixes an issue where manually-applied tags were overwritten by kro
reconciliation, causing SpringClean to delete protected clusters.

Affected RGDs:
- rg-eks.yaml: EKS Cluster tags
- rg-vpc.yaml: VPC tags + NAT Gateway tags
@allamand
allamand marked this pull request as draft June 24, 2026 13:20
@allamand

Copy link
Copy Markdown
Contributor Author

Trying to see if a dynamic annotation merge feature could be done in kro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant