Closed joelanford closed 2 years ago
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: joelanford
The full list of commands accepted by this bot can be found here.
The pull request process is described here
Is there something I'm forgetting about why a full wipe of an operator is something we can't/shouldn't support? The one thing that comes to mind for me is that it could leave other operators that depend on this one in a broken state, but it seems like that's already possible with --operand-strategy=delete
.
/lgtm
This PR adds flags and functionality for deleting more operator-related objects
--delete-operator
- delete the operator object and everything it references, implies--operand-strategy=delete
.--delete-all
- basically--delete-operator --delete-operator-groups
It also simplifies the
operand.DeletionStrategy
type to be a string instead of a struct.Lastly, it adds a specific error for
CancelStrategyError
to decouple the uninstall CLI from the uninstall action. This enables moving CLI-specific logging to the CLI layer.We can probably debate the UX for the re-added deletion flags, but ever since we've removed
--delete-all
on themain
branch, I've found myself rebuilding from the v0.3.0 tag so I could keep using it.The frequency that I personally do
kubectl operator install
, run a few tests, and then dokubectl operator uninstall -X
tells me that it is a very useful option to have, and I think that merits adding it back in, at least until we come up with an alternative that maintains a simple install, test, wipe clean type of workflow.