blob: ffd3e12b2713874841bfb434502be37ce668c7de [file] [log] [blame]
Zack Williams41513bf2018-07-07 20:08:35 -07001# 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 Jankowskid7921b72018-02-20 16:55:12 -050014apiVersion: v1
15kind: Service
16metadata:
17 name: zoo
18 namespace: voltha
19spec:
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---
34apiVersion: apps/v1beta1
35kind: StatefulSet
36metadata:
37 name: zookeeper
38 namespace: voltha
39spec:
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 Barbarie2d4e07f2018-03-26 16:46:45 -040050 cni: "calico"
Richard Jankowskid7921b72018-02-20 16:55:12 -050051 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