Add nodeSelector to cluster initialize pod (#284)

* Add nodeSelector to cluster initialize pod

* Add option to values file

* Update charts/pulsar/templates/pulsar-cluster-initialize.yaml

Co-authored-by: Michael Marshall <mikemarsh17@gmail.com>

* Fix typo in values

Co-authored-by: Michael Marshall <mikemarsh17@gmail.com>

### Motivation

Add an option to choose where to run pulsar-cluster-initialize pod. Sometimes there is a necessity to run only on certain nodes.

### Modifications

Added nodeSelector option to the pulsar-cluster-initialize job.
This commit is contained in:
Aliaksandr Shulyak 2022-10-14 13:44:47 -05:00 committed by GitHub
parent 9e10d1ff6d
commit 8b42a61f2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -114,5 +114,9 @@ spec:
volumes:
{{- include "pulsar.toolset.certs.volumes" . | nindent 6 }}
restartPolicy: OnFailure
{{- if .Values.pulsar_metadata.nodeSelector }}
nodeSelector:
{{ toYaml .Values.pulsar_metadata.nodeSelector | indent 8 }}
{{- end }}
{{- end }}
{{- end }}

View File

@ -663,6 +663,9 @@ pulsar_metadata:
# 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: ""