blob: 67a908373f2c041c9b986dc3860dd4a982accdee [file] [log] [blame]
# Copyright 2019-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---
apiVersion: v1
kind: Service
metadata:
name: voltha-api
serviceAccountName: {{ .Values.serviceaccount }}
spec:
serviceAccountName: {{ .Values.serviceaccount }}
ports:
- name: grpc
port: 55555
targetPort: 55555
selector:
app: voltha-api-server
---
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: voltha-api-server
serviceAccountName: {{ .Values.serviceaccount }}
spec:
replicas: {{ .Values.replicas.afrouter }}
template:
metadata:
labels:
app: voltha-api-server
annotations:
cni: "calico"
spec:
serviceAccountName: {{ .Values.serviceaccount }}
containers:
- name: arouter
image: {{ tpl .Values.images.afrouter.registry . }}{{ tpl .Values.images.afrouter.repository . }}:{{ tpl .Values.images.afrouter.tag . }}
imagePullPolicy: {{ tpl .Values.images.afrouter.pullPolicy . }}
volumeMounts:
- name: config-volume
mountPath: /app/config
ports:
- containerPort: 55555
env:
- name: POD_NAMESPACE
value: {{ .Release.Namespace }}
command: ["/app/afrouter"]
args: ["-config", "/app/config/arouter.voltha.json"]
- name: arouterd
env:
- name: POD_NAMESPACE
value: {{ .Release.Namespace }}
- name: NUM_RW_PODS
value: {{ mul .Values.replicas.rw_core 2 | quote}}
- name: NUM_RO_PODS
value: {{ quote .Values.replicas.ro_core }}
image: {{ tpl .Values.images.afrouterd.registry . }}{{ tpl .Values.images.afrouterd.repository . }}:{{ tpl .Values.images.afrouterd.tag . }}
imagePullPolicy: {{ tpl .Values.images.afrouterd.pullPolicy . }}
command: ["/app/arouterd"]
restartPolicy: Always
volumes:
- name: config-volume
configMap:
name: afrouter-config