Turn addon resource with images into template

When the user overrides image repository the images will be pulled
from the overrided one instead of the official repositories.
pull/3714/head
Zhongcheng Lao 2019-02-18 01:00:18 +08:00
parent 7cbe253ef6
commit 7a59d376cf
12 changed files with 24 additions and 24 deletions

View File

@ -34,7 +34,7 @@ spec:
spec:
containers:
- name: elasticsearch-logging
image: k8s.gcr.io/elasticsearch:v5.6.2
image: {{default "k8s.gcr.io" .ImageRepository}}/elasticsearch:v5.6.2
resources:
limits:
cpu: 500m

View File

@ -31,7 +31,7 @@ spec:
spec:
containers:
- name: fluentd-es
image: k8s.gcr.io/fluentd-elasticsearch:v2.0.2
image: {{default "k8s.gcr.io" .ImageRepository}}/fluentd-elasticsearch:v2.0.2
env:
- name: FLUENTD_ARGS
value: --no-supervisor -q

View File

@ -34,7 +34,7 @@ spec:
spec:
containers:
- name: freshpod
image: gcr.io/google-samples/freshpod:v0.0.1
image: {{default "gcr.io/google-samples" .ImageRepository}}/freshpod:v0.0.1
imagePullPolicy: IfNotPresent
volumeMounts:
- name: docker

View File

@ -50,7 +50,7 @@ spec:
hostPath:
path: /
initContainers:
- image: k8s.gcr.io/minikube-nvidia-driver-installer@sha256:492d46f2bc768d6610ec5940b6c3c33c75e03e201cc8786e04cc488659fd6342
- image: {{default "k8s.gcr.io" .ImageRepository}}/minikube-nvidia-driver-installer@sha256:492d46f2bc768d6610ec5940b6c3c33c75e03e201cc8786e04cc488659fd6342
name: nvidia-driver-installer
resources:
requests:
@ -72,5 +72,5 @@ spec:
- name: root-mount
mountPath: /root
containers:
- image: "gcr.io/google-containers/pause:2.0"
- image: "{{default "gcr.io/google-containers" .ImageRepository}}/pause:2.0"
name: pause

View File

@ -46,7 +46,7 @@ spec:
hostPath:
path: /dev
containers:
- image: "k8s.gcr.io/nvidia-gpu-device-plugin@sha256:0842734032018be107fa2490c98156992911e3e1f2a21e059ff0105b07dd8e9e"
- image: "{{default "k8s.gcr.io" .ImageRepository}}/nvidia-gpu-device-plugin@sha256:0842734032018be107fa2490c98156992911e3e1f2a21e059ff0105b07dd8e9e"
command: ["/usr/bin/nvidia-gpu-device-plugin", "-logtostderr"]
name: nvidia-gpu-device-plugin
resources:

View File

@ -29,7 +29,7 @@ oom_score = 0
stream_server_address = ""
stream_server_port = "10010"
enable_selinux = false
sandbox_image = "k8s.gcr.io/pause:3.1"
sandbox_image = "{{default "k8s.gcr.io" .ImageRepository}}/pause:3.1"
stats_collect_period = 10
systemd_cgroup = false
enable_tls_streaming = false

View File

@ -24,7 +24,7 @@ spec:
hostPID: true
containers:
- name: gvisor
image: gcr.io/k8s-minikube/gvisor-addon:latest
image: {{default "gcr.io/k8s-minikube" .ImageRepository}}/gvisor-addon:latest
securityContext:
privileged: true
volumeMounts:

View File

@ -37,7 +37,7 @@ spec:
spec:
containers:
- name: heapster
image: k8s.gcr.io/heapster-amd64:v1.5.3
image: {{default "k8s.gcr.io" .ImageRepository}}/heapster-amd64:v1.5.3
imagePullPolicy: IfNotPresent
command:
- /heapster

View File

@ -34,7 +34,7 @@ spec:
spec:
containers:
- name: influxdb
image: k8s.gcr.io/heapster-influxdb-amd64:v1.3.3
image: {{default "k8s.gcr.io" .ImageRepository}}/heapster-influxdb-amd64:v1.3.3
imagePullPolicy: IfNotPresent
ports:
- name: http
@ -45,7 +45,7 @@ spec:
- mountPath: /data
name: influxdb-storage
- name: grafana
image: k8s.gcr.io/heapster-grafana-amd64:v4.4.3
image: {{default "k8s.gcr.io" .ImageRepository}}/heapster-grafana-amd64:v4.4.3
imagePullPolicy: IfNotPresent
env:
- name: INFLUXDB_SERVICE_URL

