blob: a62506da1f6a86d82e7d8d3baa7ddbb4d0c63a9d [file] [log] [blame]
David Bainbridgecd30e542019-05-31 20:52:56 +00001# 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.
Rohan Agrawale2f4a1e2020-02-04 06:28:36 +000014{{- $log_level := tpl .Values.adapter_open_olt.log_level . | upper }}
David Bainbridgecd30e542019-05-31 20:52:56 +000015
16apiVersion: apps/v1
17kind: Deployment
18metadata:
19 name: adapter-open-olt
20 namespace: {{ .Release.Namespace }}
David Bainbridge534a73d2019-08-30 18:57:23 +000021 {{- if or (hasKey .Values "extra_deployment_labels") (hasKey .Values "openolt_deployment_labels") }}
22 labels:
23 {{- if hasKey .Values "extra_deployment_labels" }}
24 {{- range $key, $val := .Values.extra_deployment_labels }}
25 {{ $key }}: {{ $val | quote }}
26 {{- end }}
27 {{- end }}
28 {{- if hasKey .Values "openolt_deployment_labels" }}
29 {{- range $key, $val := .Values.openolt_deployment_labels }}
30 {{ $key }}: {{ $val | quote }}
31 {{- end }}
32 {{- end }}
33 {{- end }}
David Bainbridgecd30e542019-05-31 20:52:56 +000034spec:
35 replicas: {{ .Values.replicas.adapter_open_olt }}
36 selector:
37 matchLabels:
38 app: adapter-open-olt
39 template:
40 metadata:
41 labels:
42 app: adapter-open-olt
David Bainbridge1f888042019-06-24 18:02:01 +000043 app.kubernetes.io/name: "adapter-open-olt"
44 app.kubernetes.io/version: {{ quote .Chart.AppVersion }}
45 app.kubernetes.io/component: "adapter"
46 app.kubernetes.io/part-of: "voltha"
47 app.kubernetes.io/managed-by: {{ quote .Release.Service }}
48 helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
David Bainbridge534a73d2019-08-30 18:57:23 +000049 {{- if hasKey .Values "extra_pod_labels" }}
50 {{- range $key, $val := .Values.extra_pod_labels }}
51 {{ $key }}: {{ $val | quote }}
52 {{- end }}
53 {{- end }}
54 {{- if hasKey .Values "openolt_pod_labels" }}
55 {{- range $key, $val := .Values.openolt_pod_labels }}
56 {{ $key }}: {{ $val | quote }}
57 {{- end }}
58 {{- end }}
David Bainbridgecd30e542019-05-31 20:52:56 +000059 annotations:
60 cni: "calico"
61 spec:
62 containers:
63 - name: adapter-open-olt
David Bainbridge03706e62019-10-18 17:59:24 +000064 image: '{{ tpl .Values.images.adapter_open_olt.registry . }}{{ tpl .Values.images.adapter_open_olt.repository . }}:{{ tpl ( tpl .Values.images.adapter_open_olt.tag . ) . }}'
David Bainbridgecd30e542019-05-31 20:52:56 +000065 imagePullPolicy: {{ tpl .Values.images.adapter_open_olt.pullPolicy . }}
divyadesai423be072020-02-20 12:05:01 +000066 env:
67 - name: COMPONENT_NAME
68 valueFrom:
69 fieldRef:
70 fieldPath: metadata.labels['app.kubernetes.io/name']
David Bainbridgecd30e542019-05-31 20:52:56 +000071 args:
David Bainbridge6a43d8d2019-06-18 19:09:09 +000072 - "/app/openolt"
73 - "--kafka_adapter_host={{ .Values.services.kafka.adapter.service }}"
74 - "--kafka_adapter_port={{ .Values.services.kafka.adapter.port }}"
75 - "--kafka_cluster_host={{ .Values.services.kafka.cluster.service }}"
76 - "--kafka_cluster_port={{ .Values.services.kafka.cluster.port }}"
77 - "--core_topic=rwcore"
78 - "--kv_store_host={{ .Values.services.etcd.service }}"
79 - "--kv_store_port={{ .Values.services.etcd.port }}"
Matteo Scandoloc250ddd2019-12-12 13:34:27 -080080 - "--log_level={{ $log_level }}"
Rohan Agrawal69303562019-10-22 12:24:58 +000081 - "--probe_port=8080"
82 livenessProbe:
83 httpGet:
84 path: /healthz
85 port: 8080
86 initialDelaySeconds: 10
87 periodSeconds: 5
88 readinessProbe:
89 httpGet:
90 path: /readz
91 port: 8080
92 initialDelaySeconds: 10
93 periodSeconds: 5