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 |
| 42 | annotations: |
| 43 | cni: "calico" |
| 44 | spec: |
| 45 | serviceAccountName: {{ .Values.serviceaccount }} |
| 46 | containers: |
| 47 | - name: arouter |
David Bainbridge | cd30e54 | 2019-05-31 20:52:56 +0000 | [diff] [blame] | 48 | image: {{ tpl .Values.images.afrouter.registry . }}{{ tpl .Values.images.afrouter.repository . }}:{{ tpl .Values.images.afrouter.tag . }} |
| 49 | imagePullPolicy: {{ tpl .Values.images.afrouter.pullPolicy . }} |
David Bainbridge | 2f9b76f | 2019-05-15 13:48:11 -0700 | [diff] [blame] | 50 | 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 Hagerman | 32dddbb | 2019-06-18 17:29:36 -0400 | [diff] [blame] | 64 | - 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 Bainbridge | cd30e54 | 2019-05-31 20:52:56 +0000 | [diff] [blame] | 68 | image: {{ tpl .Values.images.afrouterd.registry . }}{{ tpl .Values.images.afrouterd.repository . }}:{{ tpl .Values.images.afrouterd.tag . }} |
| 69 | imagePullPolicy: {{ tpl .Values.images.afrouterd.pullPolicy . }} |
David Bainbridge | 2f9b76f | 2019-05-15 13:48:11 -0700 | [diff] [blame] | 70 | command: ["/app/arouterd"] |
| 71 | restartPolicy: Always |
| 72 | volumes: |
| 73 | - name: config-volume |
| 74 | configMap: |
| 75 | name: afrouter-config |