Avoid SIGSEGV when heapster addon will be disabled

pull/8455/head
Kenta Iso 2020-06-11 22:14:44 +09:00
parent d76b58c3ae
commit d7a9721712
1 changed files with 3 additions and 0 deletions

View File

@ -33,6 +33,9 @@ var addonsDisableCmd = &cobra.Command{
}
addon := args[0]
if addon == "heapster" {
exit.WithCodeT(exit.Unavailable, "There is no heapster addon")
}
err := addons.SetAndSave(ClusterFlagValue(), addon, "false")
if err != nil {
exit.WithError("disable failed", err)