You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by mm...@apache.org on 2022/10/20 04:41:44 UTC
[pulsar-helm-chart] branch master updated: allow specifying the nodeSelector for the init jobs (#225)
This is an automated email from the ASF dual-hosted git repository.
mmarshall 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 8f033bd allow specifying the nodeSelector for the init jobs (#225)
8f033bd is described below
commit 8f033bd1a5eba6a844343325b090a72a7b253e61
Author: Samuel Verstraete <sa...@gmail.com>
AuthorDate: Thu Oct 20 06:41:39 2022 +0200
allow specifying the nodeSelector for the init jobs (#225)
* allow specifying the nodeSelector for the init jobs
* Use pulsar_metadata.nodeSelector
Co-authored-by: samuel <sa...@aprimo.com>
### Motivation
When deploying pulsar to an AKS cluster with windows nodepools i was unable to specify that the Jobs of the initalize release had to run on linux nodes. With the change i can now specify a node selector for the init jobs.
### Modifications
add nodeSelector on pulsar_init and bookie_init
### Verifying this change
- [ ] Make sure that the change passes the CI checks.
---
charts/pulsar/templates/bookkeeper-cluster-initialize.yaml | 4 ++++
charts/pulsar/templates/pulsar-cluster-initialize.yaml | 5 ++++-
charts/pulsar/values.yaml | 3 +++
3 files changed, 11 insertions(+), 1 deletion(-)
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