-
Notifications
You must be signed in to change notification settings - Fork 733
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Crazy fast zookeeper start, crazy cheap so we can scale up
- Loading branch information
Showing
7 changed files
with
93 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
bases: | ||
- ../nonroot | ||
patchesStrategicMerge: | ||
- native-image-zookeeper.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: pzoo | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: zookeeper | ||
image: solsson/kafka:native-zookeeper-server-start@sha256:fb7b0ea81e3490f088de1491afcdde8f7531477f125781c726dfbbffb2695a01 | ||
--- | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: zoo | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: zookeeper | ||
image: solsson/kafka:native-zookeeper-server-start@sha256:fb7b0ea81e3490f088de1491afcdde8f7531477f125781c726dfbbffb2695a01 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: kafka | ||
spec: | ||
replicas: 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
bases: | ||
- ../../native | ||
patchesStrategicMerge: | ||
- zoo-9.yaml | ||
- kafka-6.yaml | ||
patchesJson6902: | ||
# The nonroot image is distroless and doesn't support a shell that the prestop hook needs | ||
- target: | ||
group: apps | ||
version: v1 | ||
kind: StatefulSet | ||
name: zoo | ||
path: lifecycle-remove.json | ||
# The nonroot image is distroless and has neither shell nor the nc command | ||
- target: | ||
group: apps | ||
version: v1 | ||
kind: StatefulSet | ||
name: zoo | ||
path: zoo-readiness-without-shell.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[ | ||
{"op": "remove", "path": "/spec/template/spec/containers/0/lifecycle"} | ||
] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
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: 9 | ||
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: REPLICAS | ||
value: '9' | ||
- name: ID_OFFSET | ||
value: '1' | ||
containers: | ||
- name: zookeeper | ||
env: | ||
- name: REPLICAS | ||
value: '9' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
- op: replace | ||
path: /spec/template/spec/containers/0/readinessProbe | ||
value: | ||
tcpSocket: | ||
port: 2181 |