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 | d7921b7 | 2018-02-20 16:55:12 -0500 | [diff] [blame] | 14 | apiVersion: v1 |
| 15 | kind: Service |
| 16 | metadata: |
| 17 | name: zoo |
| 18 | namespace: voltha |
| 19 | spec: |
| 20 | clusterIP: None |
| 21 | selector: |
| 22 | app: zookeeper |
| 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: apps/v1beta1 |
| 35 | kind: StatefulSet |
| 36 | metadata: |
| 37 | name: zookeeper |
| 38 | namespace: voltha |
| 39 | spec: |
| 40 | serviceName: zoo |
| 41 | replicas: 1 |
| 42 | selector: |
| 43 | matchLabels: |
| 44 | app: zookeeper |
| 45 | template: |
| 46 | metadata: |
| 47 | labels: |
| 48 | app: zookeeper |
| 49 | annotations: |
Stephane Barbarie | 2d4e07f | 2018-03-26 16:46:45 -0400 | [diff] [blame] | 50 | cni: "calico" |
Richard Jankowski | d7921b7 | 2018-02-20 16:55:12 -0500 | [diff] [blame] | 51 | spec: |
| 52 | containers: |
| 53 | - name: zoo |
| 54 | image: zookeeper:3.4.11 |
| 55 | ports: |
| 56 | - containerPort: 2181 |
| 57 | - containerPort: 2888 |
| 58 | - containerPort: 3888 |
| 59 | env: |
| 60 | - name: NAMESPACE |
| 61 | valueFrom: |
| 62 | fieldRef: |
| 63 | fieldPath: metadata.namespace |
| 64 | - name: ZOO_MY_ID |
| 65 | value: "1" |
| 66 | # - name: ZOO_SERVERS |
| 67 | # value: > |
| 68 | # server.1=zookeeper1-0.zoo1.$(NAMESPACE).svc.cluster.local:2888:3888 |
| 69 | |