Zack Williams | 41513bf | 2018-07-07 20:08:35 -0700 | [diff] [blame] | 1 | # Copyright 2017-present Open Networking Foundation |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
Richard Jankowski | e585808 | 2018-01-15 18:25:38 -0500 | [diff] [blame] | 14 | apiVersion: v1 |
| 15 | kind: Service |
| 16 | metadata: |
| 17 | name: zoo1 |
Richard Jankowski | d445438 | 2018-02-08 16:21:43 -0500 | [diff] [blame] | 18 | namespace: voltha |
Richard Jankowski | e585808 | 2018-01-15 18:25:38 -0500 | [diff] [blame] | 19 | spec: |
| 20 | clusterIP: None |
| 21 | selector: |
| 22 | app: zookeeper-1 |
| 23 | ports: |
| 24 | - name: client |
| 25 | port: 2181 |
| 26 | targetPort: 2181 |
| 27 | - name: follower |
| 28 | port: 2888 |
| 29 | targetPort: 2888 |
| 30 | - name: leader |
| 31 | port: 3888 |
| 32 | targetPort: 3888 |
| 33 | --- |
| 34 | apiVersion: v1 |
| 35 | kind: Service |
| 36 | metadata: |
| 37 | name: zoo2 |
Richard Jankowski | d445438 | 2018-02-08 16:21:43 -0500 | [diff] [blame] | 38 | namespace: voltha |
Richard Jankowski | e585808 | 2018-01-15 18:25:38 -0500 | [diff] [blame] | 39 | spec: |
| 40 | clusterIP: None |
| 41 | selector: |
| 42 | app: zookeeper-2 |
| 43 | ports: |
| 44 | - name: client |
| 45 | port: 2181 |
| 46 | targetPort: 2181 |
| 47 | - name: follower |
| 48 | port: 2888 |
| 49 | targetPort: 2888 |
| 50 | - name: leader |
| 51 | port: 3888 |
| 52 | targetPort: 3888 |
| 53 | --- |
| 54 | apiVersion: v1 |
| 55 | kind: Service |
| 56 | metadata: |
| 57 | name: zoo3 |
Richard Jankowski | d445438 | 2018-02-08 16:21:43 -0500 | [diff] [blame] | 58 | namespace: voltha |
Richard Jankowski | e585808 | 2018-01-15 18:25:38 -0500 | [diff] [blame] | 59 | spec: |
| 60 | clusterIP: None |
| 61 | selector: |
| 62 | app: zookeeper-3 |
| 63 | ports: |
| 64 | - name: client |
| 65 | port: 2181 |
| 66 | targetPort: 2181 |
| 67 | - name: follower |
| 68 | port: 2888 |
| 69 | targetPort: 2888 |
| 70 | - name: leader |
| 71 | port: 3888 |
| 72 | targetPort: 3888 |
| 73 | --- |
| 74 | apiVersion: apps/v1beta1 |
| 75 | kind: StatefulSet |
| 76 | metadata: |
| 77 | name: zookeeper1 |
Richard Jankowski | d445438 | 2018-02-08 16:21:43 -0500 | [diff] [blame] | 78 | namespace: voltha |
Richard Jankowski | e585808 | 2018-01-15 18:25:38 -0500 | [diff] [blame] | 79 | spec: |
| 80 | serviceName: zoo1 |
| 81 | replicas: 1 |
Stephane Barbarie | bcea2f4 | 2018-03-02 18:46:32 -0500 | [diff] [blame] | 82 | updateStrategy: |
| 83 | type: RollingUpdate |
Richard Jankowski | e585808 | 2018-01-15 18:25:38 -0500 | [diff] [blame] | 84 | selector: |
| 85 | matchLabels: |
| 86 | app: zookeeper-1 |
| 87 | template: |
| 88 | metadata: |
| 89 | labels: |
| 90 | app: zookeeper-1 |
Stephane Barbarie | 5e8d9e4 | 2018-02-07 16:15:05 -0500 | [diff] [blame] | 91 | annotations: |
Stephane Barbarie | 2d4e07f | 2018-03-26 16:46:45 -0400 | [diff] [blame] | 92 | cni: "calico" |
Richard Jankowski | e585808 | 2018-01-15 18:25:38 -0500 | [diff] [blame] | 93 | spec: |
Richard Jankowski | 4ea2663 | 2018-05-14 17:45:38 -0400 | [diff] [blame] | 94 | terminationGracePeriodSeconds: 0 |
Richard Jankowski | e585808 | 2018-01-15 18:25:38 -0500 | [diff] [blame] | 95 | containers: |
| 96 | - name: zoo1 |
| 97 | image: zookeeper:3.4.11 |
| 98 | ports: |
| 99 | - containerPort: 2181 |
| 100 | - containerPort: 2888 |
| 101 | - containerPort: 3888 |
| 102 | env: |
| 103 | - name: NAMESPACE |
| 104 | valueFrom: |
| 105 | fieldRef: |
| 106 | fieldPath: metadata.namespace |
| 107 | - name: ZOO_MY_ID |
| 108 | value: "1" |
| 109 | - name: ZOO_SERVERS |
| 110 | value: > |
| 111 | server.1=zookeeper1-0.zoo1.$(NAMESPACE).svc.cluster.local:2888:3888 |
| 112 | server.2=zookeeper2-0.zoo2.$(NAMESPACE).svc.cluster.local:2888:3888 |
| 113 | server.3=zookeeper3-0.zoo3.$(NAMESPACE).svc.cluster.local:2888:3888 |
| 114 | --- |
| 115 | apiVersion: apps/v1beta1 |
| 116 | kind: StatefulSet |
| 117 | metadata: |
| 118 | name: zookeeper2 |
Richard Jankowski | d445438 | 2018-02-08 16:21:43 -0500 | [diff] [blame] | 119 | namespace: voltha |
Richard Jankowski | e585808 | 2018-01-15 18:25:38 -0500 | [diff] [blame] | 120 | spec: |
| 121 | serviceName: zoo2 |
| 122 | replicas: 1 |
Stephane Barbarie | bcea2f4 | 2018-03-02 18:46:32 -0500 | [diff] [blame] | 123 | updateStrategy: |
| 124 | type: RollingUpdate |
Richard Jankowski | e585808 | 2018-01-15 18:25:38 -0500 | [diff] [blame] | 125 | selector: |
| 126 | matchLabels: |
| 127 | app: zookeeper-2 |
| 128 | template: |
| 129 | metadata: |
| 130 | labels: |
| 131 | app: zookeeper-2 |
Stephane Barbarie | 5e8d9e4 | 2018-02-07 16:15:05 -0500 | [diff] [blame] | 132 | annotations: |
Stephane Barbarie | 2d4e07f | 2018-03-26 16:46:45 -0400 | [diff] [blame] | 133 | cni: "calico" |
Richard Jankowski | e585808 | 2018-01-15 18:25:38 -0500 | [diff] [blame] | 134 | spec: |
Richard Jankowski | 4ea2663 | 2018-05-14 17:45:38 -0400 | [diff] [blame] | 135 | terminationGracePeriodSeconds: 0 |
Richard Jankowski | e585808 | 2018-01-15 18:25:38 -0500 | [diff] [blame] | 136 | containers: |
| 137 | - name: zoo2 |
| 138 | image: zookeeper:3.4.11 |
| 139 | ports: |
| 140 | - containerPort: 2181 |
| 141 | - containerPort: 2888 |
| 142 | - containerPort: 3888 |
| 143 | env: |
| 144 | - name: NAMESPACE |
| 145 | valueFrom: |
| 146 | fieldRef: |
| 147 | fieldPath: metadata.namespace |
| 148 | - name: ZOO_MY_ID |
| 149 | value: "2" |
| 150 | - name: ZOO_SERVERS |
| 151 | value: > |
| 152 | server.1=zookeeper1-0.zoo1.$(NAMESPACE).svc.cluster.local:2888:3888 |
| 153 | server.2=zookeeper2-0.zoo2.$(NAMESPACE).svc.cluster.local:2888:3888 |
| 154 | server.3=zookeeper3-0.zoo3.$(NAMESPACE).svc.cluster.local:2888:3888 |
| 155 | --- |
| 156 | apiVersion: apps/v1beta1 |
| 157 | kind: StatefulSet |
| 158 | metadata: |
| 159 | name: zookeeper3 |
Richard Jankowski | d445438 | 2018-02-08 16:21:43 -0500 | [diff] [blame] | 160 | namespace: voltha |
Richard Jankowski | e585808 | 2018-01-15 18:25:38 -0500 | [diff] [blame] | 161 | spec: |
| 162 | serviceName: zoo3 |
| 163 | replicas: 1 |
Stephane Barbarie | bcea2f4 | 2018-03-02 18:46:32 -0500 | [diff] [blame] | 164 | updateStrategy: |
| 165 | type: RollingUpdate |
Richard Jankowski | e585808 | 2018-01-15 18:25:38 -0500 | [diff] [blame] | 166 | selector: |
| 167 | matchLabels: |
| 168 | app: zookeeper-3 |
| 169 | template: |
| 170 | metadata: |
| 171 | labels: |
| 172 | app: zookeeper-3 |
Stephane Barbarie | 5e8d9e4 | 2018-02-07 16:15:05 -0500 | [diff] [blame] | 173 | annotations: |
Stephane Barbarie | 2d4e07f | 2018-03-26 16:46:45 -0400 | [diff] [blame] | 174 | cni: "calico" |
Richard Jankowski | e585808 | 2018-01-15 18:25:38 -0500 | [diff] [blame] | 175 | spec: |
Richard Jankowski | 4ea2663 | 2018-05-14 17:45:38 -0400 | [diff] [blame] | 176 | terminationGracePeriodSeconds: 0 |
Richard Jankowski | e585808 | 2018-01-15 18:25:38 -0500 | [diff] [blame] | 177 | containers: |
| 178 | - name: zoo3 |
| 179 | image: zookeeper:3.4.11 |
| 180 | ports: |
| 181 | - containerPort: 2181 |
| 182 | - containerPort: 2888 |
| 183 | - containerPort: 3888 |
| 184 | env: |
| 185 | - name: NAMESPACE |
| 186 | valueFrom: |
| 187 | fieldRef: |
| 188 | fieldPath: metadata.namespace |
| 189 | - name: ZOO_MY_ID |
| 190 | value: "3" |
| 191 | - name: ZOO_SERVERS |
| 192 | value: > |
| 193 | server.1=zookeeper1-0.zoo1.$(NAMESPACE).svc.cluster.local:2888:3888 |
| 194 | server.2=zookeeper2-0.zoo2.$(NAMESPACE).svc.cluster.local:2888:3888 |
| 195 | server.3=zookeeper3-0.zoo3.$(NAMESPACE).svc.cluster.local:2888:3888 |