Skip to content

Commit 8a4db1f

Browse files
committed
Adds a variant with scale 1 + localhost listener + auto topic creation
1 parent 02140ec commit 8a4db1f

File tree

4 files changed

+31
-1
lines changed

4 files changed

+31
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,11 @@ and though they still seem to work you can get around that with a v1.14+ kubectl
3939

4040
```
4141
kubectl create namespace kafka && \
42-
kubectl apply -k github.com/Yolean/kubernetes-kafka/variants/scale-1-ephemeral/?ref=master
42+
kubectl apply -k github.com/Yolean/kubernetes-kafka/variants/dev-small/?ref=v6.0.0
4343
```
4444

45+
When all pods are Ready, test with for example `kafkacat -b localhost:9094 -L` over `kubectl -n kafka port-forward kafka-0 9094`.
46+
4547
### Maintaining your own kustomization
4648

4749
Start your variant as a new folder in your choice of version control, with a base `kustomization.yaml` pointing to a tag or revision in this repository:
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[
2+
{"op": "add", "path": "/spec/template/spec/containers/0/command/-", "value": "--override"},
3+
{"op": "add", "path": "/spec/template/spec/containers/0/command/-", "value": "advertised.listeners=PLAINTEXT://:9092,OUTSIDE://localhost:9094"},
4+
{"op": "add", "path": "/spec/template/spec/containers/0/command/-", "value": "--override"},
5+
{"op": "add", "path": "/spec/template/spec/containers/0/command/-", "value": "auto.create.topics.enable=true"}
6+
]

variants/dev-small/kustomization.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# With kubectl -n kafka port-forward kafka-0 9094
2+
bases:
3+
- ../scale-1-ephemeral
4+
patchesJson6902:
5+
- target:
6+
group: apps
7+
version: v1
8+
kind: StatefulSet
9+
name: kafka
10+
path: listener-localhost.json
11+
- target:
12+
group: apps
13+
version: v1
14+
kind: StatefulSet
15+
name: kafka
16+
path: auto-create-topics.json
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[
2+
{"op": "add", "path": "/spec/template/spec/containers/0/command/-", "value": "--override"},
3+
{"op": "add", "path": "/spec/template/spec/containers/0/command/-", "value": "advertised.listeners=PLAINTEXT://:9092,OUTSIDE://localhost:9094"},
4+
{"op": "add", "path": "/spec/template/spec/containers/0/command/-", "value": "--override"},
5+
{"op": "add", "path": "/spec/template/spec/containers/0/command/-", "value": "auto.create.topics.enable=true"}
6+
]

0 commit comments

Comments
 (0)