when enable addons differentiate message for maintainer and verified maintainer

pull/14499/head
inifares23lab 2022-07-07 15:28:03 +02:00
parent 2a43f3347a
commit 7dfe7e65e4
2 changed files with 18 additions and 6 deletions

View File

@ -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)

View File

@ -154,7 +154,7 @@ var Addons = map[string]*Addon{
vmpath.GuestAddonsDir,
"pod-security-policy.yaml",
"0640"),
}, false, "pod-security-policy", "3rd party (pod-security-policy)", "", "", nil, nil),
}, false, "pod-security-policy", "3rd party (unknown)", "", "", nil, nil),
"storage-provisioner": NewAddon([]*BinAsset{
MustBinAsset(addons.StorageProvisionerAssets,
"storage-provisioner/storage-provisioner.yaml.tmpl",
@ -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
@ -388,7 +388,7 @@ var Addons = map[string]*Addon{
vmpath.GuestAddonsDir,
"patch-coredns-job.yaml",
"0640"),
}, false, "registry-aliases", "3rd party (registry-aliases)", "", "", map[string]string{
}, false, "registry-aliases", "3rd party (unknown)", "", "", map[string]string{
"CoreDNSPatcher": "rhdevelopers/core-dns-patcher@sha256:9220ff32f690c3d889a52afb59ca6fcbbdbd99e5370550cc6fd249adea8ed0a9",
"Alpine": "alpine:3.11@sha256:0bd0e9e03a022c3b0226667621da84fc9bf562a9056130424b5bfbd8bcb0397f",
"Pause": "google_containers/pause:3.1@sha256:f78411e19d84a252e53bff71a4407a5686c46983a2c2eeed83929b888179acea",
@ -442,7 +442,7 @@ var Addons = map[string]*Addon{
vmpath.GuestAddonsDir,
"logviewer-rbac.yaml",
"0640"),
}, false, "logviewer", "3rd party (ivans3)", "", "", map[string]string{
}, false, "logviewer", "3rd party (unknown)", "", "", map[string]string{
"LogViewer": "ivans3/minikube-log-viewer:latest@sha256:75854f45305cc47d17b04c6c588fa60777391761f951e3a34161ddf1f1b06405",
}, nil),
"gvisor": NewAddon([]*BinAsset{