Add --delete-propagation-policy and --delete-timeout flags to kpt live destroy - #4665
Add --delete-propagation-policy and --delete-timeout flags to kpt live destroy#4665aravindtga wants to merge 2 commits into
Conversation
✅ Deploy Preview for kptdocs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
2c67291 to
59bff78
Compare
…e destroy Signed-off-by: Aravindhan Ayyanathan <aravindhan.a@est.tech>
59bff78 to
51d62ec
Compare
There was a problem hiding this comment.
🟡 Not ready to approve
The current invalid-value error path for --delete-propagation-policy returns a confusing message referencing “prune propagation policy,” which should be corrected to match the destroy flag.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Pull request overview
This PR exposes cli-utils destroy deletion controls through kpt live destroy, adding user-facing flags for deletion propagation policy and deletion timeout, and updates docs/tests accordingly to match the new CLI surface.
Changes:
- Add
--delete-propagation-policyand--delete-timeoutflags tokpt live destroyand wire them intoapply.DestroyerOptions. - Update generated/live docs and reference docs to document the new flags.
- Extend destroy command unit tests to cover flag validation and parsing for the new flags.
File summaries
| File | Description |
|---|---|
| internal/docs/generated/livedocs/docs.go | Adds generated help text entries for the new destroy flags. |
| documentation/content/en/reference/cli/live/destroy/_index.md | Updates CLI reference docs to include the new destroy flags. |
| commands/live/destroy/cmddestroy.go | Introduces new CLI flags, parses them, and passes values into destroy options. |
| commands/live/destroy/cmddestroy_test.go | Adds/updates tests to validate new flag parsing and invalid-value handling. |
Review details
- Files reviewed: 3/4 changed files
- Comments generated: 1
- Review effort level: Low
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
Signed-off-by: Aravindhan Ayyanathan <aravindhan.a@est.tech>
|



Description
--delete-propagation-policyand--delete-timeoutflags tokpt live destroy, bringing it to parity withkpt live applywhich already has--prune-propagation-policyand--prune-timeout.DestroyerOptionshas supportedDeletePropagationPolicyandDeleteTimeoutsince Refactor destroyer to use tasks kubernetes-sigs/cli-utils#366, but kpt was not exposing them as CLI flags.--delete-propagation-policy: Controls how dependents are handled during deletion (Background,Foreground,Orphan). Default:Background.--delete-timeout: How long to wait for resources to be fully deleted. Default:0(wait indefinitely).Fixes #1461
Type of Change
Checklist
AI Disclosure
If so, please describe how: