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: apps/v1 |
| 17 | kind: Deployment |
| 18 | metadata: |
| 19 | name: ro-core |
| 20 | serviceAccountName: {{ .Values.serviceaccount }} |
| 21 | spec: |
| 22 | replicas: {{ .Values.replicas.ro_core }} |
| 23 | selector: |
| 24 | matchLabels: |
| 25 | app: ro-core |
| 26 | template: |
| 27 | metadata: |
| 28 | labels: |
| 29 | app: ro-core |
| 30 | annotations: |
| 31 | cni: "calico" |
| 32 | spec: |
| 33 | affinity: |
| 34 | podAntiAffinity: |
| 35 | preferredDuringSchedulingIgnoredDuringExecution: |
| 36 | - weight: 100 |
| 37 | podAffinityTerm: |
| 38 | labelSelector: |
| 39 | matchExpressions: |
| 40 | - key: app |
| 41 | operator: In |
| 42 | values: |
| 43 | - ro-core |
| 44 | topologyKey: "kubernetes.io/hostname" |
| 45 | serviceAccountName: {{ .Values.serviceaccount }} |
| 46 | containers: |
| 47 | - name: voltha |
David Bainbridge | cd30e54 | 2019-05-31 20:52:56 +0000 | [diff] [blame] | 48 | image: {{ tpl .Values.images.ro_core.registry . }}{{ tpl .Values.images.ro_core.repository . }}:{{ tpl .Values.images.ro_core.tag . }} |
| 49 | imagePullPolicy: {{ tpl .Values.images.ro_core.pullPolicy . }} |
David Bainbridge | 2f9b76f | 2019-05-15 13:48:11 -0700 | [diff] [blame] | 50 | env: |
| 51 | - name: NAMESPACE |
| 52 | value: {{ quote .Release.Namespace }} |
| 53 | - name: POD_IP |
| 54 | valueFrom: |
| 55 | fieldRef: |
| 56 | fieldPath: status.podIP |
David Bainbridge | 2f9b76f | 2019-05-15 13:48:11 -0700 | [diff] [blame] | 57 | args: |
| 58 | - "/app/ro_core" |
| 59 | - "-kv_store_type=etcd" |
David Bainbridge | cd30e54 | 2019-05-31 20:52:56 +0000 | [diff] [blame] | 60 | - "-kv_store_host={{ .Values.services.etcd.service }}" |
| 61 | - "-kv_store_port={{ .Values.services.etcd.port }}" |
David Bainbridge | 2f9b76f | 2019-05-15 13:48:11 -0700 | [diff] [blame] | 62 | - "-grpc_host=$(POD_IP)" |
| 63 | - "-grpc_port=50057" |
| 64 | - "-banner=true" |
| 65 | - "-ro_core_topic=rocore" |
| 66 | - "-log_level=0" |
| 67 | ports: |
| 68 | - containerPort: 50057 |
| 69 | name: grpc-port |