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 |
Stephane Barbarie | bcea2f4 | 2018-03-02 18:46:32 -0500 | [diff] [blame] | 69 | updateStrategy: |
| 70 | type: RollingUpdate |
Richard Jankowski | e585808 | 2018-01-15 18:25:38 -0500 | [diff] [blame] | 71 | selector: |
| 72 | matchLabels: |
| 73 | app: zookeeper-1 |
| 74 | template: |
| 75 | metadata: |
| 76 | labels: |
| 77 | app: zookeeper-1 |
Stephane Barbarie | 5e8d9e4 | 2018-02-07 16:15:05 -0500 | [diff] [blame] | 78 | annotations: |
Stephane Barbarie | 2d4e07f | 2018-03-26 16:46:45 -0400 | [diff] [blame] | 79 | cni: "calico" |
Richard Jankowski | e585808 | 2018-01-15 18:25:38 -0500 | [diff] [blame] | 80 | spec: |
Richard Jankowski | 4ea2663 | 2018-05-14 17:45:38 -0400 | [diff] [blame] | 81 | terminationGracePeriodSeconds: 0 |
Richard Jankowski | e585808 | 2018-01-15 18:25:38 -0500 | [diff] [blame] | 82 | containers: |
| 83 | - name: zoo1 |
| 84 | image: zookeeper:3.4.11 |
| 85 | ports: |
| 86 | - containerPort: 2181 |
| 87 | - containerPort: 2888 |
| 88 | - containerPort: 3888 |
| 89 | env: |
| 90 | - name: NAMESPACE |
| 91 | valueFrom: |
| 92 | fieldRef: |
| 93 | fieldPath: metadata.namespace |
| 94 | - name: ZOO_MY_ID |
| 95 | value: "1" |
| 96 | - name: ZOO_SERVERS |
| 97 | value: > |
| 98 | server.1=zookeeper1-0.zoo1.$(NAMESPACE).svc.cluster.local:2888:3888 |
| 99 | server.2=zookeeper2-0.zoo2.$(NAMESPACE).svc.cluster.local:2888:3888 |
| 100 | server.3=zookeeper3-0.zoo3.$(NAMESPACE).svc.cluster.local:2888:3888 |
| 101 | --- |
| 102 | apiVersion: apps/v1beta1 |
| 103 | kind: StatefulSet |
| 104 | metadata: |
| 105 | name: zookeeper2 |
Richard Jankowski | d445438 | 2018-02-08 16:21:43 -0500 | [diff] [blame] | 106 | namespace: voltha |
Richard Jankowski | e585808 | 2018-01-15 18:25:38 -0500 | [diff] [blame] | 107 | spec: |
| 108 | serviceName: zoo2 |
| 109 | replicas: 1 |
Stephane Barbarie | bcea2f4 | 2018-03-02 18:46:32 -0500 | [diff] [blame] | 110 | updateStrategy: |
| 111 | type: RollingUpdate |
Richard Jankowski | e585808 | 2018-01-15 18:25:38 -0500 | [diff] [blame] | 112 | selector: |
| 113 | matchLabels: |
| 114 | app: zookeeper-2 |
| 115 | template: |
| 116 | metadata: |
| 117 | labels: |
| 118 | app: zookeeper-2 |
Stephane Barbarie | 5e8d9e4 | 2018-02-07 16:15:05 -0500 | [diff] [blame] | 119 | annotations: |
Stephane Barbarie | 2d4e07f | 2018-03-26 16:46:45 -0400 | [diff] [blame] | 120 | cni: "calico" |
Richard Jankowski | e585808 | 2018-01-15 18:25:38 -0500 | [diff] [blame] | 121 | spec: |
Richard Jankowski | 4ea2663 | 2018-05-14 17:45:38 -0400 | [diff] [blame] | 122 | terminationGracePeriodSeconds: 0 |
Richard Jankowski | e585808 | 2018-01-15 18:25:38 -0500 | [diff] [blame] | 123 | containers: |
| 124 | - name: zoo2 |
| 125 | image: zookeeper:3.4.11 |
| 126 | ports: |
| 127 | - containerPort: 2181 |
| 128 | - containerPort: 2888 |
| 129 | - containerPort: 3888 |
| 130 | env: |
| 131 | - name: NAMESPACE |
| 132 | valueFrom: |
| 133 | fieldRef: |
| 134 | fieldPath: metadata.namespace |
| 135 | - name: ZOO_MY_ID |
| 136 | value: "2" |
| 137 | - name: ZOO_SERVERS |
| 138 | value: > |
| 139 | server.1=zookeeper1-0.zoo1.$(NAMESPACE).svc.cluster.local:2888:3888 |
| 140 | server.2=zookeeper2-0.zoo2.$(NAMESPACE).svc.cluster.local:2888:3888 |
| 141 | server.3=zookeeper3-0.zoo3.$(NAMESPACE).svc.cluster.local:2888:3888 |
| 142 | --- |
| 143 | apiVersion: apps/v1beta1 |
| 144 | kind: StatefulSet |
| 145 | metadata: |
| 146 | name: zookeeper3 |
Richard Jankowski | d445438 | 2018-02-08 16:21:43 -0500 | [diff] [blame] | 147 | namespace: voltha |
Richard Jankowski | e585808 | 2018-01-15 18:25:38 -0500 | [diff] [blame] | 148 | spec: |
| 149 | serviceName: zoo3 |
| 150 | replicas: 1 |
Stephane Barbarie | bcea2f4 | 2018-03-02 18:46:32 -0500 | [diff] [blame] | 151 | updateStrategy: |
| 152 | type: RollingUpdate |
Richard Jankowski | e585808 | 2018-01-15 18:25:38 -0500 | [diff] [blame] | 153 | selector: |
| 154 | matchLabels: |
| 155 | app: zookeeper-3 |
| 156 | template: |
| 157 | metadata: |
| 158 | labels: |
| 159 | app: zookeeper-3 |
Stephane Barbarie | 5e8d9e4 | 2018-02-07 16:15:05 -0500 | [diff] [blame] | 160 | annotations: |
Stephane Barbarie | 2d4e07f | 2018-03-26 16:46:45 -0400 | [diff] [blame] | 161 | cni: "calico" |
Richard Jankowski | e585808 | 2018-01-15 18:25:38 -0500 | [diff] [blame] | 162 | spec: |
Richard Jankowski | 4ea2663 | 2018-05-14 17:45:38 -0400 | [diff] [blame] | 163 | terminationGracePeriodSeconds: 0 |
Richard Jankowski | e585808 | 2018-01-15 18:25:38 -0500 | [diff] [blame] | 164 | containers: |
| 165 | - name: zoo3 |
| 166 | image: zookeeper:3.4.11 |
| 167 | ports: |
| 168 | - containerPort: 2181 |
| 169 | - containerPort: 2888 |
| 170 | - containerPort: 3888 |
| 171 | env: |
| 172 | - name: NAMESPACE |
| 173 | valueFrom: |
| 174 | fieldRef: |
| 175 | fieldPath: metadata.namespace |
| 176 | - name: ZOO_MY_ID |
| 177 | value: "3" |
| 178 | - name: ZOO_SERVERS |
| 179 | value: > |
| 180 | server.1=zookeeper1-0.zoo1.$(NAMESPACE).svc.cluster.local:2888:3888 |
| 181 | server.2=zookeeper2-0.zoo2.$(NAMESPACE).svc.cluster.local:2888:3888 |
| 182 | server.3=zookeeper3-0.zoo3.$(NAMESPACE).svc.cluster.local:2888:3888 |