blob: 9ced14ab95f6c54cdeee6e17a69dffbe68b8501e [file] [log] [blame]
Richard Jankowskid7921b72018-02-20 16:55:12 -05001apiVersion: v1
2kind: Service
3metadata:
4 name: zoo
5 namespace: voltha
6spec:
7 clusterIP: None
8 selector:
9 app: zookeeper
10 ports:
11 - name: client
12 port: 2181
13 targetPort: 2181
14 - name: follower
15 port: 2888
16 targetPort: 2888
17 - name: leader
18 port: 3888
19 targetPort: 3888
20---
21apiVersion: apps/v1beta1
22kind: StatefulSet
23metadata:
24 name: zookeeper
25 namespace: voltha
26spec:
27 serviceName: zoo
28 replicas: 1
29 selector:
30 matchLabels:
31 app: zookeeper
32 template:
33 metadata:
34 labels:
35 app: zookeeper
36 annotations:
37 cni: "weave"
38 spec:
39 containers:
40 - name: zoo
41 image: zookeeper:3.4.11
42 ports:
43 - containerPort: 2181
44 - containerPort: 2888
45 - containerPort: 3888
46 env:
47 - name: NAMESPACE
48 valueFrom:
49 fieldRef:
50 fieldPath: metadata.namespace
51 - name: ZOO_MY_ID
52 value: "1"
53# - name: ZOO_SERVERS
54# value: >
55# server.1=zookeeper1-0.zoo1.$(NAMESPACE).svc.cluster.local:2888:3888
56