Skip to content

Commit

Permalink
Implement all addons
Browse files Browse the repository at this point in the history
Signed-off-by: Ling Samuel <[email protected]>
  • Loading branch information
lingsamuel committed Jan 11, 2021
1 parent 0b19a59 commit d51a10c
Show file tree
Hide file tree
Showing 37 changed files with 251 additions and 111 deletions.
15 changes: 8 additions & 7 deletions cmd/minikube/cmd/config/images.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,13 @@ import (
)

var addonsImagesCmd = &cobra.Command{
Use: "images ADDON_NAME",
Short: "Alpha feature. List image names the addon w/ADDON_NAME used (example: minikube addons images ingress). For a list of available addons use: minikube addons list",
Long: "Alpha feature. List image names the addon w/ADDON_NAME used (example: minikube addons images ingress). For a list of available addons use: minikube addons list",
Use: "images ADDON_NAME",
Short: "List image names the addon w/ADDON_NAME used. For a list of available addons use: minikube addons list",
Long: "List image names the addon w/ADDON_NAME used. For a list of available addons use: minikube addons list",
Example: "minikube addons images ingress",
Run: func(cmd *cobra.Command, args []string) {
if len(args) != 1 {
exit.Message(reason.Usage, "usage: minikube addons configure ADDON_NAME")
exit.Message(reason.Usage, "usage: minikube addons images ADDON_NAME")
}

addon := args[0]
Expand All @@ -44,19 +45,19 @@ var addonsImagesCmd = &cobra.Command{

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

for imageName, defaultImage := range conf.Images {
tData = append(tData, []string{imageName, defaultImage})
tData = append(tData, []string{imageName, defaultImage, conf.Registries[imageName]})
}

table.AppendBulk(tData)
table.Render()
} else {
out.Infof("{{.name}} has not been implemented yet", out.V{"name": addon})
out.Infof("{{.name}} doesn't have images.", out.V{"name": addon})
}
} else {
out.FailureT("No such addon {{.name}}", out.V{"name": addon})
Expand Down
2 changes: 1 addition & 1 deletion deploy/addons/ambassador/ambassador-operator.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ spec:
containers:
- name: ambassador-operator
# Replace this with the built image name
image: {{default "quay.io/datawire" .ImageRepository}}/ambassador-operator:v1.2.3
image: {{default "quay.io/" .ImageRepository}}/{{.Images.AmbassadorOperator}}
command:
- ambassador-operator
imagePullPolicy: Always
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ spec:
serviceAccountName: csi-attacher
containers:
- name: csi-attacher
image: {{default "quay.io/k8scsi" .ImageRepository}}/csi-attacher:v3.0.0-rc1
image: {{default "quay.io" .ImageRepository}}/{{.Images.Attacher}}
args:
- --v=5
- --csi-address=/csi/csi.sock
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ spec:
spec:
containers:
- name: node-driver-registrar
image: {{default "quay.io/k8scsi" .ImageRepository}}/csi-node-driver-registrar:v1.3.0
image: {{default "quay.io" .ImageRepository}}/{{.Images.NodeDriverRegistrar}}
args:
- --v=5
- --csi-address=/csi/csi.sock
Expand All @@ -78,7 +78,7 @@ spec:
name: csi-data-dir

- name: hostpath
image: {{default "quay.io/k8scsi" .ImageRepository}}/hostpathplugin:v1.4.0-rc2
image: {{default "quay.io" .ImageRepository}}/{{.Images.HostPathPlugin}}
args:
- "--drivername=hostpath.csi.k8s.io"
- "--v=5"
Expand Down Expand Up @@ -123,7 +123,7 @@ spec:
volumeMounts:
- mountPath: /csi
name: socket-dir
image: {{default "quay.io/k8scsi" .ImageRepository}}/livenessprobe:v1.1.0
image: {{default "quay.io" .ImageRepository}}/{{.Images.LivenessProbe}}
args:
- --csi-address=/csi/csi.sock
- --health-port=9898
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ spec:
serviceAccountName: csi-provisioner
containers:
- name: csi-provisioner
image: {{default "gcr.io/k8s-staging-sig-storage" .ImageRepository}}/csi-provisioner:v2.0.0-rc2
image: {{default "gcr.io" .ImageRepository}}/{{.Images.Provisioner}}
args:
- -v=5
- --csi-address=/csi/csi.sock
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ spec:
serviceAccountName: csi-resizer
containers:
- name: csi-resizer
image: {{default "quay.io/k8scsi" .ImageRepository}}/csi-resizer:v0.6.0-rc1
image: {{default "quay.io" .ImageRepository}}/{{.Images.Resizer}}
args:
- -v=5
- -csi-address=/csi/csi.sock
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ spec:
serviceAccount: csi-snapshotter
containers:
- name: csi-snapshotter
image: {{default "quay.io/k8scsi" .ImageRepository}}/csi-snapshotter:v2.1.0
image: {{default "quay.io" .ImageRepository}}/{{.Images.Snapshotter}}
args:
- -v=5
- --csi-address=/csi/csi.sock
Expand Down
4 changes: 2 additions & 2 deletions deploy/addons/dashboard/dashboard-dp.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ spec:
spec:
containers:
- name: dashboard-metrics-scraper
image: {{default "kubernetesui" .ImageRepository}}/metrics-scraper:v1.0.4
image: {{default "docker.io" .ImageRepository}}/{{.Images.MetricsScraper}}
ports:
- containerPort: 8000
protocol: TCP
Expand Down Expand Up @@ -91,7 +91,7 @@ spec:
containers:
- name: kubernetes-dashboard
# WARNING: This must match pkg/minikube/bootstrapper/images/images.go
image: {{default "kubernetesui" .ImageRepository}}/dashboard:v2.1.0
image: {{default "docker.io" .ImageRepository}}/{{.Images.Dashboard}}
ports:
- containerPort: 9090
protocol: TCP
Expand Down
4 changes: 2 additions & 2 deletions deploy/addons/efk/elasticsearch-rc.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ spec:
spec:
containers:
- name: elasticsearch-logging
image: {{default "k8s.gcr.io" .ImageRepository}}/elasticsearch:v5.6.2
image: {{default "k8s.gcr.io" .ImageRepository}}/{{.Images.Elasticsearch}}
resources:
limits:
cpu: 500m
Expand Down Expand Up @@ -62,7 +62,7 @@ spec:
- name: ES_JAVA_OPTS
value: "-Xms1024m -Xmx1024m"
initContainers:
- image: {{default "registry.hub.docker.com/library" .ImageRepository}}/alpine:3.6
- image: {{default "docker.io" .ImageRepository}}/{{.Images.Alpine}}
command: ["/sbin/sysctl", "-w", "vm.max_map_count=262144"]
name: elasticsearch-logging-init
securityContext:
Expand Down
2 changes: 1 addition & 1 deletion deploy/addons/efk/fluentd-es-rc.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
spec:
containers:
- name: fluentd-es
image: {{default "k8s.gcr.io" .ImageRepository}}/fluentd-elasticsearch:v2.0.2
image: {{default "k8s.gcr.io" .ImageRepository}}/{{.Images.FluentdElasticsearch}}
env:
- name: FLUENTD_ARGS
value: --no-supervisor -q
Expand Down
2 changes: 1 addition & 1 deletion deploy/addons/efk/kibana-rc.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ spec:
spec:
containers:
- name: kibana-logging
image: {{default "docker.elastic.co/kibana" .ImageRepository}}/kibana:5.6.2
image: {{default "docker.elastic.co" .ImageRepository}}/{{.Images.Kibana}}
resources:
limits:
cpu: 500m
Expand Down
2 changes: 1 addition & 1 deletion deploy/addons/freshpod/freshpod-rc.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ spec:
spec:
containers:
- name: freshpod
image: {{default "gcr.io/google-samples" .ImageRepository}}/freshpod:v0.0.1
image: {{default "gcr.io" .ImageRepository}}/{{.Images.FreshPod}}
imagePullPolicy: IfNotPresent
volumeMounts:
- name: docker
Expand Down
6 changes: 3 additions & 3 deletions deploy/addons/gcp-auth/gcp-auth-webhook.yaml.tmpl.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ spec:
serviceAccountName: minikube-gcp-auth-certs
containers:
- name: create
image: {{default "jettech" .ImageRepository}}/kube-webhook-certgen:v1.3.0
image: {{default "docker.io" .ImageRepository}}/{{.Images.KubeWebhookCertgen}}
imagePullPolicy: IfNotPresent
args:
- create
Expand All @@ -94,7 +94,7 @@ spec:
spec:
containers:
- name: gcp-auth
image: {{default "gcr.io/k8s-minikube" .ImageRepository}}/gcp-auth-webhook:v0.0.3
image: {{default "gcr.io" .ImageRepository}}/{{.Images.GCPAuthWebhook}}
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8443
Expand Down Expand Up @@ -127,7 +127,7 @@ spec:
serviceAccountName: minikube-gcp-auth-certs
containers:
- name: patch
image: {{default "jettech" .ImageRepository}}/kube-webhook-certgen:v1.3.0
image: {{default "docker.io" .ImageRepository}}/{{.Images.KubeWebhookCertgen}}
imagePullPolicy: IfNotPresent
args:
- patch
Expand Down
4 changes: 2 additions & 2 deletions deploy/addons/gpu/nvidia-driver-installer.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ spec:
hostPath:
path: /
initContainers:
- image: {{default "k8s.gcr.io" .ImageRepository}}/minikube-nvidia-driver-installer:e2d9b43228decf5d6f7dce3f0a85d390f138fa01
- image: {{default "k8s.gcr.io" .ImageRepository}}/{{.Images.NvidiaDriverInstaller}}
name: nvidia-driver-installer
resources:
requests:
Expand All @@ -72,5 +72,5 @@ spec:
- name: root-mount
mountPath: /root
containers:
- image: "{{default "k8s.gcr.io" .ImageRepository}}/pause:2.0"
- image: "{{default "k8s.gcr.io" .ImageRepository}}/{{.Images.Pause}}"
name: pause
2 changes: 1 addition & 1 deletion deploy/addons/gpu/nvidia-gpu-device-plugin.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ spec:
hostPath:
path: /var/lib/kubelet/device-plugins
containers:
- image: {{default "nvidia" .ImageRepository}}/k8s-device-plugin:1.0.0-beta4
- image: {{default "docker.io" .ImageRepository}}/{{.Images.NvidiaDevicePlugin}}
command: ["/usr/bin/nvidia-device-plugin", "-logtostderr"]
name: nvidia-gpu-device-plugin
resources:
Expand Down
2 changes: 1 addition & 1 deletion deploy/addons/gvisor/gvisor-pod.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ spec:
hostPID: true
containers:
- name: gvisor
image: {{default "gcr.io/k8s-minikube" .ImageRepository}}/gvisor-addon:3
image: {{default "gcr.io" .ImageRepository}}/{{.Images.GvisorAddon}}
securityContext:
privileged: true
volumeMounts:
Expand Down
2 changes: 1 addition & 1 deletion deploy/addons/helm-tiller/helm-tiller-dp.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ spec:
value: kube-system
- name: TILLER_HISTORY_MAX
value: "0"
image: {{default "gcr.io/kubernetes-helm" .ImageRepository}}/tiller:v2.16.12
image: {{default "gcr.io" .ImageRepository}}/{{.Images.Tiller}}
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 3
Expand Down
2 changes: 1 addition & 1 deletion deploy/addons/ingress-dns/ingress-dns-pod.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ spec:
hostNetwork: true
containers:
- name: minikube-ingress-dns
image: {{default "cryptexlabs" .ImageRepository}}/minikube-ingress-dns:0.3.0
image: {{default "docker.io" .ImageRepository}}/{{.Images.IngressDNS}}
imagePullPolicy: IfNotPresent
ports:
- containerPort: 53
Expand Down
4 changes: 2 additions & 2 deletions deploy/addons/ingress/ingress-dp.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ spec:
spec:
containers:
- name: create
image: {{default "jettech" .ImageRepository}}/{{.Images.KubeWebhookCertgenCreate}}
image: {{default "docker.io" .ImageRepository}}/{{.Images.KubeWebhookCertgenCreate}}
imagePullPolicy: IfNotPresent
args:
- create
Expand Down Expand Up @@ -255,7 +255,7 @@ spec:
spec:
containers:
- name: patch
image: {{default "jettech" .ImageRepository}}/{{.Images.KubeWebhookCertgenPatch}}
image: {{default "docker.io" .ImageRepository}}/{{.Images.KubeWebhookCertgenPatch}}
imagePullPolicy:
args:
- patch
Expand Down
2 changes: 1 addition & 1 deletion deploy/addons/istio-provisioner/istio-operator.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ spec:
serviceAccountName: istio-operator
containers:
- name: istio-operator
image: docker.io/istio/operator:1.5.0
image: {{default "docker.io" .ImageRepository}}/{{.Images.IstioOperator}}
command:
- operator
- server
Expand Down
2 changes: 1 addition & 1 deletion deploy/addons/kubevirt/pod.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ spec:
- /bin/bash
- -c
- /kubevirt-scripts/install.sh
image: bitnami/kubectl:1.17
image: {{default "docker.io" .ImageRepository}}/{{.Images.Kubectl}}
imagePullPolicy: IfNotPresent
name: kubevirt-provisioner
lifecycle:
Expand Down
2 changes: 1 addition & 1 deletion deploy/addons/logviewer/logviewer-dp-and-svc.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ spec:
containers:
- name: logviewer
imagePullPolicy: Always
image: {{default "docker.io/ivans3" .ImageRepository}}/minikube-log-viewer:latest
image: {{default "docker.io" .ImageRepository}}/{{.Images.LogViewer}}
volumeMounts:
- name: logs
mountPath: /var/log/containers/
Expand Down
4 changes: 2 additions & 2 deletions deploy/addons/metallb/metallb.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: status.hostIP
image: {{default "metallb" .ImageRepository}}/speaker:v0.8.2
image: {{default "docker.io" .ImageRepository}}/{{.Images.Speaker}}
imagePullPolicy: IfNotPresent
name: speaker
ports:
Expand Down Expand Up @@ -268,7 +268,7 @@ spec:
- args:
- --port=7472
- --config=config
image: {{default "metallb" .ImageRepository}}/controller:v0.8.2
image: {{default "docker.io" .ImageRepository}}/{{.Images.Controller}}
imagePullPolicy: IfNotPresent
name: controller
ports:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
spec:
containers:
- name: metrics-server
image: {{default "k8s.gcr.io" .ImageRepository}}/metrics-server-{{.Arch}}:v0.2.1
image: {{default "k8s.gcr.io" .ImageRepository}}/{{.Images.MetricsServer}}
imagePullPolicy: IfNotPresent
command:
- /metrics-server
Expand Down
8 changes: 4 additions & 4 deletions deploy/addons/olm/olm.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ spec:
- $(OPERATOR_NAMESPACE)
- -writeStatusName
- ""
image: quay.io/operator-framework/olm@sha256:0d15ffb5d10a176ef6e831d7865f98d51255ea5b0d16403618c94a004d049373
image: {{default "quay.io" .ImageRepository}}/{{.Images.OLM}}
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8080
Expand Down Expand Up @@ -143,7 +143,7 @@ spec:
- '-namespace'
- olm
- -configmapServerImage=quay.io/operator-framework/configmap-operator-registry:latest
image: quay.io/operator-framework/olm@sha256:0d15ffb5d10a176ef6e831d7865f98d51255ea5b0d16403618c94a004d049373
image: {{default "quay.io" .ImageRepository}}/{{.Images.OLM}}
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8080
Expand Down Expand Up @@ -307,7 +307,7 @@ spec:
- "5443"
- --global-namespace
- olm
image: quay.io/operator-framework/olm@sha256:0d15ffb5d10a176ef6e831d7865f98d51255ea5b0d16403618c94a004d049373
image: {{default "quay.io" .ImageRepository}}/{{.Images.OLM}}
imagePullPolicy: Always
ports:
- containerPort: 5443
Expand Down Expand Up @@ -346,6 +346,6 @@ metadata:
namespace: olm
spec:
sourceType: grpc
image: quay.io/operator-framework/upstream-community-operators:latest
image: {{default "quay.io" .ImageRepository}}/{{.Images.UpstreamCommunityOperators}}
displayName: Community Operators
publisher: OperatorHub.io
4 changes: 2 additions & 2 deletions deploy/addons/registry-aliases/node-etc-hosts-update.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
spec:
initContainers:
- name: update
image: {{default "registry.hub.docker.com/library" .ImageRepository}}/alpine:3.11
image: {{default "docker.io" .ImageRepository}}/{{.Images.Alpine}}
volumeMounts:
- name: etchosts
mountPath: /host-etc/hosts
Expand All @@ -43,7 +43,7 @@ spec:
echo "Done."
containers:
- name: pause-for-update
image: {{default "gcr.io/google_containers" .ImageRepository}}/pause-amd64:3.1
image: {{default "gcr.io" .ImageRepository}}/{{.Images.Pause}}
terminationGracePeriodSeconds: 30
volumes:
- name: etchosts
Expand Down
2 changes: 1 addition & 1 deletion deploy/addons/registry-aliases/patch-coredns-job.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spec:
path: /var/lib/minikube/binaries
containers:
- name: core-dns-patcher
image: {{default "quay.io/rhdevelopers" .ImageRepository}}/core-dns-patcher
image: {{default "quay.io" .ImageRepository}}/{{.Images.CoreDNSPatcher}}
imagePullPolicy: IfNotPresent
# using the kubectl from the minikube instance
volumeMounts:
Expand Down
2 changes: 1 addition & 1 deletion deploy/addons/registry-creds/registry-creds-rc.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ spec:
addonmanager.kubernetes.io/mode: Reconcile
spec:
containers:
- image: {{default "upmcenterprises" .ImageRepository}}/registry-creds:1.10
- image: {{default "docker.io" .ImageRepository}}/{{.Images.RegistryCreds}}
name: registry-creds
imagePullPolicy: Always
env:
Expand Down
Loading

0 comments on commit d51a10c

Please sign in to comment.