blob: 7644c5af7095cd6be0637a9134733e6c2bc07d18 [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
David Bainbridgecd30e542019-05-31 20:52:56 +000048 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 Bainbridge2f9b76f2019-05-15 13:48:11 -070050 env:
51 - name: NAMESPACE
52 value: {{ quote .Release.Namespace }}
53 - name: POD_IP
54 valueFrom:
55 fieldRef:
56 fieldPath: status.podIP
David Bainbridge2f9b76f2019-05-15 13:48:11 -070057 args:
58 - "/app/ro_core"
59 - "-kv_store_type=etcd"
David Bainbridgecd30e542019-05-31 20:52:56 +000060 - "-kv_store_host={{ .Values.services.etcd.service }}"
61 - "-kv_store_port={{ .Values.services.etcd.port }}"
David Bainbridge2f9b76f2019-05-15 13:48:11 -070062 - "-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