Co-authored-by: Elad Dolev <elad@firebolt.io> ### Motivation Give the ability to deploy multi-cluster instance on K8s clusters with non-default `clusterDomain`, and connect to external configuration-store ### Modifications - give the ability to change cluster's name - give the ability to change `clusterDomain` - fix external configuration store functionality - use broker ports variables - use label templates, and add `component` label in several places ### Verifying this change - [x] Make sure that the change passes the CI checks.
40 lines
1.2 KiB
Smarty
40 lines
1.2 KiB
Smarty
{{/*
|
|
Define the pulsar zookeeper
|
|
*/}}
|
|
{{- define "pulsar.zookeeper.service" -}}
|
|
{{ template "pulsar.fullname" . }}-{{ .Values.zookeeper.component }}
|
|
{{- end }}
|
|
|
|
{{/*
|
|
Define the pulsar zookeeper
|
|
*/}}
|
|
{{- define "pulsar.zookeeper.connect" -}}
|
|
{{$zk:=.Values.pulsar_metadata.userProvidedZookeepers}}
|
|
{{- if and (not .Values.components.zookeeper) $zk }}
|
|
{{- $zk -}}
|
|
{{ else }}
|
|
{{- if not (and .Values.tls.enabled .Values.tls.zookeeper.enabled) -}}
|
|
{{ template "pulsar.zookeeper.service" . }}:{{ .Values.zookeeper.ports.client }}
|
|
{{- end -}}
|
|
{{- if and .Values.tls.enabled .Values.tls.zookeeper.enabled -}}
|
|
{{ template "pulsar.zookeeper.service" . }}:{{ .Values.zookeeper.ports.clientTls }}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
|
|
{{/*
|
|
Define the zookeeper hostname
|
|
*/}}
|
|
{{- define "pulsar.zookeeper.hostname" -}}
|
|
${HOSTNAME}.{{ template "pulsar.zookeeper.service" . }}.{{ .Values.namespace }}.svc.{{ .Values.clusterDomain }}
|
|
{{- end -}}
|
|
|
|
{{/*
|
|
Define zookeeper tls settings
|
|
*/}}
|
|
{{- define "pulsar.zookeeper.tls.settings" -}}
|
|
{{- if and .Values.tls.enabled .Values.tls.zookeeper.enabled }}
|
|
/pulsar/keytool/keytool.sh zookeeper {{ template "pulsar.zookeeper.hostname" . }} false;
|
|
{{- end }}
|
|
{{- end }}
|