This repository has been archived by the owner on Aug 7, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzookeeper.yaml
83 lines (82 loc) · 1.95 KB
/
zookeeper.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: zk
spec:
selector:
matchLabels:
app: zk
updateStrategy:
type: RollingUpdate
template:
metadata:
labels:
app: zk
spec:
nodeSelector:
zk: ""
tolerations:
- effect: NoSchedule
key: dedicated
operator: Equal
value: proxmox
hostNetwork: true
containers:
- name: kubernetes-zookeeper
imagePullPolicy: Always
image: "kvaps/zookeeper"
resources:
requests:
memory: "4Gi"
cpu: "2"
command:
- sh
- -c
- "start-zookeeper \
--servers=3 \
--server_1=node1 \
--server_2=node2 \
--server_3=node3 \
--data_dir=/var/lib/zookeeper/data \
--data_log_dir=/var/lib/zookeeper/data/log \
--conf_dir=/opt/zookeeper/conf \
--client_port=2181 \
--election_port=3888 \
--server_port=2888 \
--tick_time=2000 \
--init_limit=10 \
--sync_limit=5 \
--heap=3G \
--max_client_cnxns=60 \
--snap_retain_count=3 \
--purge_interval=12 \
--max_session_timeout=40000 \
--min_session_timeout=4000 \
--log_level=INFO"
readinessProbe:
exec:
command:
- sh
- -c
- "zookeeper-ready 2181"
initialDelaySeconds: 10
timeoutSeconds: 5
livenessProbe:
exec:
command:
- sh
- -c
- "zookeeper-ready 2181"
initialDelaySeconds: 10
timeoutSeconds: 5
volumeMounts:
- name: datadir
mountPath: /var/lib/zookeeper
#securityContext:
# runAsUser: 1000
# fsGroup: 1000
volumes:
- name: datadir
#emptyDir: {}
hostPath:
path: "/data/local/data/zookeeper"