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 16, 2022
1 parent 2a43f33 commit 179ce6f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
16 changes: 14 additions & 2 deletions cmd/minikube/cmd/config/enable.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,20 @@ 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 {
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})
if addonBundle.VerifiedMaintainer != "" {
out.Styled(style.Tip, `{{.addon}} is maintained by {{.maintainer}} for any concerns contact {{.verifiedMaintainer}} on GitHub.`,
out.V{"addon": addon, "maintainer": maintainer, "verifiedMaintainer": addonBundle.VerifiedMaintainer})
}
}
}
viper.Set(config.AddonImages, images)
viper.Set(config.AddonRegistries, registries)
Expand Down
2 changes: 1 addition & 1 deletion pkg/minikube/assets/addons.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ var Addons = map[string]*Addon{
vmpath.GuestAddonsDir,
"ingress-deploy.yaml",
"0640"),
}, false, "ingress", "3rd party (Ingress)", "", "https://kubernetes.io/docs/tasks/access-application-cluster/ingress-minikube/", map[string]string{
}, false, "ingress", "Kubernetes", "", "https://kubernetes.io/docs/tasks/access-application-cluster/ingress-minikube/", map[string]string{
// https://github.com/kubernetes/ingress-nginx/blob/c32f9a43279425920c41ba2e54dfcb1a54c0daf7/deploy/static/provider/kind/deploy.yaml#L834
"IngressController": "ingress-nginx/controller:v1.2.1@sha256:5516d103a9c2ecc4f026efbd4b40662ce22dc1f824fb129ed121460aaa5c47f8",
// https://github.com/kubernetes/ingress-nginx/blob/fc38b9f2aa2d68ee00c417cf97e727b77a00c175/deploy/static/provider/kind/deploy.yaml#L621
Expand Down

0 comments on commit 179ce6f

Please sign in to comment.