blob: ce4a6bd2fa39a671b812015249730c90a65a8075 [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
David Bainbridge1f888042019-06-24 18:02:01 +000030 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 Bainbridge2f9b76f2019-05-15 13:48:11 -070036 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 Bainbridge5cb5d172019-07-24 02:30:19 +000054 image: {{ tpl .Values.images.ro_core.registry . }}{{ tpl .Values.images.ro_core.repository . }}:{{ tpl ( tpl .Values.images.ro_core.tag . ) . }}
David Bainbridgecd30e542019-05-31 20:52:56 +000055 imagePullPolicy: {{ tpl .Values.images.ro_core.pullPolicy . }}
David Bainbridge2f9b76f2019-05-15 13:48:11 -070056 env:
57 - name: NAMESPACE
58 value: {{ quote .Release.Namespace }}
59 - name: POD_IP
60 valueFrom:
61 fieldRef:
62 fieldPath: status.podIP
David Bainbridge2f9b76f2019-05-15 13:48:11 -070063 args:
64 - "/app/ro_core"
65 - "-kv_store_type=etcd"
David Bainbridgecd30e542019-05-31 20:52:56 +000066 - "-kv_store_host={{ .Values.services.etcd.service }}"
67 - "-kv_store_port={{ .Values.services.etcd.port }}"
David Bainbridge2f9b76f2019-05-15 13:48:11 -070068 - "-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