blob: c35e756f32afde7914a2bcd4428747348d712818 [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 Jankowski54f7a862017-12-20 13:31:10 -050014apiVersion: v1
15kind: Service
16metadata:
17 name: vcore
Richard Jankowskid4454382018-02-08 16:21:43 -050018 namespace: voltha
Richard Jankowski54f7a862017-12-20 13:31:10 -050019 labels:
20 name: vcore
21spec:
22 clusterIP: None
23 ports:
24 - name: rest
25 port: 8880
26 targetPort: 8880
27 - name: mystery
28 port: 18880
29 targetPort: 18880
30 - name: grpc
31 port: 50556
32 targetPort: 50556
33 selector:
34 app: vcore
35---
Richard Jankowski4ea26632018-05-14 17:45:38 -040036apiVersion: apps/v1
37kind: StatefulSet
Richard Jankowski54f7a862017-12-20 13:31:10 -050038metadata:
39 name: vcore
Richard Jankowskid4454382018-02-08 16:21:43 -050040 namespace: voltha
Richard Jankowski54f7a862017-12-20 13:31:10 -050041spec:
Richard Jankowski4ea26632018-05-14 17:45:38 -040042 serviceName: vcore
Richard Jankowski54f7a862017-12-20 13:31:10 -050043 replicas: 3
Richard Jankowski4ea26632018-05-14 17:45:38 -040044 updateStrategy:
45 type: RollingUpdate
46 selector:
47 matchLabels:
48 app: vcore
Richard Jankowski54f7a862017-12-20 13:31:10 -050049 template:
50 metadata:
51 labels:
52 app: vcore
Stephane Barbarie5e8d9e42018-02-07 16:15:05 -050053 annotations:
Stephane Barbarie2d4e07f2018-03-26 16:46:45 -040054 cni: "calico"
Richard Jankowski54f7a862017-12-20 13:31:10 -050055 spec:
Richard Jankowski4ea26632018-05-14 17:45:38 -040056 terminationGracePeriodSeconds: 0
Richard Jankowski54f7a862017-12-20 13:31:10 -050057 containers:
58 - name: voltha
Richard Jankowskic3c291c2018-02-02 13:57:33 -050059 image: voltha-voltha
Richard Jankowski54f7a862017-12-20 13:31:10 -050060 env:
Richard Jankowski54f7a862017-12-20 13:31:10 -050061 - name: NAMESPACE
62 valueFrom:
63 fieldRef:
64 fieldPath: metadata.namespace
65 args:
66 - "voltha/voltha/main.py"
67 - "-v"
Richard Jankowskie5858082018-01-15 18:25:38 -050068 - "--etcd=etcd.$(NAMESPACE).svc.cluster.local:2379"
69 - "--kafka=kafka.$(NAMESPACE).svc.cluster.local"
Richard Jankowski54f7a862017-12-20 13:31:10 -050070 - "--rest-port=8880"
71 - "--grpc-port=50556"
72 - "--interface=eth1"
73 - "--backend=etcd"
Stephane Barbarie5e8d9e42018-02-07 16:15:05 -050074 - "--pon-subnet=10.38.0.0/12"
75 - "--ponsim-comm=grpc"
Richard Jankowski4ea26632018-05-14 17:45:38 -040076 - "--core-number-extractor=^.*-([0-9]+)_.*$"
Richard Jankowski54f7a862017-12-20 13:31:10 -050077 ports:
78 - containerPort: 8880
79 name: rest-port
80 - containerPort: 18880
81 name: mystery-port
82 - containerPort: 50556
83 name: grpc-port
84 imagePullPolicy: Never
85
86