Add heapster alias to metrics-server addon

pull/8455/head
Kenta Iso 2020-06-11 21:55:29 +09:00
parent 46d23c48b4
commit d76b58c3ae
2 changed files with 10 additions and 0 deletions

View File

@ -32,6 +32,11 @@ var addonsEnableCmd = &cobra.Command{
exit.UsageT("usage: minikube addons enable ADDON_NAME")
}
addon := args[0]
// replace heapster as metrics-server because heapster is deprecated
if addon == "heapster" {
out.T(out.Waiting, "enable metrics-server addon instead of heapster addon because heapster is deprecated")
addon = "metrics-server"
}
err := addons.SetAndSave(ClusterFlagValue(), addon, "true")
if err != nil {
exit.WithError("enable failed", err)

View File

@ -149,4 +149,9 @@ var Addons = []*Addon{
set: SetBool,
callbacks: []setFn{enableOrDisableAddon},
},
{
name: "heapster",
set: SetBool,
callbacks: []setFn{enableOrDisableAddon},
},
}