From 7101eafdb3539ba2ef2afed11bf68e5d506bbc38 Mon Sep 17 00:00:00 2001 From: inifares23lab Date: Thu, 7 Jul 2022 15:28:03 +0200 Subject: [PATCH] when enable addons differentiate message for maintainer and verified maintainer --- cmd/minikube/cmd/config/enable.go | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/cmd/minikube/cmd/config/enable.go b/cmd/minikube/cmd/config/enable.go index 5a16827935ef..cbc2e4657c43 100644 --- a/cmd/minikube/cmd/config/enable.go +++ b/cmd/minikube/cmd/config/enable.go @@ -54,8 +54,19 @@ var addonsEnableCmd = &cobra.Command{ out.Styled(style.Warning, "The OLM addon has stopped working, for more details visit: https://github.com/operator-framework/operator-lifecycle-manager/issues/2534") } addonBundle, ok := assets.Addons[addon] - if ok && addonBundle.VerifiedMaintainer == "" { - out.Styled(style.Warning, fmt.Sprintf("The %s addon doesn't have a verified maintainer.", addon)) + if ok { + maintainer := addonBundle.Maintainer + if maintainer == "Google" || maintainer == "Kubernetes" { + out.Styled(style.Tip, `{{.addon}} is an addon maintained by {{.maintainer}}. For any concerns contact minikube on GitHub. +You can view the list of minikube maintainers at: https://github.com/kubernetes/minikube/blob/master/OWNERS`, + out.V{"addon": addon, "maintainer": maintainer}) + } else if verifiedMaintainer := addonBundle.VerifiedMaintainer; verifiedMaintainer != "" { + out.Styled(style.Tip, `{{.addon}} is maintained by {{.maintainer}} for any concerns contact {{.verifiedMaintainer}} on GitHub.`, + out.V{"addon": addon, "maintainer": maintainer, "verifiedMaintainer": verifiedMaintainer}) + } else { + out.Styled(style.Warning, `{{.addon}} is a 3rd party addon and not maintained or verified by minikube maintainers, enable at your own risk.`, + out.V{"addon": addon}) + } } viper.Set(config.AddonImages, images) viper.Set(config.AddonRegistries, registries)