diff --git a/cmd/minikube/cmd/config/disable.go b/cmd/minikube/cmd/config/disable.go index fc40a33ba5df..926cebcf222c 100644 --- a/cmd/minikube/cmd/config/disable.go +++ b/cmd/minikube/cmd/config/disable.go @@ -33,7 +33,7 @@ var addonsDisableCmd = &cobra.Command{ if len(args) != 1 { exit.Message(reason.Usage, "usage: minikube addons disable ADDON_NAME") } - err := addons.CheckPaused(ClusterFlagValue(), false) + err := addons.VerifyNotPaused(ClusterFlagValue(), false) if err != nil { exit.Error(reason.InternalAddonDisablePaused, "disable failed", err) } diff --git a/cmd/minikube/cmd/config/enable.go b/cmd/minikube/cmd/config/enable.go index ef71d906edf0..7617f8243109 100644 --- a/cmd/minikube/cmd/config/enable.go +++ b/cmd/minikube/cmd/config/enable.go @@ -39,7 +39,7 @@ var addonsEnableCmd = &cobra.Command{ if len(args) != 1 { exit.Message(reason.Usage, "usage: minikube addons enable ADDON_NAME") } - err := addons.CheckPaused(ClusterFlagValue(), true) + err := addons.VerifyNotPaused(ClusterFlagValue(), true) if err != nil { exit.Error(reason.InternalAddonEnablePaused, "enabled failed", err) } diff --git a/pkg/addons/addons.go b/pkg/addons/addons.go index 1d182de09c4a..cd6d41cb9ae9 100644 --- a/pkg/addons/addons.go +++ b/pkg/addons/addons.go @@ -581,8 +581,8 @@ func UpdateConfigToDisable(cc *config.ClusterConfig) { } } -// CheckPaused checks whether the cluster is paused before enable/disable an addon. -func CheckPaused(profile string, enable bool) error { +// VerifyNotPaused verifies the cluster is not paused before enable/disable an addon. +func VerifyNotPaused(profile string, enable bool) error { klog.Info("checking whether the cluster is paused") cc, err := config.Load(profile)