Reordering the init containers in the Helm chart (#3589)
diff --git a/deploy/kubernetes/helm/templates/bookie.yaml b/deploy/kubernetes/helm/templates/bookie.yaml
index 09ceff2..238f60a 100644
--- a/deploy/kubernetes/helm/templates/bookie.yaml
+++ b/deploy/kubernetes/helm/templates/bookie.yaml
@@ -112,21 +112,6 @@
{{- end }}
terminationGracePeriodSeconds: 0
initContainers:
-{{- if eq .Values.platform "minikube" }}
- # The first time, initialize BK to wipe data for minikube
- - name: bookie-format
- image: {{ .Values.bookkeeper.image }}
- args: ["/opt/bookkeeper/bin/bookkeeper", "shell", "bookieformat", "-nonInteractive", "-force"]
- command: [ "/bin/bash", "/opt/bookkeeper/scripts/entrypoint.sh" ]
- envFrom:
- - configMapRef:
- name: {{ .Release.Name }}-bookie-config
- volumeMounts:
- - name: journal-disk
- mountPath: /bookkeeper/data/journal
- - name: ledgers-disk
- mountPath: /bookkeeper/data/ledgers
-{{- end }}
# Wait until the zookeeper pods are up and running
- name: bookie-init-container
image: {{ .Values.image }} # use heron image until bookkeeper has nc
@@ -143,6 +128,21 @@
echo 'Zookeeper {{ .Release.Name }}-zookeeper:{{ .Values.zookeeper.clientPort }} not ready';
sleep 4;
done
+{{- if eq .Values.platform "minikube" }}
+ # The first time, initialize BK to wipe data for minikube
+ - name: bookie-format
+ image: {{ .Values.bookkeeper.image }}
+ args: ["/opt/bookkeeper/bin/bookkeeper", "shell", "bookieformat", "-nonInteractive", "-force"]
+ command: [ "/bin/bash", "/opt/bookkeeper/scripts/entrypoint.sh" ]
+ envFrom:
+ - configMapRef:
+ name: {{ .Release.Name }}-bookie-config
+ volumeMounts:
+ - name: journal-disk
+ mountPath: /bookkeeper/data/journal
+ - name: ledgers-disk
+ mountPath: /bookkeeper/data/ledgers
+{{- end }}
containers:
- name: bookie
image: {{ .Values.bookkeeper.image }}