Skip to content

Commit

Permalink
fix: add warning
Browse files Browse the repository at this point in the history
  • Loading branch information
exdx committed Apr 28, 2021
1 parent e06b1f0 commit 72a4e57
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions internal/cmd/operator_uninstall.go
Expand Up @@ -18,9 +18,12 @@ func newOperatorUninstallCmd(cfg *action.Configuration) *cobra.Command {
Short: "Uninstall an operator and operands",
Long: `Uninstall removes the subscription, operator and optionally operands managed by the operator as well as the relevant operatorgroup.
This command first finds and deletes the subscription associated with the operator. It then
Warning: this command permanently deletes objects from the cluster. Running uninstall concurrently with other operations
could result in undefined behavior.
The uninstall command first finds and deletes the subscription associated with the operator. It then
lists all operands found throughout the cluster for the operator
specified on the command line if one is found. Since the scope of an operator is restricted by
specified if one is found. Since the scope of an operator is restricted by
its operator group, this search will include namespace-scoped operands from the
operator group's target namespaces and all cluster-scoped operands.
Expand Down
2 changes: 1 addition & 1 deletion internal/pkg/action/operator_uninstall_test.go
Expand Up @@ -183,7 +183,7 @@ var _ = Describe("OperatorUninstall", func() {
uninstaller.Package = etcd
uninstaller.OperandStrategy.Kind = operand.Cancel
err := uninstaller.Run(context.TODO())
Expect(err.Error()).To(ContainSubstring("delete operands or re-run command with a different operand strategy"))
Expect(err.Error()).To(ContainSubstring("delete operands manually or re-run uninstall with a different operand deletion strategy"))
})

It("should ignore operands and delete sub and csv when ignore strategy is set", func() {
Expand Down

0 comments on commit 72a4e57

Please sign in to comment.