Skip to content

Commit 0e2d41b

Browse files
jiangpengchengdgrove-oss
authored andcommitted
Make busybox image configurable (#651)
1 parent 14de4f8 commit 0e2d41b

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

helm/openwhisk/templates/_readiness.tpl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
# if not db.wipeAndInit, the external db must already be ready; so no need for init container
2222
{{- else -}}
2323
- name: "wait-for-couchdb"
24-
image: "{{- .Values.docker.registry.name -}}busybox"
24+
image: "{{- .Values.docker.registry.name -}}{{- .Values.busybox.imageName -}}:{{- .Values.busybox.imageTag -}}"
2525
imagePullPolicy: "IfNotPresent"
2626
env:
2727
- name: "READINESS_URL"
@@ -33,7 +33,7 @@
3333
{{/* Init container that waits for kafka to be ready */}}
3434
{{- define "openwhisk.readiness.waitForKafka" -}}
3535
- name: "wait-for-kafka"
36-
image: "{{- .Values.docker.registry.name -}}busybox"
36+
image: "{{- .Values.docker.registry.name -}}{{- .Values.busybox.imageName -}}:{{- .Values.busybox.imageTag -}}"
3737
imagePullPolicy: "IfNotPresent"
3838
# TODO: I haven't found an easy external test to determine that kafka is up, so as a hack we wait for zookeeper and then sleep for 10 seconds and cross our fingers!
3939
command: ["sh", "-c", 'result=1; until [ $result -eq 0 ]; do OK=$(echo ruok | nc -w 1 {{ include "openwhisk.zookeeper_zero_host" . }} {{ .Values.zookeeper.port }}); if [ "$OK" == "imok" ]; then result=0; echo "zookeeper returned imok!"; else echo waiting for zookeeper to be ready; sleep 1; fi done; echo "Zookeeper is up; will wait for 10 seconds to give kafka time to initialize"; sleep 10;']
@@ -42,15 +42,15 @@
4242
{{/* Init container that waits for zookeeper to be ready */}}
4343
{{- define "openwhisk.readiness.waitForZookeeper" -}}
4444
- name: "wait-for-zookeeper"
45-
image: "{{- .Values.docker.registry.name -}}busybox"
45+
image: "{{- .Values.docker.registry.name -}}{{- .Values.busybox.imageName -}}:{{- .Values.busybox.imageTag -}}"
4646
imagePullPolicy: "IfNotPresent"
4747
command: ["sh", "-c", 'result=1; until [ $result -eq 0 ]; do OK=$(echo ruok | nc -w 1 {{ include "openwhisk.zookeeper_zero_host" . }} {{ .Values.zookeeper.port }}); if [ "$OK" == "imok" ]; then result=0; echo "zookeeper returned imok!"; else echo waiting for zookeeper to be ready; sleep 1; fi; done; echo "Success: zookeeper is up"']
4848
{{- end -}}
4949

5050
{{/* Init container that waits for controller to be ready */}}
5151
{{- define "openwhisk.readiness.waitForController" -}}
5252
- name: "wait-for-controller"
53-
image: "{{- .Values.docker.registry.name -}}busybox"
53+
image: "{{- .Values.docker.registry.name -}}{{- .Values.busybox.imageName -}}:{{- .Values.busybox.imageTag -}}"
5454
imagePullPolicy: "IfNotPresent"
5555
env:
5656
- name: "READINESS_URL"
@@ -61,7 +61,7 @@
6161
{{/* Init container that waits for at least 1 healthy invoker */}}
6262
{{- define "openwhisk.readiness.waitForHealthyInvoker" -}}
6363
- name: "wait-for-healthy-invoker"
64-
image: "{{- .Values.docker.registry.name -}}busybox"
64+
image: "{{- .Values.docker.registry.name -}}{{- .Values.busybox.imageName -}}:{{- .Values.busybox.imageTag -}}"
6565
imagePullPolicy: "IfNotPresent"
6666
env:
6767
- name: "READINESS_URL"
@@ -72,7 +72,7 @@
7272
{{/* Init container that waits for ElasticSearch to be ready */}}
7373
{{- define "openwhisk.readiness.waitForElasticSearch" -}}
7474
- name: "wait-for-elasticsearch"
75-
image: "{{- .Values.docker.registry.name -}}busybox"
75+
image: "{{- .Values.docker.registry.name -}}{{- .Values.busybox.imageName -}}:{{- .Values.busybox.imageTag -}}"
7676
imagePullPolicy: "IfNotPresent"
7777
env:
7878
- name: "READINESS_URL"

helm/openwhisk/templates/redis-pod.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ spec:
5757
{{- if .Values.k8s.persistence.enabled }}
5858
initContainers:
5959
- name: redis-init
60-
image: "{{- .Values.docker.registry.name -}}busybox"
60+
image: "{{- .Values.docker.registry.name -}}{{- .Values.busybox.imageName -}}:{{- .Values.busybox.imageTag -}}"
6161
command:
6262
- chown
6363
- -v

helm/openwhisk/values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,10 @@ providers:
398398
apiPort: 8080
399399
dbPrefix: "kp"
400400

401+
busybox:
402+
imageName: "busybox"
403+
imageTag: "latest"
404+
401405

402406
# Used to define pod affinity and anti-affinity for the Kubernetes scheduler.
403407
# If affinity.enabled is true, then all of the deployments for the OpenWhisk

0 commit comments

Comments
 (0)