blob: 6e6010c6b8683eab8b5b14975e1cc9465c1093ea [file] [log] [blame]
Holger Hildebrandtb67c3302020-02-25 13:48:59 +00001{{- if not (and (hasKey .Values "use_openonu_adapter_go") .Values.use_openonu_adapter_go) }}
David Bainbridgecd30e542019-05-31 20:52:56 +00002# Copyright 2019-present Open Networking Foundation
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
Rohan Agrawal781b33f2020-03-09 12:50:06 +000016{{- $log_level := tpl .Values.adapter_open_onu.log_level . | upper }}
17
David Bainbridgecd30e542019-05-31 20:52:56 +000018apiVersion: apps/v1
19kind: Deployment
20metadata:
21 name: adapter-open-onu
22 namespace: {{ .Release.Namespace }}
David Bainbridge534a73d2019-08-30 18:57:23 +000023 {{- if or (hasKey .Values "extra_deployment_labels") (hasKey .Values "openonu_deployment_labels") }}
24 labels:
25 {{- if hasKey .Values "extra_deployment_labels" }}
26 {{- range $key, $val := .Values.extra_deployment_labels }}
27 {{ $key }}: {{ $val | quote }}
28 {{- end }}
29 {{- end }}
30 {{- if hasKey .Values "openonu_deployment_labels" }}
31 {{- range $key, $val := .Values.openonu_deployment_labels }}
32 {{ $key }}: {{ $val | quote }}
33 {{- end }}
34 {{- end }}
35 {{- end }}
David Bainbridgecd30e542019-05-31 20:52:56 +000036spec:
37 replicas: {{ .Values.replicas.adapter_open_onu }}
38 selector:
39 matchLabels:
40 app: adapter-open-onu
41 template:
42 metadata:
43 labels:
44 app: adapter-open-onu
David Bainbridge1f888042019-06-24 18:02:01 +000045 app.kubernetes.io/name: "adapter-open-onu"
46 app.kubernetes.io/version: {{ quote .Chart.AppVersion }}
47 app.kubernetes.io/component: "adapter"
48 app.kubernetes.io/part-of: "voltha"
49 app.kubernetes.io/managed-by: {{ quote .Release.Service }}
50 helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
David Bainbridge534a73d2019-08-30 18:57:23 +000051 {{- if hasKey .Values "extra_pod_labels" }}
52 {{- range $key, $val := .Values.extra_pod_labels }}
53 {{ $key }}: {{ $val | quote }}
54 {{- end }}
55 {{- end }}
56 {{- if hasKey .Values "openonu_pod_labels" }}
57 {{- range $key, $val := .Values.openonu_pod_labels }}
58 {{ $key }}: {{ $val | quote }}
59 {{- end }}
60 {{- end }}
David Bainbridgecd30e542019-05-31 20:52:56 +000061 annotations:
62 cni: "calico"
63 spec:
64 containers:
65 - name: adapter-open-onu
David Bainbridge03706e62019-10-18 17:59:24 +000066 image: '{{ tpl .Values.images.adapter_open_onu.registry . }}{{ tpl .Values.images.adapter_open_onu.repository . }}:{{ tpl ( tpl .Values.images.adapter_open_onu.tag . ) . }}'
David Bainbridgecd30e542019-05-31 20:52:56 +000067 imagePullPolicy: {{ tpl .Values.images.adapter_open_onu.pullPolicy . }}
68 args:
69 - "/voltha/adapters/brcm_openomci_onu/main.py"
David Bainbridgecd30e542019-05-31 20:52:56 +000070 - "--kafka_adapter={{ .Values.services.kafka.adapter.service }}:{{ .Values.services.kafka.adapter.port }}"
71 - "--kafka_cluster={{ .Values.services.kafka.cluster.service }}:{{ .Values.services.kafka.cluster.port }}"
72 - "--core_topic=rwcore"
serkant.uluderya6ec764e2019-07-12 00:03:28 +030073 - "--name=brcm_openomci_onu"
David Bainbridgecd30e542019-05-31 20:52:56 +000074 - "--backend=etcd"
75 - "--etcd={{ .Values.services.etcd.service }}:{{ .Values.services.etcd.port }}"
Rohan Agrawal626f1852019-11-21 04:41:10 +000076 - "--probe=:8080"
Rohan Agrawal781b33f2020-03-09 12:50:06 +000077 - "--log_level={{ $log_level }}"
Rohan Agrawal626f1852019-11-21 04:41:10 +000078 readinessProbe:
79 httpGet:
80 path: /readz
81 port: 8080
82 initialDelaySeconds: 10
83 periodSeconds: 5
84 livenessProbe:
85 httpGet:
86 path: /healthz
87 port: 8080
88 initialDelaySeconds: 10
89 periodSeconds: 5
Rohan Agrawal781b33f2020-03-09 12:50:06 +000090{{- end }}