advertise listeners on NodePort when external type is NodePort (#14354)

Signed-off-by: S.Cavallo <smcavallo@hotmail.com>
This commit is contained in:
smcavallo
2019-06-18 12:11:50 -07:00
committed by Kubernetes Prow Robot
parent a8279d3ce8
commit 28e8afb298
2 changed files with 5 additions and 1 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ apiVersion: v1
description: Apache Kafka is publish-subscribe messaging rethought as a distributed
commit log.
name: kafka
version: 0.15.7
version: 0.15.8
appVersion: 5.0.1
keywords:
- kafka
@@ -198,7 +198,11 @@ spec:
{{- if eq .Values.external.type "LoadBalancer" }}
export LOAD_BALANCER_IP=$(echo '{{ .Values.external.loadBalancerIP }}' | tr -d '[]' | cut -d ' ' -f "$(($KAFKA_BROKER_ID + 1))") && \
{{- end }}
{{- if eq .Values.external.type "NodePort" }}
export KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://${POD_IP}:9092{{ if kindIs "string" $advertisedListenersOverride }}{{ printf ",%s" $advertisedListenersOverride }}{{ end }} && \
{{- else }}
export KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://${POD_NAME}.{{ include "kafka.fullname" . }}-headless.${POD_NAMESPACE}:9092{{ if kindIs "string" $advertisedListenersOverride }}{{ printf ",%s" $advertisedListenersOverride }}{{ end }} && \
{{- end }}
exec /etc/confluent/docker/run
volumeMounts:
- name: datadir