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 a725188  feat: added support for tolerations for the init jobs (#399)
a725188 is described below

commit a7251884381dec9f0954cb013de0f8c5710e6fd1
Author: Daniel Kovacs <[email protected]>
AuthorDate: Thu Dec 21 16:48:02 2023 +0100

    feat: added support for tolerations for the init jobs (#399)
    
    Co-authored-by: Daniel Kovacs <[email protected]>
---
 .../pulsar/templates/bookkeeper-cluster-initialize.yaml   |  4 ++++
 charts/pulsar/templates/pulsar-cluster-initialize.yaml    |  4 ++++
 charts/pulsar/values.yaml                                 | 15 +++++++++------
 3 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/charts/pulsar/templates/bookkeeper-cluster-initialize.yaml 
b/charts/pulsar/templates/bookkeeper-cluster-initialize.yaml
index 66fa404..24aae92 100644
--- a/charts/pulsar/templates/bookkeeper-cluster-initialize.yaml
+++ b/charts/pulsar/templates/bookkeeper-cluster-initialize.yaml
@@ -38,6 +38,10 @@ spec:
       nodeSelector:
       {{- if .Values.pulsar_metadata.nodeSelector }}
 {{ toYaml .Values.pulsar_metadata.nodeSelector | indent 8 }}
+      {{- end }}
+      tolerations:
+      {{- if .Values.pulsar_metadata.tolerations }}
+{{ toYaml .Values.pulsar_metadata.tolerations | indent 8 }}
       {{- end }}
       initContainers:
       - name: wait-zookeeper-ready
diff --git a/charts/pulsar/templates/pulsar-cluster-initialize.yaml 
b/charts/pulsar/templates/pulsar-cluster-initialize.yaml
index 40fa032..813950b 100644
--- a/charts/pulsar/templates/pulsar-cluster-initialize.yaml
+++ b/charts/pulsar/templates/pulsar-cluster-initialize.yaml
@@ -126,5 +126,9 @@ spec:
       nodeSelector:
 {{ toYaml .Values.pulsar_metadata.nodeSelector | indent 8 }}
       {{- end }}
+      {{- if .Values.pulsar_metadata.tolerations }}
+      tolerations:
+{{ toYaml .Values.pulsar_metadata.tolerations | indent 8 }}
+      {{- end }}
 {{- end }}
 {{- end }}
diff --git a/charts/pulsar/values.yaml b/charts/pulsar/values.yaml
index 6b8b8a6..505ed47 100644
--- a/charts/pulsar/values.yaml
+++ b/charts/pulsar/values.yaml
@@ -667,18 +667,21 @@ pulsar_metadata:
   # configurationStore:
   configurationStoreMetadataPrefix: ""
   configurationStorePort: 2181
-  ## optional you can specify a nodeSelector for all init jobs (pulsar-init & 
bookkeeper-init)
-  # nodeSelector:
-    # cloud.google.com/gke-nodepool: default-pool
+
+  ## optional you can specify tolerations and nodeSelectors for all init jobs 
(pulsar-init & bookkeeper-init)
+  #tolerations: []
+  #  - key: "someKey"
+  #    operator: "Equal"
+  #    value: "someValue"
+  #    effect: "NoSchedule"
+  #nodeSelector: {}
+  #  cloud.google.com/gke-nodepool: default-pool
 
   ## optional, you can provide your own zookeeper metadata store for other 
components
   # to use this, you should explicit set components.zookeeper to false
   #
   # userProvidedZookeepers: "zk01.example.com:2181,zk02.example.com:2181"
 
-  ## optional, you can specify where to run pulsar-cluster-initialize job
-  # nodeSelector:
-
 # Can be used to run extra commands in the initialization jobs e.g. to quit 
istio sidecars etc.
 extraInitCommand: ""
 

Reply via email to