feat: cleanup done exec / debug CR after graceperiod#200
Open
Tom Bojer (tombojer) wants to merge 2 commits into
Open
feat: cleanup done exec / debug CR after graceperiod#200Tom Bojer (tombojer) wants to merge 2 commits into
Tom Bojer (tombojer) wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds automatic cleanup of successful (done) StoreExec and StoreDebugInstance custom resources after a configurable grace period, exposed via operator config and Helm values. This helps reduce CR noise/accumulation while allowing operators time to inspect completed resources.
Changes:
- Add
CleanupGracePeriodsupport toStoreExecReconcilerandStoreDebugInstanceReconciler, deleting successful one-shot CRs after the grace period (with requeue scheduling when not yet due). - Expose grace period as
SUCCESSFUL_CR_CLEANUP_GRACE_PERIOD(config + Helm) with default1hand allow disabling via0. - Add unit tests covering cleanup eligibility, deletion timing, and disabled behavior.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/controller/successful_cleanup_test.go | New tests for successful-CR cleanup behavior (StoreExec + StoreDebugInstance). |
| internal/controller/storeexec_controller.go | Adds grace-period-based cleanup for successful StoreExec CRs. |
| internal/controller/storedebuginstance_controller.go | Adds grace-period-based cleanup for successful StoreDebugInstance CRs. |
| internal/config/config.go | Adds SuccessfulCRCleanupGracePeriod to operator config/env parsing. |
| helm/values.yaml | Adds Helm value for cleanup grace period with docs. |
| helm/templates/deployment.yaml | Wires Helm value into env var SUCCESSFUL_CR_CLEANUP_GRACE_PERIOD. |
| cmd/main.go | Passes configured grace period into both reconcilers. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
No description provided.