aboutsummaryrefslogtreecommitdiff
path: root/zookeeper/51zoo.yml
diff options
context:
space:
mode:
Diffstat (limited to 'zookeeper/51zoo.yml')
-rw-r--r--zookeeper/51zoo.yml71
1 files changed, 71 insertions, 0 deletions
diff --git a/zookeeper/51zoo.yml b/zookeeper/51zoo.yml
new file mode 100644
index 0000000..778567d
--- /dev/null
+++ b/zookeeper/51zoo.yml
@@ -0,0 +1,71 @@
+apiVersion: apps/v1beta1
+kind: StatefulSet
+metadata:
+ name: zoo
+ namespace: kafka
+spec:
+ serviceName: "zoo"
+ replicas: 2
+ template:
+ metadata:
+ labels:
+ app: zookeeper
+ storage: ephemeral
+ annotations:
+ spec:
+ terminationGracePeriodSeconds: 10
+ initContainers:
+ - name: init-config
+ image: solsson/kafka:0.11.0.0@sha256:b27560de08d30ebf96d12e74f80afcaca503ad4ca3103e63b1fd43a2e4c976ce
+ command: ['/bin/bash', '/etc/kafka/init.sh']
+ env:
+ - name: ID_OFFSET
+ value: "4"
+ volumeMounts:
+ - name: config
+ mountPath: /etc/kafka
+ - name: data
+ mountPath: /var/lib/zookeeper/data
+ containers:
+ - name: zookeeper
+ image: solsson/kafka:0.11.0.0@sha256:b27560de08d30ebf96d12e74f80afcaca503ad4ca3103e63b1fd43a2e4c976ce
+ env:
+ - name: KAFKA_LOG4J_OPTS
+ value: -Dlog4j.configuration=file:/etc/kafka/log4j.properties
+ command:
+ - ./bin/zookeeper-server-start.sh
+ - /etc/kafka/zookeeper.properties
+ ports:
+ - containerPort: 2181
+ name: client
+ - containerPort: 2888
+ name: peer
+ - containerPort: 3888
+ name: leader-election
+ resources:
+ requests:
+ cpu: 10m
+ memory: 100Mi
+ livenessProbe:
+ exec:
+ command:
+ - /bin/sh
+ - -c
+ - '[ "imok" = "$(echo ruok | nc -w 1 127.0.0.1 2181)" ]'
+ readinessProbe:
+ exec:
+ command:
+ - /bin/sh
+ - -c
+ - '[ "imok" = "$(echo ruok | nc -w 1 127.0.0.1 2181)" ]'
+ volumeMounts:
+ - name: config
+ mountPath: /etc/kafka
+ - name: data
+ mountPath: /var/lib/zookeeper/data
+ volumes:
+ - name: config
+ configMap:
+ name: zookeeper-config
+ - name: data
+ emptyDir: {}