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 |
David Bainbridge | 1f88804 | 2019-06-24 18:02:01 +0000 | [diff] [blame^] | 30 | app.kubernetes.io/name: "read-only-core" |
| 31 | app.kubernetes.io/version: {{ quote .Chart.AppVersion }} |
| 32 | app.kubernetes.io/component: "core" |
| 33 | app.kubernetes.io/part-of: "voltha" |
| 34 | app.kubernetes.io/managed-by: {{ quote .Release.Service }} |
| 35 | helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" |
David Bainbridge | 2f9b76f | 2019-05-15 13:48:11 -0700 | [diff] [blame] | 36 | annotations: |
| 37 | cni: "calico" |
| 38 | spec: |
| 39 | affinity: |
| 40 | podAntiAffinity: |
| 41 | preferredDuringSchedulingIgnoredDuringExecution: |
| 42 | - weight: 100 |
| 43 | podAffinityTerm: |
| 44 | labelSelector: |
| 45 | matchExpressions: |
| 46 | - key: app |
| 47 | operator: In |
| 48 | values: |
| 49 | - ro-core |
| 50 | topologyKey: "kubernetes.io/hostname" |
| 51 | serviceAccountName: {{ .Values.serviceaccount }} |
| 52 | containers: |
| 53 | - name: voltha |
David Bainbridge | cd30e54 | 2019-05-31 20:52:56 +0000 | [diff] [blame] | 54 | image: {{ tpl .Values.images.ro_core.registry . }}{{ tpl .Values.images.ro_core.repository . }}:{{ tpl .Values.images.ro_core.tag . }} |
| 55 | imagePullPolicy: {{ tpl .Values.images.ro_core.pullPolicy . }} |
David Bainbridge | 2f9b76f | 2019-05-15 13:48:11 -0700 | [diff] [blame] | 56 | env: |
| 57 | - name: NAMESPACE |
| 58 | value: {{ quote .Release.Namespace }} |
| 59 | - name: POD_IP |
| 60 | valueFrom: |
| 61 | fieldRef: |
| 62 | fieldPath: status.podIP |
David Bainbridge | 2f9b76f | 2019-05-15 13:48:11 -0700 | [diff] [blame] | 63 | args: |
| 64 | - "/app/ro_core" |
| 65 | - "-kv_store_type=etcd" |
David Bainbridge | cd30e54 | 2019-05-31 20:52:56 +0000 | [diff] [blame] | 66 | - "-kv_store_host={{ .Values.services.etcd.service }}" |
| 67 | - "-kv_store_port={{ .Values.services.etcd.port }}" |
David Bainbridge | 2f9b76f | 2019-05-15 13:48:11 -0700 | [diff] [blame] | 68 | - "-grpc_host=$(POD_IP)" |
| 69 | - "-grpc_port=50057" |
| 70 | - "-banner=true" |
| 71 | - "-ro_core_topic=rocore" |
| 72 | - "-log_level=0" |
| 73 | ports: |
| 74 | - containerPort: 50057 |
| 75 | name: grpc-port |