Skip to content

Commit

Permalink
Merge pull request kubernetes#11753 from andriyDev/AddonMaintainers
Browse files Browse the repository at this point in the history
Add maintainer column to addons list
  • Loading branch information
medyagh authored Jun 25, 2021
2 parents 6ac71f1 + 2f523eb commit 512ae30
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 35 deletions.
8 changes: 6 additions & 2 deletions cmd/minikube/cmd/config/addons_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,19 @@ var printAddonsList = func(cc *config.ClusterConfig) {

var tData [][]string
table := tablewriter.NewWriter(os.Stdout)
table.SetHeader([]string{"Addon Name", "Profile", "Status"})
table.SetHeader([]string{"Addon Name", "Profile", "Status", "Maintainer"})
table.SetAutoFormatHeaders(true)
table.SetBorders(tablewriter.Border{Left: true, Top: true, Right: true, Bottom: true})
table.SetCenterSeparator("|")

for _, addonName := range addonNames {
addonBundle := assets.Addons[addonName]
enabled := addonBundle.IsEnabled(cc)
tData = append(tData, []string{addonName, cc.Name, fmt.Sprintf("%s %s", stringFromStatus(enabled), iconFromStatus(enabled))})
maintainer := addonBundle.Maintainer
if maintainer == "" {
maintainer = "unknown (third-party)"
}
tData = append(tData, []string{addonName, cc.Name, fmt.Sprintf("%s %s", stringFromStatus(enabled), iconFromStatus(enabled)), maintainer})
}

table.AppendBulk(tData)
Expand Down
68 changes: 35 additions & 33 deletions pkg/minikube/assets/addons.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@ import (

// Addon is a named list of assets, that can be enabled
type Addon struct {
Assets []*BinAsset
enabled bool
addonName string
Images map[string]string
Assets []*BinAsset
enabled bool
addonName string
Maintainer string
Images map[string]string

// Registries currently only shows the default registry of images
Registries map[string]string
Expand All @@ -48,11 +49,12 @@ type NetworkInfo struct {
}

// NewAddon creates a new Addon
func NewAddon(assets []*BinAsset, enabled bool, addonName string, images map[string]string, registries map[string]string) *Addon {
func NewAddon(assets []*BinAsset, enabled bool, addonName string, maintainer string, images map[string]string, registries map[string]string) *Addon {
a := &Addon{
Assets: assets,
enabled: enabled,
addonName: addonName,
Maintainer: maintainer,
Images: images,
Registries: registries,
}
Expand Down Expand Up @@ -111,7 +113,7 @@ var Addons = map[string]*Addon{
"0640"),

// GuestPersistentDir
}, false, "auto-pause", map[string]string{
}, false, "auto-pause", "google", map[string]string{
"AutoPauseHook": "k8s-minikube/auto-pause-hook:v0.0.2@sha256:c76be418df5ca9c66d0d11c2c68461acbf4072c1cdfc17e64729c5ef4d5a4128",
}, map[string]string{
"AutoPauseHook": "gcr.io",
Expand All @@ -128,7 +130,7 @@ var Addons = map[string]*Addon{
MustBinAsset(addons.DashboardAssets, "dashboard/dashboard-sa.yaml", vmpath.GuestAddonsDir, "dashboard-sa.yaml", "0640"),
MustBinAsset(addons.DashboardAssets, "dashboard/dashboard-secret.yaml", vmpath.GuestAddonsDir, "dashboard-secret.yaml", "0640"),
MustBinAsset(addons.DashboardAssets, "dashboard/dashboard-svc.yaml", vmpath.GuestAddonsDir, "dashboard-svc.yaml", "0640"),
}, false, "dashboard", map[string]string{
}, false, "dashboard", "kubernetes", map[string]string{
"Dashboard": "kubernetesui/dashboard:v2.1.0@sha256:7f80b5ba141bead69c4fee8661464857af300d7d7ed0274cf7beecedc00322e6",
"MetricsScraper": "kubernetesui/metrics-scraper:v1.0.4@sha256:555981a24f184420f3be0c79d4efb6c948a85cfce84034f85a563f4151a81cbf",
}, nil),
Expand All @@ -138,21 +140,21 @@ var Addons = map[string]*Addon{
vmpath.GuestAddonsDir,
"storageclass.yaml",
"0640"),
}, true, "default-storageclass", nil, nil),
}, true, "default-storageclass", "kubernetes", nil, nil),
"pod-security-policy": NewAddon([]*BinAsset{
MustBinAsset(addons.PodSecurityPolicyAssets,
"pod-security-policy/pod-security-policy.yaml.tmpl",
vmpath.GuestAddonsDir,
"pod-security-policy.yaml",
"0640"),
}, false, "pod-security-policy", nil, nil),
}, false, "pod-security-policy", "", nil, nil),
"storage-provisioner": NewAddon([]*BinAsset{
MustBinAsset(addons.StorageProvisionerAssets,
"storage-provisioner/storage-provisioner.yaml.tmpl",
vmpath.GuestAddonsDir,
"storage-provisioner.yaml",
"0640"),
}, true, "storage-provisioner", map[string]string{
}, true, "storage-provisioner", "kubernetes", map[string]string{
"StorageProvisioner": fmt.Sprintf("k8s-minikube/storage-provisioner:%s", version.GetStorageProvisionerVersion()),
}, map[string]string{
"StorageProvisioner": "gcr.io",
Expand All @@ -178,7 +180,7 @@ var Addons = map[string]*Addon{
vmpath.GuestAddonsDir,
"storage-privisioner-glusterfile.yaml",
"0640"),
}, false, "storage-provisioner-gluster", map[string]string{
}, false, "storage-provisioner-gluster", "", map[string]string{
"Heketi": "heketi/heketi:10@sha256:76d5a6a3b7cf083d1e99efa1c15abedbc5c8b73bef3ade299ce9a4c16c9660f8",
"GlusterfileProvisioner": "gluster/glusterfile-provisioner:latest@sha256:9961a35cb3f06701958e202324141c30024b195579e5eb1704599659ddea5223",
"GlusterfsServer": "nixpanic/glusterfs-server:pr_fake-disk@sha256:3c58ae9d4e2007758954879d3f4095533831eb757c64ca6a0e32d1fc53fb6034",
Expand Down Expand Up @@ -216,7 +218,7 @@ var Addons = map[string]*Addon{
vmpath.GuestAddonsDir,
"kibana-svc.yaml",
"0640"),
}, false, "efk", map[string]string{
}, false, "efk", "", map[string]string{
"Elasticsearch": "elasticsearch:v5.6.2@sha256:7e95b32a7a2aad0c0db5c881e4a1ce8b7e53236144ae9d9cfb5fbe5608af4ab2",
"FluentdElasticsearch": "fluentd-elasticsearch:v2.0.2@sha256:d0480bbf2d0de2344036fa3f7034cf7b4b98025a89c71d7f1f1845ac0e7d5a97",
"Alpine": "alpine:3.6@sha256:66790a2b79e1ea3e1dabac43990c54aca5d1ddf268d9a5a0285e4167c8b24475",
Expand All @@ -242,7 +244,7 @@ var Addons = map[string]*Addon{
vmpath.GuestAddonsDir,
"ingress-dp.yaml",
"0640"),
}, false, "ingress", map[string]string{
}, false, "ingress", "", map[string]string{
"IngressController": "ingress-nginx/controller:v0.44.0@sha256:3dd0fac48073beaca2d67a78c746c7593f9c575168a17139a9955a82c63c4b9a",
"KubeWebhookCertgenCreate": "docker.io/jettech/kube-webhook-certgen:v1.5.1@sha256:950833e19ade18cd389d647efb88992a7cc077abedef343fa59e012d376d79b7",
"KubeWebhookCertgenPatch": "docker.io/jettech/kube-webhook-certgen:v1.5.1@sha256:950833e19ade18cd389d647efb88992a7cc077abedef343fa59e012d376d79b7",
Expand All @@ -255,7 +257,7 @@ var Addons = map[string]*Addon{
vmpath.GuestAddonsDir,
"istio-operator.yaml",
"0640"),
}, false, "istio-provisioner", map[string]string{
}, false, "istio-provisioner", "", map[string]string{
"IstioOperator": "istio/operator:1.5.0@sha256:25a6398ed4996a5313767ceb63768d503c266f63506ad3074b30eef6b5b5167e",
}, nil),
"istio": NewAddon([]*BinAsset{
Expand All @@ -264,14 +266,14 @@ var Addons = map[string]*Addon{
vmpath.GuestAddonsDir,
"istio-default-profile.yaml",
"0640"),
}, false, "istio", nil, nil),
}, false, "istio", "", nil, nil),
"kubevirt": NewAddon([]*BinAsset{
MustBinAsset(addons.KubevirtAssets,
"kubevirt/pod.yaml.tmpl",
vmpath.GuestAddonsDir,
"pod.yaml",
"0640"),
}, false, "kubevirt", map[string]string{
}, false, "kubevirt", "", map[string]string{
"Kubectl": "bitnami/kubectl:1.17@sha256:de642e973d3d0ef60e4d0a1f92286a9fdae245535c5990d4762bbe86fcf95887",
}, nil),
"metrics-server": NewAddon([]*BinAsset{
Expand All @@ -295,7 +297,7 @@ var Addons = map[string]*Addon{
vmpath.GuestAddonsDir,
"metrics-server-service.yaml",
"0640"),
}, false, "metrics-server", map[string]string{
}, false, "metrics-server", "kubernetes", map[string]string{
"MetricsServer": "metrics-server/metrics-server:v0.4.2@sha256:dbc33d7d35d2a9cc5ab402005aa7a0d13be6192f3550c7d42cba8d2d5e3a5d62",
}, map[string]string{
"MetricsServer": "k8s.gcr.io",
Expand All @@ -311,7 +313,7 @@ var Addons = map[string]*Addon{
vmpath.GuestAddonsDir,
"olm.yaml",
"0640"),
}, false, "olm", map[string]string{
}, false, "olm", "", map[string]string{
"OLM": "operator-framework/olm:v0.17.0@sha256:de396b540b82219812061d0d753440d5655250c621c753ed1dc67d6154741607",
"UpstreamCommunityOperators": "operator-framework/upstream-community-operators:07bbc13@sha256:cc7b3fdaa1ccdea5866fcd171669dc0ed88d3477779d8ed32e3712c827e38cc0",
}, map[string]string{
Expand All @@ -334,7 +336,7 @@ var Addons = map[string]*Addon{
vmpath.GuestAddonsDir,
"registry-proxy.yaml",
"0640"),
}, false, "registry", map[string]string{
}, false, "registry", "google", map[string]string{
"Registry": "registry:2.7.1@sha256:d5459fcb27aecc752520df4b492b08358a1912fcdfa454f7d2101d4b09991daa",
"KubeRegistryProxy": "google_containers/kube-registry-proxy:0.4@sha256:1040f25a5273de0d72c54865a8efd47e3292de9fb8e5353e3fa76736b854f2da",
}, map[string]string{
Expand All @@ -346,7 +348,7 @@ var Addons = map[string]*Addon{
vmpath.GuestAddonsDir,
"registry-creds-rc.yaml",
"0640"),
}, false, "registry-creds", map[string]string{
}, false, "registry-creds", "", map[string]string{
"RegistryCreds": "upmcenterprises/registry-creds:1.10@sha256:93a633d4f2b76a1c66bf19c664dbddc56093a543de6d54320f19f585ccd7d605",
}, nil),
"registry-aliases": NewAddon([]*BinAsset{
Expand Down Expand Up @@ -375,7 +377,7 @@ var Addons = map[string]*Addon{
vmpath.GuestAddonsDir,
"patch-coredns-job.yaml",
"0640"),
}, false, "registry-aliases", map[string]string{
}, false, "registry-aliases", "", map[string]string{
"CoreDNSPatcher": "rhdevelopers/core-dns-patcher@sha256:9220ff32f690c3d889a52afb59ca6fcbbdbd99e5370550cc6fd249adea8ed0a9",
"Alpine": "alpine:3.11@sha256:0bd0e9e03a022c3b0226667621da84fc9bf562a9056130424b5bfbd8bcb0397f",
"Pause": "google_containers/pause:3.1@sha256:f78411e19d84a252e53bff71a4407a5686c46983a2c2eeed83929b888179acea",
Expand All @@ -389,7 +391,7 @@ var Addons = map[string]*Addon{
vmpath.GuestAddonsDir,
"freshpod-rc.yaml",
"0640"),
}, false, "freshpod", map[string]string{
}, false, "freshpod", "google", map[string]string{
"FreshPod": "google-samples/freshpod:v0.0.1@sha256:b9efde5b509da3fd2959519c4147b653d0c5cefe8a00314e2888e35ecbcb46f9",
}, map[string]string{
"FreshPod": "gcr.io",
Expand All @@ -400,7 +402,7 @@ var Addons = map[string]*Addon{
vmpath.GuestAddonsDir,
"nvidia-driver-installer.yaml",
"0640"),
}, false, "nvidia-driver-installer", map[string]string{
}, false, "nvidia-driver-installer", "google", map[string]string{
"NvidiaDriverInstaller": "minikube-nvidia-driver-installer:e2d9b43228decf5d6f7dce3f0a85d390f138fa01",
"Pause": "pause:2.0@sha256:9ce5316f9752b8347484ab0f6778573af15524124d52b93230b9a0dcc987e73e",
}, map[string]string{
Expand All @@ -413,7 +415,7 @@ var Addons = map[string]*Addon{
vmpath.GuestAddonsDir,
"nvidia-gpu-device-plugin.yaml",
"0640"),
}, false, "nvidia-gpu-device-plugin", map[string]string{
}, false, "nvidia-gpu-device-plugin", "", map[string]string{
"NvidiaDevicePlugin": "nvidia/k8s-device-plugin:1.0.0-beta4@sha256:94d46bf513cbc43c4d77a364e4bbd409d32d89c8e686e12551cc3eb27c259b90",
}, nil),
"logviewer": NewAddon([]*BinAsset{
Expand All @@ -427,7 +429,7 @@ var Addons = map[string]*Addon{
vmpath.GuestAddonsDir,
"logviewer-rbac.yaml",
"0640"),
}, false, "logviewer", map[string]string{
}, false, "logviewer", "google", map[string]string{
"LogViewer": "ivans3/minikube-log-viewer:latest@sha256:75854f45305cc47d17b04c6c588fa60777391761f951e3a34161ddf1f1b06405",
}, nil),
"gvisor": NewAddon([]*BinAsset{
Expand All @@ -446,7 +448,7 @@ var Addons = map[string]*Addon{
vmpath.GuestGvisorDir,
constants.GvisorConfigTomlTargetName,
"0640"),
}, false, "gvisor", map[string]string{
}, false, "gvisor", "google", map[string]string{
"GvisorAddon": "k8s-minikube/gvisor-addon:3@sha256:23eb17d48a66fc2b09c31454fb54ecae520c3e9c9197ef17fcb398b4f31d505a",
}, map[string]string{
"GvisorAddon": "gcr.io",
Expand All @@ -467,7 +469,7 @@ var Addons = map[string]*Addon{
vmpath.GuestAddonsDir,
"helm-tiller-svc.yaml",
"0640"),
}, false, "helm-tiller", map[string]string{
}, false, "helm-tiller", "", map[string]string{
"Tiller": "kubernetes-helm/tiller:v2.16.12@sha256:6003775d503546087266eda39418d221f9afb5ccfe35f637c32a1161619a3f9c",
}, map[string]string{
"Tiller": "gcr.io",
Expand All @@ -478,7 +480,7 @@ var Addons = map[string]*Addon{
vmpath.GuestAddonsDir,
"ingress-dns-pod.yaml",
"0640"),
}, false, "ingress-dns", map[string]string{
}, false, "ingress-dns", "", map[string]string{
"IngressDNS": "cryptexlabs/minikube-ingress-dns:0.3.0@sha256:e252d2a4c704027342b303cc563e95d2e71d2a0f1404f55d676390e28d5093ab",
}, nil),
"metallb": NewAddon([]*BinAsset{
Expand All @@ -492,7 +494,7 @@ var Addons = map[string]*Addon{
vmpath.GuestAddonsDir,
"metallb-config.yaml",
"0640"),
}, false, "metallb", map[string]string{
}, false, "metallb", "", map[string]string{
"Speaker": "metallb/speaker:v0.9.6@sha256:c66585a805bed1a3b829d8fb4a4aab9d87233497244ebff96f1b88f1e7f8f991",
"Controller": "metallb/controller:v0.9.6@sha256:fbfdb9d3f55976b0ee38f3309d83a4ca703efcf15d6ca7889cd8189142286502",
}, nil),
Expand All @@ -512,7 +514,7 @@ var Addons = map[string]*Addon{
vmpath.GuestAddonsDir,
"ambassadorinstallation.yaml",
"0640"),
}, false, "ambassador", map[string]string{
}, false, "ambassador", "", map[string]string{
"AmbassadorOperator": "datawire/ambassador-operator:v1.2.3@sha256:492f33e0828a371aa23331d75c11c251b21499e31287f026269e3f6ec6da34ed",
}, map[string]string{
"AmbassadorOperator": "quay.io",
Expand All @@ -533,7 +535,7 @@ var Addons = map[string]*Addon{
vmpath.GuestAddonsDir,
"gcp-auth-webhook.yaml",
"0640"),
}, false, "gcp-auth", map[string]string{
}, false, "gcp-auth", "google", map[string]string{
"KubeWebhookCertgen": "jettech/kube-webhook-certgen:v1.3.0@sha256:ff01fba91131ed260df3f3793009efbf9686f5a5ce78a85f81c386a4403f7689",
"GCPAuthWebhook": "k8s-minikube/gcp-auth-webhook:v0.0.6@sha256:c407ad6ee97d8a0e8a21c713e2d9af66aaf73315e4a123874c00b786f962f3cd",
}, map[string]string{
Expand Down Expand Up @@ -572,7 +574,7 @@ var Addons = map[string]*Addon{
vmpath.GuestAddonsDir,
"volume-snapshot-controller-deployment.yaml",
"0640"),
}, false, "volumesnapshots", map[string]string{
}, false, "volumesnapshots", "kubernetes", map[string]string{
"SnapshotController": "sig-storage/snapshot-controller:v4.0.0@sha256:00fcc441ea9f72899c25eed61d602272a2a58c5f0014332bdcb5ac24acef08e4",
}, map[string]string{
"SnapshotController": "k8s.gcr.io",
Expand Down Expand Up @@ -643,7 +645,7 @@ var Addons = map[string]*Addon{
vmpath.GuestAddonsDir,
"csi-hostpath-storageclass.yaml",
"0640"),
}, false, "csi-hostpath-driver", map[string]string{
}, false, "csi-hostpath-driver", "kubernetes", map[string]string{
"Attacher": "sig-storage/csi-attacher:v3.1.0@sha256:50c3cfd458fc8e0bf3c8c521eac39172009382fc66dc5044a330d137c6ed0b09",
"HostMonitorAgent": "sig-storage/csi-external-health-monitor-agent:v0.2.0@sha256:c20d4a4772599e68944452edfcecc944a1df28c19e94b942d526ca25a522ea02",
"HostMonitorController": "sig-storage/csi-external-health-monitor-controller:v0.2.0@sha256:14988b598a180cc0282f3f4bc982371baf9a9c9b80878fb385f8ae8bd04ecf16",
Expand Down

0 comments on commit 512ae30

Please sign in to comment.