Skip to content

Commit

Permalink
[Issue:5818]Set the startup order of broker and bookie (apache#5957)
Browse files Browse the repository at this point in the history
Signed-off-by: xiaolong.ran <[email protected]>

Set the startup order of broker and bookie
  • Loading branch information
wolfstudy authored Jan 2, 2020
1 parent c648981 commit 4b57776
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
13 changes: 13 additions & 0 deletions deployment/kubernetes/helm/pulsar/templates/broker-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
# under the License.
#

{{- $ensembleSize := .Values.broker.configData.PULSAR_PREFIX_managedLedgerDefaultEnsembleSize }}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -85,6 +86,18 @@ spec:
until bin/pulsar zookeeper-shell -server {{ template "pulsar.fullname" . }}-{{ .Values.zookeeper.component }} ls /admin/clusters/{{ template "pulsar.fullname" . }}; do
sleep 3;
done;
# This init container will wait for bookkeeper to be ready before
# deploying the broker
- name: wait-bookkeeper-ready
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
command: ["sh", "-c"]
args:
- >-
bin/apply-config-from-env.py conf/bookkeeper.conf &&
until bin/bookkeeper shell simpletest -ensemble {{$ensembleSize}}; do
sleep 3;
done;
containers:
- name: "{{ template "pulsar.fullname" . }}-{{ .Values.broker.component }}"
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
Expand Down
8 changes: 4 additions & 4 deletions deployment/kubernetes/helm/pulsar/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -434,10 +434,10 @@ grafana:
repository: apachepulsar/pulsar-grafana
tag: latest
pullPolicy: IfNotPresent
resources:
requests:
memory: 4Gi
cpu: 1
# resources:
# requests:
# memory: 4Gi
# cpu: 1
## Grafana service
## templates/grafana-service.yaml
##
Expand Down

0 comments on commit 4b57776

Please sign in to comment.