View File

@ -39,7 +39,7 @@ spec:
# Any image is permissible as long as:
# 1. It serves a 404 page at /
# 2. It serves 200 on a /healthz endpoint
image: gcr.io/google_containers/defaultbackend:1.4
image: {{default "gcr.io/google_containers" .ImageRepository}}/defaultbackend:1.4
imagePullPolicy: IfNotPresent
livenessProbe:
httpGet:

View File

@ -19,7 +19,7 @@ spec:
spec:
containers:
- name: metrics-server
image: k8s.gcr.io/metrics-server-amd64:v0.2.1
image: {{default "k8s.gcr.io" .ImageRepository}}/metrics-server-amd64:v0.2.1
imagePullPolicy: Always
command:
- /metrics-server

View File

@ -127,7 +127,7 @@ var Addons = map[string]*Addon{
constants.AddonsPath,
"influxGrafana-rc.yaml",
"0640",
false),
true),
NewBinDataAsset(
"deploy/addons/heapster/grafana-svc.yaml",
constants.AddonsPath,
@ -145,7 +145,7 @@ var Addons = map[string]*Addon{
constants.AddonsPath,
"heapster-rc.yaml",
"0640",
false),
true),
NewBinDataAsset(
"deploy/addons/heapster/heapster-svc.yaml",
constants.AddonsPath,
@ -159,7 +159,7 @@ var Addons = map[string]*Addon{
constants.AddonsPath,
"elasticsearch-rc.yaml",
"0640",
false),
true),
NewBinDataAsset(
"deploy/addons/efk/elasticsearch-svc.yaml",
constants.AddonsPath,
@ -171,7 +171,7 @@ var Addons = map[string]*Addon{
constants.AddonsPath,
"fluentd-es-rc.yaml",
"0640",
false),
true),
NewBinDataAsset(
"deploy/addons/efk/fluentd-es-configmap.yaml",
constants.AddonsPath,
@ -209,7 +209,7 @@ var Addons = map[string]*Addon{
constants.AddonsPath,
"ingress-dp.yaml",
"0640",
false),
true),
NewBinDataAsset(
"deploy/addons/ingress/ingress-svc.yaml",
constants.AddonsPath,
@ -229,7 +229,7 @@ var Addons = map[string]*Addon{
constants.AddonsPath,
"metrics-server-deployment.yaml",
"0640",
false),
true),
NewBinDataAsset(
"deploy/addons/metrics-server/metrics-server-service.yaml",
constants.AddonsPath,
@ -265,7 +265,7 @@ var Addons = map[string]*Addon{
constants.AddonsPath,
"freshpod-rc.yaml",
"0640",
false),
true),
}, false, "freshpod"),
"nvidia-driver-installer": NewAddon([]*BinDataAsset{
NewBinDataAsset(
@ -273,7 +273,7 @@ var Addons = map[string]*Addon{
constants.AddonsPath,
"nvidia-driver-installer.yaml",
"0640",
false),
true),
}, false, "nvidia-driver-installer"),
"nvidia-gpu-device-plugin": NewAddon([]*BinDataAsset{
NewBinDataAsset(
@ -281,7 +281,7 @@ var Addons = map[string]*Addon{
constants.AddonsPath,
"nvidia-gpu-device-plugin.yaml",
"0640",
false),
true),
}, false, "nvidia-gpu-device-plugin"),
"logviewer": NewAddon([]*BinDataAsset{
NewBinDataAsset(
@ -303,13 +303,13 @@ var Addons = map[string]*Addon{
constants.AddonsPath,
"gvisor-pod.yaml",
"0640",
false),
true),
NewBinDataAsset(
"deploy/addons/gvisor/gvisor-config.toml",
constants.GvisorFilesPath,
constants.GvisorConfigTomlTargetName,
"0640",
false),
true),
NewBinDataAsset(
"deploy/addons/gvisor/gvisor-containerd-shim.toml",
constants.GvisorFilesPath,