blob: 5ea1d42e892171e789ab7cc750fe04e2465c23f2 [file] [log] [blame]
Zack Williamsc8c32e02018-11-04 14:43:21 -07001---
Gopinath Tagete2dff4d2018-03-15 17:22:28 -07002# Copyright 2017-present Open Networking Foundation
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16apiVersion: v1
17kind: Service
18metadata:
19 name: vcore
20 namespace: {{ .Values.global.namespace }}
21 serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
22 labels:
23 name: vcore
24spec:
25 clusterIP: None
26 ports:
27 - name: rest
28 port: 8880
29 targetPort: 8880
30 - name: mystery
31 port: 18880
32 targetPort: 18880
33 - name: grpc
34 port: 50556
35 targetPort: 50556
36 selector:
37 app: vcore
38---
Gopinath Taget7f357cf2018-07-03 12:34:38 -070039apiVersion: apps/v1
40kind: StatefulSet
Gopinath Tagete2dff4d2018-03-15 17:22:28 -070041metadata:
42 name: vcore
43 namespace: {{ .Values.global.namespace }}
44 serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
45spec:
Gopinath Taget7f357cf2018-07-03 12:34:38 -070046 serviceName: vcore
Gopinath Tagetfff89342018-04-16 12:12:17 -070047 replicas: {{ .Values.replicas.vcore }}
Gopinath Taget7f357cf2018-07-03 12:34:38 -070048 updateStrategy:
49 type: RollingUpdate
50 selector:
51 matchLabels:
52 app: vcore
Gopinath Tagete2dff4d2018-03-15 17:22:28 -070053 template:
54 metadata:
55 labels:
56 app: vcore
57 annotations:
Gopinath Taget7f357cf2018-07-03 12:34:38 -070058 cni: "calico"
Gopinath Tagete2dff4d2018-03-15 17:22:28 -070059 spec:
Gopinath Taget7f357cf2018-07-03 12:34:38 -070060 terminationGracePeriodSeconds: 0
Gopinath Tagete2dff4d2018-03-15 17:22:28 -070061 serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
62 containers:
63 - name: voltha
Zack Williams2749ae52018-09-28 09:43:43 -070064 image: {{ .Values.global.registry }}{{ .Values.images.vcore.repository }}:{{ tpl .Values.images.vcore.tag . }}
65 imagePullPolicy: {{ .Values.images.vcore.pullPolicy }}
Gopinath Tagete2dff4d2018-03-15 17:22:28 -070066 env:
67 - name: NAMESPACE
68 valueFrom:
69 fieldRef:
70 fieldPath: metadata.namespace
71 args:
Gopinath Taget5e49fe32018-06-25 17:02:05 -070072{{ include "voltha-vcore.cmd" . | indent 12 }}
Gopinath Tagete2dff4d2018-03-15 17:22:28 -070073 ports:
74 - containerPort: 8880
75 name: rest-port
76 - containerPort: 18880
77 name: mystery-port
78 - containerPort: 50556
79 name: grpc-port
Zack Williamsc8c32e02018-11-04 14:43:21 -070080 volumeMounts:
81 - name: vcore-logconfig-vol
82 mountPath: /voltha/voltha/logconfig.yml
83 subPath: logconfig.yml
84 volumes:
85 - name: vcore-logconfig-vol
86 configMap:
87 name: vcore-logconfig
88 items:
89 - key: logconfig
90 path: logconfig.yml