Richard Jankowski | e585808 | 2018-01-15 18:25:38 -0500 | [diff] [blame] | 1 | apiVersion: v1 |
| 2 | kind: Service |
| 3 | metadata: |
| 4 | name: zoo1 |
Richard Jankowski | d445438 | 2018-02-08 16:21:43 -0500 | [diff] [blame] | 5 | namespace: voltha |
Richard Jankowski | e585808 | 2018-01-15 18:25:38 -0500 | [diff] [blame] | 6 | spec: |
| 7 | clusterIP: None |
| 8 | selector: |
| 9 | app: zookeeper-1 |
| 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: v1 |
| 22 | kind: Service |
| 23 | metadata: |
| 24 | name: zoo2 |
Richard Jankowski | d445438 | 2018-02-08 16:21:43 -0500 | [diff] [blame] | 25 | namespace: voltha |
Richard Jankowski | e585808 | 2018-01-15 18:25:38 -0500 | [diff] [blame] | 26 | spec: |
| 27 | clusterIP: None |
| 28 | selector: |
| 29 | app: zookeeper-2 |
| 30 | ports: |
| 31 | - name: client |
| 32 | port: 2181 |
| 33 | targetPort: 2181 |
| 34 | - name: follower |
| 35 | port: 2888 |
| 36 | targetPort: 2888 |
| 37 | - name: leader |
| 38 | port: 3888 |
| 39 | targetPort: 3888 |
| 40 | --- |
| 41 | apiVersion: v1 |
| 42 | kind: Service |
| 43 | metadata: |
| 44 | name: zoo3 |
Richard Jankowski | d445438 | 2018-02-08 16:21:43 -0500 | [diff] [blame] | 45 | namespace: voltha |
Richard Jankowski | e585808 | 2018-01-15 18:25:38 -0500 | [diff] [blame] | 46 | spec: |
| 47 | clusterIP: None |
| 48 | selector: |
| 49 | app: zookeeper-3 |
| 50 | ports: |
| 51 | - name: client |
| 52 | port: 2181 |
| 53 | targetPort: 2181 |
| 54 | - name: follower |
| 55 | port: 2888 |
| 56 | targetPort: 2888 |
| 57 | - name: leader |
| 58 | port: 3888 |
| 59 | targetPort: 3888 |
| 60 | --- |
| 61 | apiVersion: apps/v1beta1 |
| 62 | kind: StatefulSet |
| 63 | metadata: |
| 64 | name: zookeeper1 |
Richard Jankowski | d445438 | 2018-02-08 16:21:43 -0500 | [diff] [blame] | 65 | namespace: voltha |
Richard Jankowski | e585808 | 2018-01-15 18:25:38 -0500 | [diff] [blame] | 66 | spec: |
| 67 | serviceName: zoo1 |
| 68 | replicas: 1 |
| 69 | selector: |
| 70 | matchLabels: |
| 71 | app: zookeeper-1 |
| 72 | template: |
| 73 | metadata: |
| 74 | labels: |
| 75 | app: zookeeper-1 |
Stephane Barbarie | 5e8d9e4 | 2018-02-07 16:15:05 -0500 | [diff] [blame] | 76 | annotations: |
| 77 | cni: "weave" |
Richard Jankowski | e585808 | 2018-01-15 18:25:38 -0500 | [diff] [blame] | 78 | spec: |
| 79 | containers: |
| 80 | - name: zoo1 |
| 81 | image: zookeeper:3.4.11 |
| 82 | ports: |
| 83 | - containerPort: 2181 |
| 84 | - containerPort: 2888 |
| 85 | - containerPort: 3888 |
| 86 | env: |
| 87 | - name: NAMESPACE |
| 88 | valueFrom: |
| 89 | fieldRef: |
| 90 | fieldPath: metadata.namespace |
| 91 | - name: ZOO_MY_ID |
| 92 | value: "1" |
| 93 | - name: ZOO_SERVERS |
| 94 | value: > |
| 95 | server.1=zookeeper1-0.zoo1.$(NAMESPACE).svc.cluster.local:2888:3888 |
| 96 | server.2=zookeeper2-0.zoo2.$(NAMESPACE).svc.cluster.local:2888:3888 |
| 97 | server.3=zookeeper3-0.zoo3.$(NAMESPACE).svc.cluster.local:2888:3888 |
| 98 | --- |
| 99 | apiVersion: apps/v1beta1 |
| 100 | kind: StatefulSet |
| 101 | metadata: |
| 102 | name: zookeeper2 |
Richard Jankowski | d445438 | 2018-02-08 16:21:43 -0500 | [diff] [blame] | 103 | namespace: voltha |
Richard Jankowski | e585808 | 2018-01-15 18:25:38 -0500 | [diff] [blame] | 104 | spec: |
| 105 | serviceName: zoo2 |
| 106 | replicas: 1 |
| 107 | selector: |
| 108 | matchLabels: |
| 109 | app: zookeeper-2 |
| 110 | template: |
| 111 | metadata: |
| 112 | labels: |
| 113 | app: zookeeper-2 |
Stephane Barbarie | 5e8d9e4 | 2018-02-07 16:15:05 -0500 | [diff] [blame] | 114 | annotations: |
| 115 | cni: "weave" |
Richard Jankowski | e585808 | 2018-01-15 18:25:38 -0500 | [diff] [blame] | 116 | spec: |
| 117 | containers: |
| 118 | - name: zoo2 |
| 119 | image: zookeeper:3.4.11 |
| 120 | ports: |
| 121 | - containerPort: 2181 |
| 122 | - containerPort: 2888 |
| 123 | - containerPort: 3888 |
| 124 | env: |
| 125 | - name: NAMESPACE |
| 126 | valueFrom: |
| 127 | fieldRef: |
| 128 | fieldPath: metadata.namespace |
| 129 | - name: ZOO_MY_ID |
| 130 | value: "2" |
| 131 | - name: ZOO_SERVERS |
| 132 | value: > |
| 133 | server.1=zookeeper1-0.zoo1.$(NAMESPACE).svc.cluster.local:2888:3888 |
| 134 | server.2=zookeeper2-0.zoo2.$(NAMESPACE).svc.cluster.local:2888:3888 |
| 135 | server.3=zookeeper3-0.zoo3.$(NAMESPACE).svc.cluster.local:2888:3888 |
| 136 | --- |
| 137 | apiVersion: apps/v1beta1 |
| 138 | kind: StatefulSet |
| 139 | metadata: |
| 140 | name: zookeeper3 |
Richard Jankowski | d445438 | 2018-02-08 16:21:43 -0500 | [diff] [blame] | 141 | namespace: voltha |
Richard Jankowski | e585808 | 2018-01-15 18:25:38 -0500 | [diff] [blame] | 142 | spec: |
| 143 | serviceName: zoo3 |
| 144 | replicas: 1 |
| 145 | selector: |
| 146 | matchLabels: |
| 147 | app: zookeeper-3 |
| 148 | template: |
| 149 | metadata: |
| 150 | labels: |
| 151 | app: zookeeper-3 |
Stephane Barbarie | 5e8d9e4 | 2018-02-07 16:15:05 -0500 | [diff] [blame] | 152 | annotations: |
| 153 | cni: "weave" |
Richard Jankowski | e585808 | 2018-01-15 18:25:38 -0500 | [diff] [blame] | 154 | spec: |
| 155 | containers: |
| 156 | - name: zoo3 |
| 157 | image: zookeeper:3.4.11 |
| 158 | ports: |
| 159 | - containerPort: 2181 |
| 160 | - containerPort: 2888 |
| 161 | - containerPort: 3888 |
| 162 | env: |
| 163 | - name: NAMESPACE |
| 164 | valueFrom: |
| 165 | fieldRef: |
| 166 | fieldPath: metadata.namespace |
| 167 | - name: ZOO_MY_ID |
| 168 | value: "3" |
| 169 | - name: ZOO_SERVERS |
| 170 | value: > |
| 171 | server.1=zookeeper1-0.zoo1.$(NAMESPACE).svc.cluster.local:2888:3888 |
| 172 | server.2=zookeeper2-0.zoo2.$(NAMESPACE).svc.cluster.local:2888:3888 |
| 173 | server.3=zookeeper3-0.zoo3.$(NAMESPACE).svc.cluster.local:2888:3888 |