diff --git a/charts/pulsar/templates/bookkeeper-cluster-initialize.yaml b/charts/pulsar/templates/bookkeeper-cluster-initialize.yaml index 24f455f..928ddcf 100644 --- a/charts/pulsar/templates/bookkeeper-cluster-initialize.yaml +++ b/charts/pulsar/templates/bookkeeper-cluster-initialize.yaml @@ -37,6 +37,10 @@ spec: {{- if and .Values.rbac.enabled .Values.rbac.psp }} serviceAccountName: "{{ template "pulsar.fullname" . }}-{{ .Values.bookkeeper.component }}" {{- end }} + nodeSelector: + {{- if .Values.pulsar_metadata.nodeSelector }} +{{ toYaml .Values.pulsar_metadata.nodeSelector | indent 8 }} + {{- end }} initContainers: - name: wait-zookeeper-ready image: "{{ template "pulsar.imageFullName" (dict "image" .Values.images.bookie "root" .) }}" diff --git a/charts/pulsar/templates/pulsar-cluster-initialize.yaml b/charts/pulsar/templates/pulsar-cluster-initialize.yaml index 224d08a..0c71824 100644 --- a/charts/pulsar/templates/pulsar-cluster-initialize.yaml +++ b/charts/pulsar/templates/pulsar-cluster-initialize.yaml @@ -35,6 +35,10 @@ spec: {{- end }} template: spec: + {{- if .Values.pulsar_metadata.nodeSelector }} + nodeSelector: +{{ toYaml .Values.pulsar_metadata.nodeSelector | indent 8 }} + {{- end }} initContainers: {{- if .Values.pulsar_metadata.configurationStore }} - name: wait-cs-ready @@ -46,7 +50,6 @@ spec: until nslookup {{ .Values.pulsar_metadata.configurationStore}}; do sleep 3; done; - {{- end }} - name: wait-zookeeper-ready image: "{{ template "pulsar.imageFullName" (dict "image" .Values.pulsar_metadata.image "root" .) }}" diff --git a/charts/pulsar/values.yaml b/charts/pulsar/values.yaml index 2645c4b..9d7df5e 100644 --- a/charts/pulsar/values.yaml +++ b/charts/pulsar/values.yaml @@ -644,6 +644,9 @@ 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 provide your own zookeeper metadata store for other components # to use this, you should explicit set components.zookeeper to false