This is an automated email from the ASF dual-hosted git repository.

lhotari pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar-helm-chart.git


The following commit(s) were added to refs/heads/master by this push:
     new 25e997a  Automate initialize (#138)
25e997a is described below

commit 25e997a4250d2ea3fbc24cc3314d8801012dd622
Author: Valeriano Manassero 
<[email protected]>
AuthorDate: Wed Jan 5 15:08:11 2022 +0100

    Automate initialize (#138)
    
    - no need to do "--set initialize=true" anymore
---
 README.md                                                  | 10 ++--------
 charts/pulsar/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 <release-name> apache/pulsar
+helm install <release-name> 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 <pulsar-release-name> apache/pulsar
+    $ helm install <pulsar-release-name> 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

Reply via email to