feat(kro): add protectFromDeletion parameter to EksCluster and Vpc RGDs - #753
Draft
allamand wants to merge 1 commit into
Draft
feat(kro): add protectFromDeletion parameter to EksCluster and Vpc RGDs#753allamand wants to merge 1 commit into
allamand wants to merge 1 commit into
Conversation
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
marked this pull request as draft
June 24, 2026 13:20
Contributor
Author
|
Trying to see if a dynamic annotation merge feature could be done in kro |
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
SpringClean deletes EKS clusters and NAT Gateways managed by kro because manually-applied
auto-delete: notags are overwritten by kro reconciliation.Solution
Adds a new optional schema field
protectFromDeletion(default:"true") to both the EksCluster and Vpc RGDs. This propagates anauto-deletetag via CEL ternary: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-deletetag on EKS Clusterrg-vpc.yaml: added schema field +auto-deletetag on VPC and NAT GatewayTesting
Existing instances don't need changes — the new field defaults to
true, so next ArgoCD sync will tag all clusters/VPCs withauto-delete: noautomatically.