Skip to content

Fix the scale-2 variant and phase out pzoo #277

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

Merged
merged 3 commits into from
May 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 10 additions & 0 deletions variants/scale-2/kafka-scale2-overrides.json
Original file line number Diff line number Diff line change
@@ -0,0 +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"}
]
7 changes: 7 additions & 0 deletions variants/scale-2/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,10 @@ bases:
patchesStrategicMerge:
- kafka.yaml
- zookeeper.yaml
patchesJson6902:
- target:
group: apps
version: v1
kind: StatefulSet
name: kafka
path: kafka-scale2-overrides.json
25 changes: 5 additions & 20 deletions variants/scale-2/zookeeper.yaml
Original file line number Diff line number Diff line change
@@ -1,43 +1,28 @@
---
apiVersion: v1
kind: Service
metadata:
name: pzoo
namespace: kafka
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: pzoo
namespace: kafka
spec:
replicas: 2
template:
spec:
initContainers:
- name: init-config
env:
- name: PZOO_REPLICAS
value: '2'
- name: ZOO_REPLICAS
value: '1'
replicas: 0
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: zoo
namespace: kafka
spec:
replicas: 1
replicas: 2
template:
spec:
initContainers:
- name: init-config
env:
# There's no validation on these numbers adding up to a coherent zk config, so watch out
- name: PZOO_REPLICAS
value: '2'
value: '0'
- name: ZOO_REPLICAS
value: '1'
value: '2'
- name: ID_OFFSET
value: '3'
value: '1'
4 changes: 4 additions & 0 deletions variants/scale-3-5-nopzoo/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
bases:
- ../scale-3-5
patchesStrategicMerge:
- ./only-zoo-5.yaml
28 changes: 28 additions & 0 deletions variants/scale-3-5-nopzoo/only-zoo-5.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: pzoo
namespace: kafka
spec:
replicas: 0
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: zoo
namespace: kafka
spec:
replicas: 5
template:
spec:
initContainers:
- name: init-config
env:
# 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
value: '5'
- name: ID_OFFSET
value: '1'