Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support mechanism to provide external zookeeper-server list to build global/configuration zookeeper #269

Merged
merged 3 commits into from
Oct 18, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions charts/pulsar/templates/zookeeper-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,19 @@ spec:
containerPort: {{ .Values.zookeeper.ports.clientTls }}
{{- end }}
env:
- name: ZOOKEEPER_SERVERS
value:
{{- $global := . }}
{{ range $i, $e := until (.Values.zookeeper.replicaCount | int) }}{{ if ne $i 0 }},{{ end }}{{ template "pulsar.fullname" $global }}-{{ $global.Values.zookeeper.component }}-{{ printf "%d" $i }}{{ end }}
- name: ZOOKEEPER_SERVERS
{{- if .Values.zookeeper.configData.ZOOKEEPER_SERVERS }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably add it to value file with an example and comment it out? so user can know how to use this feature.
As from the script change, seems the provided server list need to contain election port and follower port.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rdhabalia - are you able to update the values.yaml file so that this configuration is documented? I plan to release an updated version of the helm chart next week, and it'd be great to include this.

Copy link
Contributor Author

@rdhabalia rdhabalia Jun 27, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, I have added sample-example values in examples/values-zookeeper-aws.yaml and values.yaml

value: {{ .Values.zookeeper.configData.ZOOKEEPER_SERVERS }}
{{- else }}
{{- $global := . }}
value: {{ range $i, $e := until (.Values.zookeeper.replicaCount | int) }}{{ if ne $i 0 }},{{ end }}{{ template "pulsar.fullname" $global }}-{{ $global.Values.zookeeper.component }}-{{ printf "%d" $i }}{{ end }}
{{- end }}
- name: EXTERNAL_PROVIDED_SERVERS
{{- if .Values.zookeeper.configData.ZOOKEEPER_SERVERS }}
value: "true"
{{- else }}
value: "false"
{{- end }}
envFrom:
- configMapRef:
name: "{{ template "pulsar.fullname" . }}-{{ .Values.zookeeper.component }}"
Expand Down