Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Commit f764d9a

Browse files
authored
Reordering the init containers in the Helm chart (#3589)
1 parent 0c858ca commit f764d9a

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

deploy/kubernetes/helm/templates/bookie.yaml

+15-15
Original file line numberDiff line numberDiff line change
@@ -112,21 +112,6 @@ spec:
112112
{{- end }}
113113
terminationGracePeriodSeconds: 0
114114
initContainers:
115-
{{- if eq .Values.platform "minikube" }}
116-
# The first time, initialize BK to wipe data for minikube
117-
- name: bookie-format
118-
image: {{ .Values.bookkeeper.image }}
119-
args: ["/opt/bookkeeper/bin/bookkeeper", "shell", "bookieformat", "-nonInteractive", "-force"]
120-
command: [ "/bin/bash", "/opt/bookkeeper/scripts/entrypoint.sh" ]
121-
envFrom:
122-
- configMapRef:
123-
name: {{ .Release.Name }}-bookie-config
124-
volumeMounts:
125-
- name: journal-disk
126-
mountPath: /bookkeeper/data/journal
127-
- name: ledgers-disk
128-
mountPath: /bookkeeper/data/ledgers
129-
{{- end }}
130115
# Wait until the zookeeper pods are up and running
131116
- name: bookie-init-container
132117
image: {{ .Values.image }} # use heron image until bookkeeper has nc
@@ -143,6 +128,21 @@ spec:
143128
echo 'Zookeeper {{ .Release.Name }}-zookeeper:{{ .Values.zookeeper.clientPort }} not ready';
144129
sleep 4;
145130
done
131+
{{- if eq .Values.platform "minikube" }}
132+
# The first time, initialize BK to wipe data for minikube
133+
- name: bookie-format
134+
image: {{ .Values.bookkeeper.image }}
135+
args: ["/opt/bookkeeper/bin/bookkeeper", "shell", "bookieformat", "-nonInteractive", "-force"]
136+
command: [ "/bin/bash", "/opt/bookkeeper/scripts/entrypoint.sh" ]
137+
envFrom:
138+
- configMapRef:
139+
name: {{ .Release.Name }}-bookie-config
140+
volumeMounts:
141+
- name: journal-disk
142+
mountPath: /bookkeeper/data/journal
143+
- name: ledgers-disk
144+
mountPath: /bookkeeper/data/ledgers
145+
{{- end }}
146146
containers:
147147
- name: bookie
148148
image: {{ .Values.bookkeeper.image }}

0 commit comments

Comments
 (0)