David Bainbridge | 2f9b76f | 2019-05-15 13:48:11 -0700 | [diff] [blame] | 1 | # 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 | --- |
| 16 | apiVersion: v1 |
| 17 | kind: Service |
| 18 | metadata: |
| 19 | name: voltha-api |
| 20 | serviceAccountName: {{ .Values.serviceaccount }} |
| 21 | spec: |
| 22 | serviceAccountName: {{ .Values.serviceaccount }} |
| 23 | ports: |
| 24 | - name: grpc |
| 25 | port: 55555 |
| 26 | targetPort: 55555 |
| 27 | selector: |
| 28 | app: voltha-api-server |
| 29 | |
| 30 | --- |
| 31 | apiVersion: apps/v1beta1 |
| 32 | kind: Deployment |
| 33 | metadata: |
| 34 | name: voltha-api-server |
| 35 | serviceAccountName: {{ .Values.serviceaccount }} |
| 36 | spec: |
| 37 | replicas: {{ .Values.replicas.afrouter }} |
| 38 | template: |
| 39 | metadata: |
| 40 | labels: |
| 41 | app: voltha-api-server |
David Bainbridge | 1f88804 | 2019-06-24 18:02:01 +0000 | [diff] [blame] | 42 | 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 Bainbridge | 2f9b76f | 2019-05-15 13:48:11 -0700 | [diff] [blame] | 48 | annotations: |
| 49 | cni: "calico" |
| 50 | spec: |
| 51 | serviceAccountName: {{ .Values.serviceaccount }} |
| 52 | containers: |
| 53 | - name: arouter |
David Bainbridge | 5cb5d17 | 2019-07-24 02:30:19 +0000 | [diff] [blame] | 54 | image: {{ tpl .Values.images.afrouter.registry . }}{{ tpl .Values.images.afrouter.repository . }}:{{ tpl ( tpl .Values.images.afrouter.tag . ) . }} |
David Bainbridge | cd30e54 | 2019-05-31 20:52:56 +0000 | [diff] [blame] | 55 | imagePullPolicy: {{ tpl .Values.images.afrouter.pullPolicy . }} |
David Bainbridge | 2f9b76f | 2019-05-15 13:48:11 -0700 | [diff] [blame] | 56 | 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 Bainbridge | 5cb5d17 | 2019-07-24 02:30:19 +0000 | [diff] [blame] | 70 | image: {{ tpl .Values.images.afrouterd.registry . }}{{ tpl .Values.images.afrouterd.repository . }}:{{ tpl ( tpl .Values.images.afrouterd.tag . ) . }} |
David Bainbridge | cd30e54 | 2019-05-31 20:52:56 +0000 | [diff] [blame] | 71 | imagePullPolicy: {{ tpl .Values.images.afrouterd.pullPolicy . }} |
David Bainbridge | 2f9b76f | 2019-05-15 13:48:11 -0700 | [diff] [blame] | 72 | command: ["/app/arouterd"] |
| 73 | restartPolicy: Always |
| 74 | volumes: |
| 75 | - name: config-volume |
| 76 | configMap: |
| 77 | name: afrouter-config |