File tree Expand file tree Collapse file tree 3 files changed +20
-1
lines changed
variants/advertise-pod-ip Expand file tree Collapse file tree 3 files changed +20
-1
lines changed Original file line number Diff line number Diff line change 26
26
LABELS="$LABELS kafka-broker-rack=$ZONE"
27
27
fi
28
28
29
+ [ -z "$ADVERTISE_ADDR" ] && echo "ADVERTISE_ADDR is empty, will advertise detected DNS name"
29
30
OUTSIDE_HOST=$(kubectl get node "$NODE_NAME" -o jsonpath='{.status.addresses[?(@.type=="InternalIP")].address}')
30
31
OUTSIDE_PORT=$((32400 + ${KAFKA_BROKER_ID}))
31
- SEDS+=("s|#init#advertised.listeners=PLAINTEXT://#init#|advertised.listeners=PLAINTEXT://:9092,OUTSIDE://${OUTSIDE_HOST}:${OUTSIDE_PORT}|")
32
+ SEDS+=("s|#init#advertised.listeners=PLAINTEXT://#init#|advertised.listeners=PLAINTEXT://${ADVERTISE_ADDR} :9092,OUTSIDE://${OUTSIDE_HOST}:${OUTSIDE_PORT}|")
32
33
ANNOTATIONS="$ANNOTATIONS kafka-listener-outside-host=$OUTSIDE_HOST kafka-listener-outside-port=$OUTSIDE_PORT"
33
34
34
35
if [ ! -z "$LABELS" ]; then
Original file line number Diff line number Diff line change
1
+ apiVersion : apps/v1
2
+ kind : StatefulSet
3
+ metadata :
4
+ name : kafka
5
+ spec :
6
+ template :
7
+ spec :
8
+ initContainers :
9
+ - name : init-config
10
+ env :
11
+ - name : ADVERTISE_ADDR
12
+ valueFrom :
13
+ fieldRef :
14
+ fieldPath : status.podIP
Original file line number Diff line number Diff line change
1
+ bases :
2
+ - ../scale-3-5
3
+ patchesStrategicMerge :
4
+ - kafka.yaml
You can’t perform that action at this time.
0 commit comments