From 097eb176f07e294bfeec0c4cfad45f6c48c196a6 Mon Sep 17 00:00:00 2001 From: Lari Hotari Date: Fri, 22 Nov 2024 15:01:16 +0200 Subject: [PATCH] Fix Oxia config so that it includes a list of all pods in the statefulset --- charts/pulsar/templates/_oxia.tpl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/charts/pulsar/templates/_oxia.tpl b/charts/pulsar/templates/_oxia.tpl index b8b81434..31a6ee99 100644 --- a/charts/pulsar/templates/_oxia.tpl +++ b/charts/pulsar/templates/_oxia.tpl @@ -88,8 +88,14 @@ namespaces: initialShardCount: {{ .Values.oxia.initialShardCount }} replicationFactor: {{ .Values.oxia.replicationFactor }} servers: - - public: {{ template "pulsar.fullname" . }}-{{ .Values.oxia.component }}-svc.{{ template "pulsar.namespace" . }}.svc.cluster.local:{{ .Values.oxia.server.ports.public }} - internal: {{ template "pulsar.fullname" . }}-{{ .Values.oxia.component }}-svc.{{ template "pulsar.namespace" . }}.svc.cluster.local:{{ .Values.oxia.server.ports.internal }} + {{- $servicenameFQDN := printf "%s-%s-svc.%s.svc.cluster.local" (include "pulsar.fullname" .) .Values.oxia.component (include "pulsar.namespace" .) }} + {{- $podnamePrefix := printf "%s-%s-server-" (include "pulsar.fullname" .) .Values.oxia.component }} + {{- range until (int .Values.oxia.server.replicas) }} + {{- $podnameIndex := . }} + {{- $podnameFQDN := printf "%s%d.%s" $podnamePrefix $podnameIndex $servicenameFQDN }} + - public: {{ $podnameFQDN }}:{{ $.Values.oxia.server.ports.public }} + internal: {{ $podnameFQDN }}:{{ $.Values.oxia.server.ports.internal }} + {{- end }} {{- end }} {{/*