Gerrit ID: 5665 - Deploys OSM on Kubernetes.
[osm/devops.git] / installers / docker / osm_pods / zookeeper.yaml
1 # Copyright 2019 TATA ELXSI
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
12 # implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License
15
16 apiVersion: v1
17 kind: Service
18 metadata:
19   name: zookeeper
20 spec:
21   clusterIP: None
22   ports:
23   - port: 2181
24     protocol: TCP
25     targetPort: 2181
26   selector:
27     app: zookeeper
28   type: ClusterIP
29 ---
30 apiVersion: apps/v1
31 kind: StatefulSet
32 metadata:
33   name: zookeeper
34   labels:
35     app: zookeeper
36 spec:
37   replicas: 1
38   serviceName: zookeeper
39   selector:
40     matchLabels:
41       app: zookeeper
42   template:
43     metadata:
44       labels:
45         app: zookeeper
46     spec:
47       containers:
48       - name: zookeeper
49         image: wurstmeister/zookeeper:latest
50         ports:
51         - containerPort: 2181
52           protocol: TCP