blob: d28aa39ab8e55fef4e9584ee93bdc3edfac30f83 [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:
Stephane Barbarie2d4e07f2018-03-26 16:46:45 -040037 cni: "calico"
Richard Jankowskid7921b72018-02-20 16:55:12 -050038 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