From d76b58c3aea76d88b6a44021f236cd7d75887cf3 Mon Sep 17 00:00:00 2001 From: Kenta Iso Date: Thu, 11 Jun 2020 21:55:29 +0900 Subject: [PATCH] Add heapster alias to metrics-server addon --- cmd/minikube/cmd/config/enable.go | 5 +++++ pkg/addons/config.go | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/cmd/minikube/cmd/config/enable.go b/cmd/minikube/cmd/config/enable.go index f05daadfd6..e3d28969ba 100644 --- a/cmd/minikube/cmd/config/enable.go +++ b/cmd/minikube/cmd/config/enable.go @@ -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) diff --git a/pkg/addons/config.go b/pkg/addons/config.go index 80fb4ad6f5..3283754a60 100644 --- a/pkg/addons/config.go +++ b/pkg/addons/config.go @@ -149,4 +149,9 @@ var Addons = []*Addon{ set: SetBool, callbacks: []setFn{enableOrDisableAddon}, }, + { + name: "heapster", + set: SetBool, + callbacks: []setFn{enableOrDisableAddon}, + }, }