blob: 2168d9a58c2e356912caca4675801c57377d9cad [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
David Bainbridge1f888042019-06-24 18:02:01 +000042 app.kubernetes.io/name: "api-server"
43 app.kubernetes.io/version: {{ quote .Chart.AppVersion }}
44 app.kubernetes.io/component: "api"
45 app.kubernetes.io/part-of: "voltha"
46 app.kubernetes.io/managed-by: {{ quote .Release.Service }}
47 helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
David Bainbridge2f9b76f2019-05-15 13:48:11 -070048 annotations:
49 cni: "calico"
50 spec:
51 serviceAccountName: {{ .Values.serviceaccount }}
52 containers:
53 - name: arouter
David Bainbridge5cb5d172019-07-24 02:30:19 +000054 image: {{ tpl .Values.images.afrouter.registry . }}{{ tpl .Values.images.afrouter.repository . }}:{{ tpl ( tpl .Values.images.afrouter.tag . ) . }}
David Bainbridgecd30e542019-05-31 20:52:56 +000055 imagePullPolicy: {{ tpl .Values.images.afrouter.pullPolicy . }}
David Bainbridge2f9b76f2019-05-15 13:48:11 -070056 volumeMounts:
57 - name: config-volume
58 mountPath: /app/config
59 ports:
60 - containerPort: 55555
61 env:
62 - name: POD_NAMESPACE
63 value: {{ .Release.Namespace }}
64 command: ["/app/afrouter"]
65 args: ["-config", "/app/config/arouter.voltha.json"]
66 - name: arouterd
67 env:
68 - name: POD_NAMESPACE
69 value: {{ .Release.Namespace }}
David Bainbridge5cb5d172019-07-24 02:30:19 +000070 image: {{ tpl .Values.images.afrouterd.registry . }}{{ tpl .Values.images.afrouterd.repository . }}:{{ tpl ( tpl .Values.images.afrouterd.tag . ) . }}
David Bainbridgecd30e542019-05-31 20:52:56 +000071 imagePullPolicy: {{ tpl .Values.images.afrouterd.pullPolicy . }}
David Bainbridge2f9b76f2019-05-15 13:48:11 -070072 command: ["/app/arouterd"]
73 restartPolicy: Always
74 volumes:
75 - name: config-volume
76 configMap:
77 name: afrouter-config