From 3a7b0c46c2f5637deca7f905c7cbda1dc2df2e6b Mon Sep 17 00:00:00 2001 From: Ravi Singal Date: Tue, 1 Oct 2024 20:30:21 +0530 Subject: [PATCH] chore: use hostname host.name config --- helm/templates/statefulset.yaml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/helm/templates/statefulset.yaml b/helm/templates/statefulset.yaml index f825420..6b81e16 100644 --- a/helm/templates/statefulset.yaml +++ b/helm/templates/statefulset.yaml @@ -7,7 +7,7 @@ metadata: spec: replicas: {{ .Values.replicaCount }} revisionHistoryLimit: 2 - serviceName: {{ template "schema-registry.headless.service" . }} + serviceName: {{ include "schema-registry.headless.service" . }} selector: matchLabels: app: {{ include "schema-registry.name" . }} @@ -49,10 +49,16 @@ spec: mountPath: /opt/schema-registry/etc/schema-registry/log4j.properties subPath: "log4j.properties" env: - - name: SCHEMA_REGISTRY_HOST_NAME + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: POD_NAMESPACE valueFrom: fieldRef: - fieldPath: status.podIP + fieldPath: metadata.namespace + - name: SCHEMA_REGISTRY_HOST_NAME + value: $(POD_NAME).{{ include "schema-registry.headless.service" . }}.$(POD_NAMESPACE).svc.cluster.local - name: SCHEMA_REGISTRY_LISTENERS value: http://0.0.0.0:{{ .Values.service.port }} - name: SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS