You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
79 lines
2.1 KiB
79 lines
2.1 KiB
apiVersion: apps/v1beta1 |
|
kind: StatefulSet |
|
metadata: |
|
name: pzoo |
|
namespace: kafka |
|
spec: |
|
selector: |
|
matchLabels: |
|
app: zookeeper |
|
storage: persistent |
|
serviceName: "pzoo" |
|
replicas: 3 |
|
updateStrategy: |
|
type: OnDelete |
|
template: |
|
metadata: |
|
labels: |
|
app: zookeeper |
|
storage: persistent |
|
annotations: |
|
spec: |
|
terminationGracePeriodSeconds: 10 |
|
initContainers: |
|
- name: init-config |
|
image: solsson/kafka-initutils@sha256:18bf01c2c756b550103a99b3c14f741acccea106072cd37155c6d24be4edd6e2 |
|
command: ['/bin/bash', '/etc/kafka-configmap/init.sh'] |
|
volumeMounts: |
|
- name: configmap |
|
mountPath: /etc/kafka-configmap |
|
- name: config |
|
mountPath: /etc/kafka |
|
- name: data |
|
mountPath: /var/lib/zookeeper/data |
|
containers: |
|
- name: zookeeper |
|
image: solsson/kafka:1.0.1@sha256:1a4689d49d6274ac59b9b740f51b0408e1c90a9b66d16ad114ee9f7193bab111 |
|
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 |
|
readinessProbe: |
|
exec: |
|
command: |
|
- /bin/sh |
|
- -c |
|
- '[ "imok" = "$(echo ruok | nc -w 1 -q 1 127.0.0.1 2181)" ]' |
|
volumeMounts: |
|
- name: config |
|
mountPath: /etc/kafka |
|
- name: data |
|
mountPath: /var/lib/zookeeper/data |
|
volumes: |
|
- name: configmap |
|
configMap: |
|
name: zookeeper-config |
|
- name: config |
|
emptyDir: {} |
|
volumeClaimTemplates: |
|
- metadata: |
|
name: data |
|
spec: |
|
accessModes: [ "ReadWriteOnce" ] |
|
storageClassName: kafka-zookeeper |
|
resources: |
|
requests: |
|
storage: 1Gi
|
|
|