Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract entrypoint command from bin scripts, try native-image zookeeper #311

Merged
merged 41 commits into from
Jul 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
066477a
Makes static (pre-generated) configuration files possible
solsson Mar 6, 2020
56cf85a
Use generated entrypoints, no shell script around the java process
solsson Mar 8, 2020
86b2990
Append to args, not to command, now that we use images' entrypoints
solsson Mar 8, 2020
cc4e968
Nonroot zookeeper had to be restarted once after create
solsson Mar 10, 2020
98663a2
Kafka 2.4.1
solsson Mar 15, 2020
76eee47
kafka-minion ec29ba8c30cb4cdf9bbd04dc55a854b686f85a97
solsson Mar 9, 2020
bc2896a
Unlike broker config zookeeper's needs to know the replica count
solsson Apr 21, 2020
7f5c78c
Merge branch 'static-props-some-day' into nonroot-entrypoints
solsson Apr 22, 2020
d91a92a
Here we need to know the number of replicas, not as two envs
solsson Apr 22, 2020
50e28a6
Transition to a single REPLICAS env (phasing out pzoo)
solsson Apr 22, 2020
6d86264
Crazy fast zookeeper start, crazy cheap so we can scale up
solsson Apr 22, 2020
bec515c
Kafka scales up nicely with no need to restart existing pods
solsson Apr 22, 2020
f2a302e
Connect by name resolution to individual zookeeper pods instead of
solsson Apr 23, 2020
a2802e7
Guaranteed, with limits that will only work given quite even load
solsson Apr 23, 2020
f42afde
AdoptOpenJDK 11.0.7 and a smaller nonroot user layer
solsson Apr 23, 2020
377a0c3
Kafka 2.5.0 with the default (no extra envs) entrypoint
solsson Apr 24, 2020
ebc5042
Breaking: renames the statefulset's headless service so
solsson Apr 25, 2020
2aef643
Merge pull request #315 from Yolean/entrypoints-args-override-listene…
solsson Apr 25, 2020
df954ae
This probe caused log entries "Unable to read additional data from
solsson Apr 25, 2020
a29a19d
New variant suitable for a 3-node 3-zone cluster
solsson Apr 25, 2020
b1199fa
Current zookeeper doesn't log anything from factory on ruok
solsson Apr 25, 2020
6d0e41b
Zookeeper docs say: In container environment, especially in Kubernetes,
solsson Apr 25, 2020
1320641
Fixes scale-1 (and thus dev-small) with the env change from 50e28a6
solsson May 18, 2020
83af767
Native-image zookeeper for scale-1 and dev-small environments,
solsson May 18, 2020
728acff
Nonroot init-containers, seems to fix #318 on minikube and k3s
solsson May 18, 2020
4ab73a0
Adapts to the new entrypoint strategy, and distroless native zookeper
solsson May 18, 2020
502d483
Speeds up kafka-configs.sh and kafka-topics.sh with --zookeeper
solsson May 18, 2020
9e63e93
Current zookeeper build, with graalvm 20.1 and --install-exit-handlers,
solsson Jun 17, 2020
7e0f456
Fixes mistake in the change from commmand to args override
solsson Jul 12, 2020
4207d20
Merge branch 'master' into nonroot-entrypoints
solsson Jul 12, 2020
372497f
We've never had limits on zookeeper cpu, and we've requested 10
solsson Jul 12, 2020
d5f12ab
Increases max connections per client from 2 to 3 after I had
solsson May 3, 2020
8c5b3fc
cwiki.apache.org/confluence/display/KAFKA/KIP-537
solsson May 5, 2020
7790ee0
Theory: if the name matches the logged "Server environment:host.name"
solsson May 12, 2020
2d83408
Zookeeper 3.5.8
solsson Jul 12, 2020
2eeaa00
Merge branch 'zookeeper-3.5.8' into nonroot-entrypoints
solsson Jul 12, 2020
2c05b72
Fixes the zoo service names. Only pzoo was correct.
solsson Jul 12, 2020
959723f
Documents the upcoming merge
solsson Jul 12, 2020
e409686
Uses actual zookeeper hostnames (see 7790ee0 + 2c05b72),
solsson Jul 12, 2020
d1715d4
Fix changelog markdown
solsson Jul 12, 2020
cee5278
Uses the last builds from solsson/dockerfiles#29
solsson Jul 12, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ Then pick and chose from patches our [example variants](https://github.com/Yolea

| tag | k8s ≥ | highlights |
| ------ | ----- | ----------- |
| TBD | 1.13+ | Kafka [2.4.0](https://github.com/Yolean/kubernetes-kafka/pull/297) + [standard storage class](https://github.com/Yolean/kubernetes-kafka/pull/294) |
| v7.0.0 | 1.15+ | [Breaking](https://github.com/Yolean/kubernetes-kafka/pull/311#issuecomment-657181714) with [nonroot](./nonroot/) and [native](./native/) bases |
| v6.0.x | 1.13+ | Kafka [2.4.0](https://github.com/Yolean/kubernetes-kafka/pull/297) + [standard storage class](https://github.com/Yolean/kubernetes-kafka/pull/294) |
| v6.0.0 | 1.11+ | Kafka 2.2.0 + `apply -k` (kubectl 1.14+) + [#270](https://github.com/Yolean/kubernetes-kafka/pull/270) |
| v5.1.0 | 1.11+ | Kafka 2.1.1 |
| v5.0.3 | 1.11+ | Zookeeper fix [#227](https://github.com/Yolean/kubernetes-kafka/pull/227) + [maxClientCnxns=1](https://github.com/Yolean/kubernetes-kafka/pull/230#issuecomment-445953857) |
Expand Down
2 changes: 1 addition & 1 deletion cruise-control/topic-create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
spec:
containers:
- name: topic-create
image: solsson/kafka:native-cli@sha256:7a4cc4ef875aea50b8d4dbb525cbac0ef3a5c6e611fcafc2c415ca432ebe5601
image: solsson/kafka:native-cli@sha256:fbf29c59182fb87921c5199783d2d5796856ecbfe34a9c03eca658b3cf50f3c4
command:
- ./bin/kafka-topics.sh
- --zookeeper
Expand Down
2 changes: 1 addition & 1 deletion events-kube/topic-create.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
spec:
containers:
- name: topic-create
image: solsson/kafka:native-cli@sha256:7a4cc4ef875aea50b8d4dbb525cbac0ef3a5c6e611fcafc2c415ca432ebe5601
image: solsson/kafka:native-cli@sha256:fbf29c59182fb87921c5199783d2d5796856ecbfe34a9c03eca658b3cf50f3c4
command:
- ./bin/kafka-topics.sh
- --zookeeper
Expand Down
3 changes: 2 additions & 1 deletion kafka/10broker-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ data:
}
printf '%s\n' "${SEDS[@]}" | sed -f - /etc/kafka-configmap/server.properties > /etc/kafka/server.properties.tmp
[ $? -eq 0 ] && mv /etc/kafka/server.properties.tmp /etc/kafka/server.properties
ln -s /etc/kafka/server.properties /etc/kafka/server.properties.$POD_NAME

server.properties: |-
############################# Log Basics #############################
Expand Down Expand Up @@ -166,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
5 changes: 4 additions & 1 deletion kafka/20dns.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@
apiVersion: v1
kind: Service
metadata:
name: broker
name: kafka
namespace: kafka
annotations:
service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
spec:
publishNotReadyAddresses: true
ports:
- port: 9092
# [podname].broker.kafka.svc.cluster.local
Expand Down
12 changes: 10 additions & 2 deletions kafka/50kafka.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ spec:
selector:
matchLabels:
app: kafka
serviceName: "broker"
serviceName: "kafka"
replicas: 3
updateStrategy:
type: RollingUpdate
Expand Down Expand Up @@ -47,6 +47,14 @@ spec:
- name: broker
image: solsson/kafka:2.4.1@sha256:79761e15919b4fe9857ec00313c9df799918ad0340b684c0163ab7035907bb5a
env:
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: CLASSPATH
value: /opt/kafka/libs/extensions/*
- name: KAFKA_LOG4J_OPTS
Expand All @@ -62,7 +70,7 @@ spec:
containerPort: 5555
command:
- ./bin/kafka-server-start.sh
- /etc/kafka/server.properties
- /etc/kafka/server.properties.$(POD_NAME)
lifecycle:
preStop:
exec:
Expand Down
2 changes: 1 addition & 1 deletion kafka/test/kafkacat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ spec:
spec:
containers:
- name: topic-create
image: solsson/kafka:native-cli@sha256:7a4cc4ef875aea50b8d4dbb525cbac0ef3a5c6e611fcafc2c415ca432ebe5601
image: solsson/kafka:native-cli@sha256:fbf29c59182fb87921c5199783d2d5796856ecbfe34a9c03eca658b3cf50f3c4
command:
- ./bin/kafka-topics.sh
- --zookeeper
Expand Down
2 changes: 1 addition & 1 deletion kafka/test/produce-consume.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ spec:
spec:
containers:
- name: topic-create
image: solsson/kafka:native-cli@sha256:7a4cc4ef875aea50b8d4dbb525cbac0ef3a5c6e611fcafc2c415ca432ebe5601
image: solsson/kafka:native-cli@sha256:fbf29c59182fb87921c5199783d2d5796856ecbfe34a9c03eca658b3cf50f3c4
command:
- ./bin/kafka-topics.sh
- --zookeeper
Expand Down
9 changes: 9 additions & 0 deletions native/distroless.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# The more specific removes are to make sure that there was a shell that we're removing
- op: remove
path: /spec/template/spec/containers/0/readinessProbe/exec
- op: remove
path: /spec/template/spec/containers/0/readinessProbe
- op: remove
path: /spec/template/spec/containers/0/lifecycle/preStop/exec
- op: remove
path: /spec/template/spec/containers/0/lifecycle/preStop
17 changes: 17 additions & 0 deletions native/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
bases:
- ../nonroot
patchesStrategicMerge:
- native-image-zookeeper.yaml
patchesJson6902:
- target:
group: apps
version: v1
kind: StatefulSet
name: pzoo
path: distroless.yaml
- target:
group: apps
version: v1
kind: StatefulSet
name: zoo
path: distroless.yaml
29 changes: 29 additions & 0 deletions native/native-image-zookeeper.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: pzoo
spec:
template:
spec:
containers:
- name: zookeeper
image: solsson/kafka:native-zookeeper-server-start@sha256:ba3a0632240b8906a3b5bb6441e98ad9d9de73cb716b156ca68f1b435c819e8b
resources:
requests:
cpu: 10m
memory: 25Mi
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: zoo
spec:
template:
spec:
containers:
- name: zookeeper
image: solsson/kafka:native-zookeeper-server-start@sha256:ba3a0632240b8906a3b5bb6441e98ad9d9de73cb716b156ca68f1b435c819e8b
resources:
requests:
cpu: 10m
memory: 25Mi
2 changes: 2 additions & 0 deletions nonroot/entrypoint-from-image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- op: remove
path: /spec/template/spec/containers/0/command
25 changes: 21 additions & 4 deletions nonroot/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ bases:
- ../rbac-namespace-default
- ../kafka
- ../zookeeper
patchesStrategicMerge:
- nonroot-image-kafka.yaml
- nonroot-image-zookeeper.yaml
patchesJson6902:
- target:
group: apps
Expand All @@ -21,7 +24,21 @@ patchesJson6902:
kind: StatefulSet
name: zoo
path: fsgroup-65534.yaml
# https://github.com/kubernetes-sigs/kustomize/issues/915#issuecomment-477808963
patchesStrategicMerge:
- nonroot-image-kafka.yaml
- nonroot-image-zookeeper.yaml
- target:
group: apps
version: v1
kind: StatefulSet
name: kafka
path: entrypoint-from-image.yaml
- target:
group: apps
version: v1
kind: StatefulSet
name: pzoo
path: entrypoint-from-image.yaml
- target:
group: apps
version: v1
kind: StatefulSet
name: zoo
path: entrypoint-from-image.yaml
7 changes: 6 additions & 1 deletion nonroot/nonroot-image-kafka.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ metadata:
spec:
template:
spec:
initContainers:
- name: init-config
image: solsson/kafka:initutils-nonroot@sha256:87f6bb39fd47a6f382018a2dc55a484d1b71eee48a58019c7e65a9bc53e8dca2
containers:
- name: broker
image: solsson/kafka:2.4.1-nonroot@sha256:ddfdd23081c075b86132f3e5d8e15389c78c4334dbb22166d9ad1d57f362007f
image: solsson/kafka:2.5.0-kafka-server-start@sha256:c6d43d1240c358d9ab8bb60de61a0b9578f04fd727ee4016f7706800998e5351
args:
- /etc/kafka/server.properties.$(POD_NAME)
14 changes: 12 additions & 2 deletions nonroot/nonroot-image-zookeeper.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,14 @@ metadata:
spec:
template:
spec:
initContainers:
- name: init-config
image: solsson/kafka:initutils-nonroot@sha256:87f6bb39fd47a6f382018a2dc55a484d1b71eee48a58019c7e65a9bc53e8dca2
containers:
- name: zookeeper
image: solsson/kafka:2.4.1-nonroot@sha256:ddfdd23081c075b86132f3e5d8e15389c78c4334dbb22166d9ad1d57f362007f
image: solsson/kafka:zookeeper-server-start@sha256:c34a9928fcc5ac15b2243ee2994cf09f5a3608b6090de378f39f89ad12320276
args:
- /etc/kafka/zookeeper.properties.scale-$(REPLICAS).$(POD_NAME)
---
apiVersion: apps/v1
kind: StatefulSet
Expand All @@ -16,6 +21,11 @@ metadata:
spec:
template:
spec:
initContainers:
- name: init-config
image: solsson/kafka:initutils-nonroot@sha256:87f6bb39fd47a6f382018a2dc55a484d1b71eee48a58019c7e65a9bc53e8dca2
containers:
- name: zookeeper
image: solsson/kafka:2.4.1-nonroot@sha256:ddfdd23081c075b86132f3e5d8e15389c78c4334dbb22166d9ad1d57f362007f
image: solsson/kafka:zookeeper-server-start@sha256:c34a9928fcc5ac15b2243ee2994cf09f5a3608b6090de378f39f89ad12320276
args:
- /etc/kafka/zookeeper.properties.scale-$(REPLICAS).$(POD_NAME)
4 changes: 2 additions & 2 deletions variants/dev-small/listener-localhost.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[
{"op": "add", "path": "/spec/template/spec/containers/0/command/2", "value": "--override"},
{"op": "add", "path": "/spec/template/spec/containers/0/command/3", "value": "advertised.listeners=PLAINTEXT://:9092,OUTSIDE://localhost:9094"}
{"op": "add", "path": "/spec/template/spec/containers/0/args/1", "value": "--override"},
{"op": "add", "path": "/spec/template/spec/containers/0/args/2", "value": "advertised.listeners=PLAINTEXT://:9092,OUTSIDE://localhost:9094"}
]
4 changes: 2 additions & 2 deletions variants/dev-small/num-partitions-1.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[
{"op": "add", "path": "/spec/template/spec/containers/0/command/-", "value": "--override"},
{"op": "add", "path": "/spec/template/spec/containers/0/command/-", "value": "num.partitions=1"}
{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "--override"},
{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "num.partitions=1"}
]
16 changes: 8 additions & 8 deletions variants/scale-1-ephemeral/kafka-scale1-overrides.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[
{"op": "add", "path": "/spec/template/spec/containers/0/command/-", "value": "--override"},
{"op": "add", "path": "/spec/template/spec/containers/0/command/-", "value": "default.replication.factor=1"},
{"op": "add", "path": "/spec/template/spec/containers/0/command/-", "value": "--override"},
{"op": "add", "path": "/spec/template/spec/containers/0/command/-", "value": "min.insync.replicas=1"},
{"op": "add", "path": "/spec/template/spec/containers/0/command/-", "value": "--override"},
{"op": "add", "path": "/spec/template/spec/containers/0/command/-", "value": "offsets.topic.replication.factor=1"},
{"op": "add", "path": "/spec/template/spec/containers/0/command/-", "value": "--override"},
{"op": "add", "path": "/spec/template/spec/containers/0/command/-", "value": "offsets.topic.num.partitions=1"}
{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "--override"},
{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "default.replication.factor=1"},
{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "--override"},
{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "min.insync.replicas=1"},
{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "--override"},
{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "offsets.topic.replication.factor=1"},
{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "--override"},
{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "offsets.topic.num.partitions=1"}
]
18 changes: 10 additions & 8 deletions variants/scale-1/kafka-scale1-overrides.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
[
{"op": "add", "path": "/spec/template/spec/containers/0/command/-", "value": "--override"},
{"op": "add", "path": "/spec/template/spec/containers/0/command/-", "value": "default.replication.factor=1"},
{"op": "add", "path": "/spec/template/spec/containers/0/command/-", "value": "--override"},
{"op": "add", "path": "/spec/template/spec/containers/0/command/-", "value": "min.insync.replicas=1"},
{"op": "add", "path": "/spec/template/spec/containers/0/command/-", "value": "--override"},
{"op": "add", "path": "/spec/template/spec/containers/0/command/-", "value": "offsets.topic.replication.factor=1"},
{"op": "add", "path": "/spec/template/spec/containers/0/command/-", "value": "--override"},
{"op": "add", "path": "/spec/template/spec/containers/0/command/-", "value": "offsets.topic.num.partitions=1"}
{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "--override"},
{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "zookeeper.connect=zoo-0.zoo.$(POD_NAMESPACE).svc.cluster.local:2181" },
{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "--override"},
{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "default.replication.factor=1"},
{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "--override"},
{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "min.insync.replicas=1"},
{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "--override"},
{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "offsets.topic.replication.factor=1"},
{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "--override"},
{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "offsets.topic.num.partitions=1"}
]
2 changes: 1 addition & 1 deletion variants/scale-1/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
bases:
- ../../nonroot
- ../../native
patchesStrategicMerge:
- kafka.yaml
- zookeeper.yaml
Expand Down
18 changes: 14 additions & 4 deletions variants/scale-1/zookeeper.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,13 @@ spec:
env:
- name: PZOO_REPLICAS
value: '1'
- name: ZOO_REPLICAS
value: '0'
- name: REPLICAS
value: '1'
containers:
- name: zookeeper
env:
- name: REPLICAS
value: '1'
---
apiVersion: apps/v1
kind: StatefulSet
Expand All @@ -37,7 +42,12 @@ spec:
# There's no validation on these numbers adding up to a coherent zk config, so watch out
- name: PZOO_REPLICAS
value: '1'
- name: ZOO_REPLICAS
value: '0'
- name: REPLICAS
value: '1'
- name: ID_OFFSET
value: '2'
containers:
- name: zookeeper
env:
- name: REPLICAS
value: '1'
16 changes: 8 additions & 8 deletions variants/scale-2/kafka-scale2-overrides.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[
{"op": "add", "path": "/spec/template/spec/containers/0/command/-", "value": "--override"},
{"op": "add", "path": "/spec/template/spec/containers/0/command/-", "value": "default.replication.factor=2"},
{"op": "add", "path": "/spec/template/spec/containers/0/command/-", "value": "--override"},
{"op": "add", "path": "/spec/template/spec/containers/0/command/-", "value": "min.insync.replicas=2"},
{"op": "add", "path": "/spec/template/spec/containers/0/command/-", "value": "--override"},
{"op": "add", "path": "/spec/template/spec/containers/0/command/-", "value": "offsets.topic.replication.factor=2"},
{"op": "add", "path": "/spec/template/spec/containers/0/command/-", "value": "--override"},
{"op": "add", "path": "/spec/template/spec/containers/0/command/-", "value": "offsets.topic.num.partitions=2"}
{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "--override"},
{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "default.replication.factor=2"},
{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "--override"},
{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "min.insync.replicas=2"},
{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "--override"},
{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "offsets.topic.replication.factor=2"},
{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "--override"},
{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "offsets.topic.num.partitions=2"}
]
7 changes: 6 additions & 1 deletion variants/scale-2/zookeeper.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@ spec:
# There's no validation on these numbers adding up to a coherent zk config, so watch out
- name: PZOO_REPLICAS
value: '0'
- name: ZOO_REPLICAS
- name: REPLICAS
value: '2'
- name: ID_OFFSET
value: '1'
containers:
- name: zookeeper
env:
- name: REPLICAS
value: '2'
6 changes: 6 additions & 0 deletions variants/scale-3-3/kafka-zookeeper-connect-only-zoo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[
{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "--override"},
{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value":
"zookeeper.connect=zoo-0.zoo.$(POD_NAMESPACE).svc.cluster.local:2181,zoo-1.zoo.$(POD_NAMESPACE).svc.cluster.local:2181,zoo-2.zoo.$(POD_NAMESPACE).svc.cluster.local:2181"
}
]
12 changes: 12 additions & 0 deletions variants/scale-3-3/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
bases:
- ../scale-3-5
patchesStrategicMerge:
- ./only-zoo-3.yaml
patchesJson6902:
- target:
group: apps
version: v1
kind: StatefulSet
name: kafka
namespace: kafka
path: kafka-zookeeper-connect-only-zoo.json
Loading