From 25e997a4250d2ea3fbc24cc3314d8801012dd622 Mon Sep 17 00:00:00 2001 From: Valeriano Manassero <14011549+valeriano-manassero@users.noreply.github.com> Date: Wed, 5 Jan 2022 15:08:11 +0100 Subject: [PATCH] Automate initialize (#138) - no need to do "--set initialize=true" anymore --- README.md | 10 ++-------- .../templates/bookkeeper-cluster-initialize.yaml | 2 +- charts/pulsar/templates/pulsar-cluster-initialize.yaml | 2 +- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 2e89bf2..3def6d0 100644 --- a/README.md +++ b/README.md @@ -94,11 +94,8 @@ helm repo add apache https://pulsar.apache.org/charts To use the helm chart: -> NOTE: Please specify `--set initialize=true` when installing a release at the first time. `initialize=true` will start initialize jobs -> to initialize the cluster metadata for both bookkeeper and pulsar clusters. - ```bash -helm install --set initialize=true apache/pulsar +helm install apache/pulsar ``` ## Kubernetes cluster preparation @@ -133,13 +130,10 @@ We provide some instructions to guide you through the preparation: http://pulsar 3. Use the Pulsar Helm charts to install Apache Pulsar. -> NOTE: Please specify `--set initialize=true` when installing a release at the first time. `initialize=true` will start initialize jobs -> to initialize the cluster metadata for both bookkeeper and pulsar clusters. - This command installs and starts Apache Pulsar. ```bash - $ helm install --set initialize=true apache/pulsar + $ helm install apache/pulsar ``` 5. Access the Pulsar cluster diff --git a/charts/pulsar/templates/bookkeeper-cluster-initialize.yaml b/charts/pulsar/templates/bookkeeper-cluster-initialize.yaml index 10a3a53..66ec77b 100644 --- a/charts/pulsar/templates/bookkeeper-cluster-initialize.yaml +++ b/charts/pulsar/templates/bookkeeper-cluster-initialize.yaml @@ -16,7 +16,7 @@ # specific language governing permissions and limitations # under the License. # -{{- if .Values.initialize }} +{{- if or .Release.IsInstall .Values.initialize }} {{- if .Values.components.bookkeeper }} apiVersion: batch/v1 kind: Job diff --git a/charts/pulsar/templates/pulsar-cluster-initialize.yaml b/charts/pulsar/templates/pulsar-cluster-initialize.yaml index 53b83fe..7c4bd66 100644 --- a/charts/pulsar/templates/pulsar-cluster-initialize.yaml +++ b/charts/pulsar/templates/pulsar-cluster-initialize.yaml @@ -17,7 +17,7 @@ # under the License. # -{{- if .Values.initialize }} +{{- if or .Release.IsInstall .Values.initialize }} {{- if .Values.components.broker }} apiVersion: batch/v1 kind: Job