-
Notifications
You must be signed in to change notification settings - Fork 20
/
zk.yaml
80 lines (80 loc) · 1.6 KB
/
zk.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
apiVersion: v1
kind: Service
metadata:
name: zk
labels:
zk-name: zk
component: zk
annotations:
service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
spec:
ports:
- port: 2181
name: zkclient
- port: 2888
name: zkserver
- port: 3888
name: zkleader
clusterIP: None
selector:
zk-name: zk
component: zk
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: zk
labels:
zk-name: zk
component: zk
spec:
serviceName: zk
selector:
matchLabels:
zk-name: zk
component: zk
replicas: 1
template:
metadata:
labels:
zk-name: zk
component: zk
spec:
securityContext:
runAsUser: 1001
fsGroup: 1001
containers:
- name: zk
imagePullPolicy: IfNotPresent
image: engapa/zookeeper:3.4.14
resources:
requests:
memory: 512M
cpu: 300m
limits:
memory: 512M
cpu: 300m
ports:
- containerPort: 2181
name: zkclient
- containerPort: 2888
name: zkserver
- containerPort: 3888
name: zkleader
env:
- name: ZOO_REPLICAS
value: "1"
- name: JAVA_ZK_JVMFLAG
value: "\"-Xmx512M -Xms512M\""
readinessProbe:
exec:
command:
- zk_status.sh
initialDelaySeconds: 20
timeoutSeconds: 10
livenessProbe:
exec:
command:
- zk_status.sh
initialDelaySeconds: 20
timeoutSeconds: 10