Skip to content

Commit

Permalink
use single command to uninstall mesh and cluster wide resources (open…
Browse files Browse the repository at this point in the history
…servicemesh#4491)

This commit combines the osm uninstall mesh and osm uninstall
cluster-wide-resources to a single command. The user can specify
delteion of cluster wide resources by using the flag
--delete-cluster-wide-resoures.

If there is no mesh in the cluster, the user can still use the same
command to delete the cluster wide resources by providing the flag.

 This command has been made idempotent as
well.

fixes openservicemesh#4429

Signed-off-by: Sneha Chhabria <snchh@microsoft.com>
  • Loading branch information
snehachhabria authored Feb 1, 2022
1 parent 1e0072e commit fe48a44
Show file tree
Hide file tree
Showing 6 changed files with 820 additions and 977 deletions.
8 changes: 1 addition & 7 deletions cmd/cli/uninstall.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,7 @@ func newUninstallCmd(config *action.Configuration, in io.Reader, out io.Writer)
Long: uninstallDescription,
Args: cobra.NoArgs,
}

if !settings.IsManaged() {
cmd.AddCommand(newUninstallMeshCmd(config, in, out))
}

// The command to uninstall osm cluster-wide resources should be available in both managed and unmanaged environments.
cmd.AddCommand(newUninstallClusterWideResourcesCmd(in, out))
cmd.AddCommand(newUninstallMeshCmd(config, in, out))

return cmd
}
311 changes: 0 additions & 311 deletions cmd/cli/uninstall_cluster_wide_resources.go

This file was deleted.

Loading

0 comments on commit fe48a44

Please sign in to comment.