mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
fix: Cannot configure advertised listeners to use host ip for external clients [in Review] (#13155)
* Add external support for loadbalancer Signed-off-by: Tsuyoshi Ushio <ushio@simplearchitect.com> * Version bump Signed-off-by: Tsuyoshi Ushio <ushio@simplearchitect.com>
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
3840c5edae
commit
be88d44e75
@@ -2,7 +2,7 @@ apiVersion: v1
|
||||
description: Apache Kafka is publish-subscribe messaging rethought as a distributed
|
||||
commit log.
|
||||
name: kafka
|
||||
version: 0.14.5
|
||||
version: 0.14.6
|
||||
appVersion: 5.0.1
|
||||
keywords:
|
||||
- kafka
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
{{- $fullName := include "kafka.fullname" . }}
|
||||
{{- $replicas := .Values.replicas | int }}
|
||||
{{- $servicePort := .Values.external.servicePort }}
|
||||
{{- $firstListenerPort := .Values.external.firstListenerPort }}
|
||||
{{- $dnsPrefix := printf "%s" .Release.Name }}
|
||||
{{- $root := . }}
|
||||
{{- range $i, $e := until $replicas }}
|
||||
@@ -45,12 +46,14 @@ spec:
|
||||
ports:
|
||||
- name: external-broker
|
||||
{{- if and (eq $root.Values.external.type "LoadBalancer") (not $root.Values.external.distinct) }}
|
||||
port: {{ $externalListenerPort }}
|
||||
port: {{ $firstListenerPort }}
|
||||
{{- else }}
|
||||
port: {{ $servicePort }}
|
||||
{{- end }}
|
||||
{{- if and (eq $root.Values.external.type "LoadBalancer") ($root.Values.external.distinct) }}
|
||||
targetPort: {{ $servicePort }}
|
||||
{{- else if and (eq $root.Values.external.type "LoadBalancer") (not $root.Values.external.distinct) }}
|
||||
targetPort: {{ $firstListenerPort }}
|
||||
{{- else }}
|
||||
targetPort: {{ $externalListenerPort }}
|
||||
{{- end }}
|
||||
|
||||
@@ -186,6 +186,9 @@ spec:
|
||||
- |
|
||||
unset KAFKA_PORT && \
|
||||
export KAFKA_BROKER_ID=${POD_NAME##*-} && \
|
||||
{{- if eq .Values.external.type "LoadBalancer" }}
|
||||
export LOAD_BALANCER_IP=$(echo '{{ .Values.external.loadBalancerIP }}' | tr -d '[]' | cut -d ' ' -f "$(($KAFKA_BROKER_ID + 1))") && \
|
||||
{{- end }}
|
||||
export KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://${POD_NAME}.{{ include "kafka.fullname" . }}-headless.${POD_NAMESPACE}:9092{{ if kindIs "string" $advertisedListenersOverride }}{{ printf ",%s" $advertisedListenersOverride }}{{ end }} && \
|
||||
exec /etc/confluent/docker/run
|
||||
volumeMounts:
|
||||
|
||||
Reference in New Issue
Block a user