Skip to content

Commit

Permalink
when enable addons differentiate message for maintainer and verified …
Browse files Browse the repository at this point in the history
…maintainer
  • Loading branch information
inifares23lab committed Jul 7, 2022
1 parent 2a43f33 commit b9eaa83
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions cmd/minikube/cmd/config/enable.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {{.verified_maintainer}} on GitHub.`,
out.V{"addon": addon, "maintainer": maintainer, "verified_maintainer": 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)
Expand Down

0 comments on commit b9eaa83

Please sign in to comment.