File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 1212 sed -i "s/#init#broker.id=#init#/broker.id=$KAFKA_BROKER_ID/" /etc/kafka/server.properties
1313
1414 LABELS="kafka-broker-id=$KAFKA_BROKER_ID"
15+ ANNOTATIONS=""
1516
1617 hash kubectl 2>/dev/null || {
1718 sed -i "s/#init#broker.rack=#init#/#init#broker.rack=# kubectl not found in path/" /etc/kafka/server.properties
@@ -32,12 +33,15 @@ data:
3233 else
3334 OUTSIDE_PORT=3240${KAFKA_BROKER_ID}
3435 sed -i "s|#init#advertised.listeners=OUTSIDE://#init#|advertised.listeners=OUTSIDE://${OUTSIDE_HOST}:${OUTSIDE_PORT}|" /etc/kafka/server.properties
35- LABELS ="$LABELS kafka-listener-outside-host=$OUTSIDE_HOST kafka-listener-outside-port=$OUTSIDE_PORT"
36+ ANNOTATIONS ="$ANNOTATIONS kafka-listener-outside-host=$OUTSIDE_HOST kafka-listener-outside-port=$OUTSIDE_PORT"
3637 fi
3738
3839 if [ ! -z "$LABELS" ]; then
3940 kubectl -n $POD_NAMESPACE label pod $POD_NAME $LABELS || echo "Failed to label $POD_NAMESPACE.$POD_NAME - RBAC issue?"
4041 fi
42+ if [ ! -z "$ANNOTATIONS" ]; then
43+ kubectl -n $POD_NAMESPACE annotate pod $POD_NAME $ANNOTATIONS || echo "Failed to annotate $POD_NAMESPACE.$POD_NAME - RBAC issue?"
44+ fi
4145 }
4246
4347 server.properties : |-
You can’t perform that action at this time.
0 commit comments