fix(kubernetes): delete orphaned resources in new post-delete job - #3856
fix(kubernetes): delete orphaned resources in new post-delete job#3856Ray Low (crossRT) wants to merge 1 commit into
Conversation
… and oidc-bootstrap job) in new post-delete cleanup
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan includes up to 8 reviews per rolling hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe Helm chart adds a post-delete cleanup Job with dedicated RBAC resources. The Job deletes orphaned Talos PKI Secrets and the OIDC bootstrap Job. Helm tests verify hook annotations, cleanup commands, resource restrictions, and ServiceAccount wiring. ChangesPost-delete cleanup
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: 🟡 Moderate · up to The new cleanup job may lose its ServiceAccount and permissions before it starts, leaving the targeted Kubernetes resources orphaned and making the fix ineffective. This should be corrected before merging. Sequence Diagram(s)sequenceDiagram
participant Helm
participant CleanupJob
participant KubernetesAPI
Helm->>CleanupJob: Run post-delete hook
CleanupJob->>KubernetesAPI: Delete Talos Secrets and OIDC bootstrap Job
KubernetesAPI-->>CleanupJob: Return success or missing-resource status
Possibly related PRs
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 |
What this PR does
When tenant deletes the kubernetes cluster, 2 resources are orphaned and leftover in the tenant namespace.
This PR adds a new post-delete cleanup job and delete these resources manually.
Downstream repositories
Release note
Summary by CodeRabbit
New Features
Tests