Richard Jankowski | d7921b7 | 2018-02-20 16:55:12 -0500 | [diff] [blame] | 1 | apiVersion: v1 |
2 | kind: Service | ||||
3 | metadata: | ||||
4 | name: zoo | ||||
5 | namespace: voltha | ||||
6 | spec: | ||||
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 | --- | ||||
21 | apiVersion: apps/v1beta1 | ||||
22 | kind: StatefulSet | ||||
23 | metadata: | ||||
24 | name: zookeeper | ||||
25 | namespace: voltha | ||||
26 | spec: | ||||
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 Barbarie | 2d4e07f | 2018-03-26 16:46:45 -0400 | [diff] [blame] | 37 | cni: "calico" |
Richard Jankowski | d7921b7 | 2018-02-20 16:55:12 -0500 | [diff] [blame] | 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 |