blob: 67a908373f2c041c9b986dc3860dd4a982accdee [file] [log] [blame]
David Bainbridge2f9b76f2019-05-15 13:48:11 -07001# Copyright 2019-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.
14
15---
16apiVersion: v1
17kind: Service
18metadata:
19 name: voltha-api
20 serviceAccountName: {{ .Values.serviceaccount }}
21spec:
22 serviceAccountName: {{ .Values.serviceaccount }}
23 ports:
24 - name: grpc
25 port: 55555
26 targetPort: 55555
27 selector:
28 app: voltha-api-server
29
30---
31apiVersion: apps/v1beta1
32kind: Deployment
33metadata:
34 name: voltha-api-server
35 serviceAccountName: {{ .Values.serviceaccount }}
36spec:
37 replicas: {{ .Values.replicas.afrouter }}
38 template:
39 metadata:
40 labels:
41 app: voltha-api-server
42 annotations:
43 cni: "calico"
44 spec:
45 serviceAccountName: {{ .Values.serviceaccount }}
46 containers:
47 - name: arouter
David Bainbridgecd30e542019-05-31 20:52:56 +000048 image: {{ tpl .Values.images.afrouter.registry . }}{{ tpl .Values.images.afrouter.repository . }}:{{ tpl .Values.images.afrouter.tag . }}
49 imagePullPolicy: {{ tpl .Values.images.afrouter.pullPolicy . }}
David Bainbridge2f9b76f2019-05-15 13:48:11 -070050 volumeMounts:
51 - name: config-volume
52 mountPath: /app/config
53 ports:
54 - containerPort: 55555
55 env:
56 - name: POD_NAMESPACE
57 value: {{ .Release.Namespace }}
58 command: ["/app/afrouter"]
59 args: ["-config", "/app/config/arouter.voltha.json"]
60 - name: arouterd
61 env:
62 - name: POD_NAMESPACE
63 value: {{ .Release.Namespace }}
Kent Hagerman32dddbb2019-06-18 17:29:36 -040064 - name: NUM_RW_PODS
65 value: {{ mul .Values.replicas.rw_core 2 | quote}}
66 - name: NUM_RO_PODS
67 value: {{ quote .Values.replicas.ro_core }}
David Bainbridgecd30e542019-05-31 20:52:56 +000068 image: {{ tpl .Values.images.afrouterd.registry . }}{{ tpl .Values.images.afrouterd.repository . }}:{{ tpl .Values.images.afrouterd.tag . }}
69 imagePullPolicy: {{ tpl .Values.images.afrouterd.pullPolicy . }}
David Bainbridge2f9b76f2019-05-15 13:48:11 -070070 command: ["/app/arouterd"]
71 restartPolicy: Always
72 volumes:
73 - name: config-volume
74 configMap:
75 name: afrouter-config