blob: 8225e00c97e2d2a2d968b39f948a4023b91b7810 [file] [log] [blame]
David Bainbridge2f9b76f2019-05-15 13:48:11 -07001# 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---
16apiVersion: apps/v1
17kind: Deployment
18metadata:
19 name: ro-core
20 serviceAccountName: {{ .Values.serviceaccount }}
21spec:
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
48 image: {{ .Values.registry }}{{ .Values.images.ro_core.repository }}:{{ tpl .Values.images.ro_core.tag . }}
49 imagePullPolicy: {{ .Values.images.ro_core.pullPolicy }}
50 env:
51 - name: NAMESPACE
52 value: {{ quote .Release.Namespace }}
53 - name: POD_IP
54 valueFrom:
55 fieldRef:
56 fieldPath: status.podIP
57 - name: ETCD_SERVICE
58 value: {{ quote .Values.services.etcd.service }}
59 - name: ETCD_SERVICE_PORT
60 value: {{ quote .Values.services.etcd.port }}
61 args:
62 - "/app/ro_core"
63 - "-kv_store_type=etcd"
64 - "-kv_store_host=$(ETCD_SERVICE)"
65 - "-kv_store_port=$(ETCD_SERVICE_PORT)"
66 - "-grpc_host=$(POD_IP)"
67 - "-grpc_port=50057"
68 - "-banner=true"
69 - "-ro_core_topic=rocore"
70 - "-log_level=0"
71 ports:
72 - containerPort: 50057
73 name: grpc-port