Allow change busybox registry

Added option to change the busybox registry.

Signed-off-by: kahirokunn <okinakahiro@gmail.com>
Change-Id: I047c1d6c0747431717a3592b2ee8d3cd1198b441
diff --git a/helm-charts/gerrit-replica/README.md b/helm-charts/gerrit-replica/README.md
index e4fc808..6db91a9 100644
--- a/helm-charts/gerrit-replica/README.md
+++ b/helm-charts/gerrit-replica/README.md
@@ -99,6 +99,8 @@
 
 | Parameter | Description | Default |
 |-----------|-------------|---------|
+| `images.busybox.registry` | The registry to pull the busybox container images from | `docker.io` |
+| `images.busybox.tag` | The busybox image tag to use | `latest` |
 | `images.registry.name` | The image registry to pull the container images from | `` |
 | `images.registry.ImagePullSecret.name` | Name of the ImagePullSecret | `image-pull-secret` (if empty no image pull secret will be deployed) |
 | `images.registry.ImagePullSecret.create` | Whether to create an ImagePullSecret | `false` |
diff --git a/helm-charts/gerrit-replica/templates/gerrit-replica.deployment.yaml b/helm-charts/gerrit-replica/templates/gerrit-replica.deployment.yaml
index 31a74ef..63291ef 100644
--- a/helm-charts/gerrit-replica/templates/gerrit-replica.deployment.yaml
+++ b/helm-charts/gerrit-replica/templates/gerrit-replica.deployment.yaml
@@ -41,7 +41,7 @@
       initContainers:
       {{- if .Values.nfsWorkaround.enabled }}
       - name: nfs-init
-        image: busybox
+        image: {{ .Values.images.busybox.registry -}}/busybox:{{- .Values.images.busybox.tag }}
         command:
         - sh
         - -c
@@ -62,7 +62,7 @@
           subPath: idmapd.conf
       {{- end }}
       - name: site-cleanup
-        image: busybox
+        image: {{ .Values.images.busybox.registry -}}/busybox:{{- .Values.images.busybox.tag }}
         securityContext:
           runAsUser: 1000
           runAsGroup: 100
diff --git a/helm-charts/gerrit-replica/templates/git-backend.deployment.yaml b/helm-charts/gerrit-replica/templates/git-backend.deployment.yaml
index cd17626..eaad556 100644
--- a/helm-charts/gerrit-replica/templates/git-backend.deployment.yaml
+++ b/helm-charts/gerrit-replica/templates/git-backend.deployment.yaml
@@ -38,7 +38,7 @@
       initContainers:
       {{- if .Values.nfsWorkaround.enabled }}
       - name: nfs-init
-        image: busybox
+        image: {{ .Values.images.busybox.registry -}}/busybox:{{- .Values.images.busybox.tag }}
         command:
         - sh
         - -c
diff --git a/helm-charts/gerrit-replica/templates/git-gc.cronjob.yaml b/helm-charts/gerrit-replica/templates/git-gc.cronjob.yaml
index 6efdaa1..eb69d69 100644
--- a/helm-charts/gerrit-replica/templates/git-gc.cronjob.yaml
+++ b/helm-charts/gerrit-replica/templates/git-gc.cronjob.yaml
@@ -37,7 +37,7 @@
           initContainers:
           {{- if .Values.nfsWorkaround.enabled }}
           - name: nfs-init
-            image: busybox
+            image: {{ .Values.images.busybox.registry -}}/busybox:{{- .Values.images.busybox.tag }}
             command:
             - sh
             - -c
diff --git a/helm-charts/gerrit-replica/templates/git-repositories-init.job.yaml b/helm-charts/gerrit-replica/templates/git-repositories-init.job.yaml
index 650bd7f..1f52675 100644
--- a/helm-charts/gerrit-replica/templates/git-repositories-init.job.yaml
+++ b/helm-charts/gerrit-replica/templates/git-repositories-init.job.yaml
@@ -32,7 +32,7 @@
       {{- if .Values.nfsWorkaround.enabled }}
       initContainers:
       - name: nfs-init
-        image: busybox
+        image: {{ .Values.images.busybox.registry -}}/busybox:{{- .Values.images.busybox.tag }}
         command:
         - sh
         - -c
diff --git a/helm-charts/gerrit-replica/templates/log-cleaner.cronjob.yaml b/helm-charts/gerrit-replica/templates/log-cleaner.cronjob.yaml
index bf2239b..4e08300 100644
--- a/helm-charts/gerrit-replica/templates/log-cleaner.cronjob.yaml
+++ b/helm-charts/gerrit-replica/templates/log-cleaner.cronjob.yaml
@@ -24,7 +24,7 @@
           containers:
           - name: log-cleaner
             imagePullPolicy: {{ .Values.images.imagePullPolicy }}
-            image: busybox
+            image: {{ .Values.images.busybox.registry -}}/busybox:{{- .Values.images.busybox.tag }}
             command:
             - sh
             - -c
diff --git a/helm-charts/gerrit-replica/values.yaml b/helm-charts/gerrit-replica/values.yaml
index 288d5fe..a1ada76 100644
--- a/helm-charts/gerrit-replica/values.yaml
+++ b/helm-charts/gerrit-replica/values.yaml
@@ -1,4 +1,7 @@
 images:
+  busybox:
+    registry: docker.io
+    tag: latest
   # Registry used for container images created by this project
   registry:
     # The registry name must NOT contain a trailing slash
diff --git a/helm-charts/gerrit/README.md b/helm-charts/gerrit/README.md
index 2f0fbef..d288b1c 100644
--- a/helm-charts/gerrit/README.md
+++ b/helm-charts/gerrit/README.md
@@ -78,6 +78,8 @@
 
 | Parameter | Description | Default |
 |-----------|-------------|---------|
+| `images.busybox.registry` | The registry to pull the busybox container images from | `docker.io` |
+| `images.busybox.tag` | The busybox image tag to use | `latest` |
 | `images.registry.name` | The image registry to pull the container images from | `` |
 | `images.registry.ImagePullSecret.name` | Name of the ImagePullSecret | `image-pull-secret` (if empty no image pull secret will be deployed) |
 | `images.registry.ImagePullSecret.create` | Whether to create an ImagePullSecret | `false` |
diff --git a/helm-charts/gerrit/templates/gerrit.stateful-set.yaml b/helm-charts/gerrit/templates/gerrit.stateful-set.yaml
index 055ce0e..4c01aac 100644
--- a/helm-charts/gerrit/templates/gerrit.stateful-set.yaml
+++ b/helm-charts/gerrit/templates/gerrit.stateful-set.yaml
@@ -40,7 +40,7 @@
       {{- end }}
       initContainers:
       - name: site-cleanup
-        image: busybox
+        image: {{ .Values.images.busybox.registry -}}/busybox:{{- .Values.images.busybox.tag }}
         securityContext:
           runAsUser: 1000
           runAsGroup: 100
diff --git a/helm-charts/gerrit/values.yaml b/helm-charts/gerrit/values.yaml
index bf1ab6b..a42c35d 100644
--- a/helm-charts/gerrit/values.yaml
+++ b/helm-charts/gerrit/values.yaml
@@ -1,4 +1,7 @@
 images:
+  busybox:
+    registry: docker.io
+    tag: latest
   # Registry used for container images created by this project
   registry:
     # The registry name must NOT contain a trailing slash