Skip to content

Commit

Permalink
Merge branch 'zookeeper-3.5.8' into nonroot-entrypoints
Browse files Browse the repository at this point in the history
  • Loading branch information
solsson committed Jul 12, 2020
2 parents 372497f + 2d83408 commit 2eeaa00
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion kafka/10broker-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ data:
zookeeper.connect=zookeeper:2181
# Timeout in ms for connecting to zookeeper
#zookeeper.connection.timeout.ms=6000
#zookeeper.connection.timeout.ms=18000
############################# Group Coordinator Settings #############################
Expand Down
4 changes: 2 additions & 2 deletions nonroot/nonroot-image-zookeeper.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ spec:
image: solsson/kafka:initutils-nonroot@sha256:87f6bb39fd47a6f382018a2dc55a484d1b71eee48a58019c7e65a9bc53e8dca2
containers:
- name: zookeeper
image: solsson/kafka:2.5.0-zookeeper-server-start@sha256:4f9c68ff762c1419270dd72d38450f58cf130aa0c66f8359441075b4fe04de85
image: solsson/kafka:zookeeper-server-start@sha256:c34a9928fcc5ac15b2243ee2994cf09f5a3608b6090de378f39f89ad12320276
args:
- /etc/kafka/zookeeper.properties.scale-$(REPLICAS).$(POD_NAME)
---
Expand All @@ -26,6 +26,6 @@ spec:
image: solsson/kafka:initutils-nonroot@sha256:87f6bb39fd47a6f382018a2dc55a484d1b71eee48a58019c7e65a9bc53e8dca2
containers:
- name: zookeeper
image: solsson/kafka:2.5.0-zookeeper-server-start@sha256:4f9c68ff762c1419270dd72d38450f58cf130aa0c66f8359441075b4fe04de85
image: solsson/kafka:zookeeper-server-start@sha256:c34a9928fcc5ac15b2243ee2994cf09f5a3608b6090de378f39f89ad12320276
args:
- /etc/kafka/zookeeper.properties.scale-$(REPLICAS).$(POD_NAME)
7 changes: 3 additions & 4 deletions zookeeper/10zookeeper-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ data:
cp -Lur /etc/kafka-configmap/* /etc/kafka/
[ ! -z "$PZOO_REPLICAS" ] && [ ! -z "$REPLICAS" ] && {
sed -i "s/^server\\./#server./" /etc/kafka/zookeeper.properties
for N in $(seq $PZOO_REPLICAS); do echo "server.$N=pzoo-$(( $N - 1 )).pzoo:2888:3888:participant" >> /etc/kafka/zookeeper.properties; done
for N in $(seq $(( $REPLICAS - $PZOO_REPLICAS ))); do echo "server.$(( $PZOO_REPLICAS + $N ))=zoo-$(( $N - 1 )).zoo:2888:3888:participant" >> /etc/kafka/zookeeper.properties; done
for N in $(seq $PZOO_REPLICAS); do echo "server.$N=pzoo-$(( $N - 1 )).pzoo.$POD_NAMESPACE.svc.cluster.local:2888:3888:participant" >> /etc/kafka/zookeeper.properties; done
for N in $(seq $(( $REPLICAS - $PZOO_REPLICAS ))); do echo "server.$(( $PZOO_REPLICAS + $N ))=zoo-$(( $N - 1 )).$POD_NAMESPACE.svc.cluster.local:2888:3888:participant" >> /etc/kafka/zookeeper.properties; done
}
sed -i "s/server\.$ZOOKEEPER_SERVER_ID\=[a-z0-9.-]*/server.$ZOOKEEPER_SERVER_ID=0.0.0.0/" /etc/kafka/zookeeper.properties
ln -s /etc/kafka/zookeeper.properties /etc/kafka/zookeeper.properties.scale-$REPLICAS.$POD_NAME
zookeeper.properties: |
Expand All @@ -28,7 +27,7 @@ data:
dataDir=/var/lib/zookeeper/data
dataLogDir=/var/lib/zookeeper/log
clientPort=2181
maxClientCnxns=2
maxClientCnxns=3
initLimit=5
syncLimit=2
tcpKeepAlive=true
Expand Down
4 changes: 4 additions & 0 deletions zookeeper/50pzoo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
volumeMounts:
- name: configmap
mountPath: /etc/kafka-configmap
Expand Down
4 changes: 4 additions & 0 deletions zookeeper/51zoo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: ID_OFFSET
value: "4"
volumeMounts:
Expand Down

0 comments on commit 2eeaa00

Please sign in to comment.