You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by si...@apache.org on 2020/04/21 05:56:55 UTC
[pulsar-helm-chart] 16/34: [Issue:5818]Set the startup order of
broker and bookie (#5957)
This is an automated email from the ASF dual-hosted git repository.
sijie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar-helm-chart.git
commit f76253d6992a967dd90a4db7306e64b7846ec81e
Author: 冉小龙 <rx...@apache.org>
AuthorDate: Thu Jan 2 15:52:39 2020 +0800
[Issue:5818]Set the startup order of broker and bookie (#5957)
Signed-off-by: xiaolong.ran <rx...@apache.org>
Set the startup order of broker and bookie
---
pulsar/templates/broker-deployment.yaml | 13 +++++++++++++
pulsar/values.yaml | 8 ++++----
2 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/pulsar/templates/broker-deployment.yaml b/pulsar/templates/broker-deployment.yaml
index fee0301..9c74764 100644
--- a/pulsar/templates/broker-deployment.yaml
+++ b/pulsar/templates/broker-deployment.yaml
@@ -17,6 +17,7 @@
# under the License.
#
+{{- $ensembleSize := .Values.broker.configData.PULSAR_PREFIX_managedLedgerDefaultEnsembleSize }}
apiVersion: apps/v1
kind: Deployment
metadata:
@@ -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 }}"
diff --git a/pulsar/values.yaml b/pulsar/values.yaml
index f2ae864..90811b3 100644
--- a/pulsar/values.yaml
+++ b/pulsar/values.yaml
@@ -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
##