blob: c857fbc31379aa8e1f81c9da4d3697c32e608dff [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
16apiVersion: apps/v1
17kind: Deployment
18metadata:
19 name: adapter-open-onu
20 namespace: {{ .Release.Namespace }}
David Bainbridge534a73d2019-08-30 18:57:23 +000021 {{- if or (hasKey .Values "extra_deployment_labels") (hasKey .Values "openonu_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 "openonu_deployment_labels" }}
29 {{- range $key, $val := .Values.openonu_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_onu }}
36 selector:
37 matchLabels:
38 app: adapter-open-onu
39 template:
40 metadata:
41 labels:
42 app: adapter-open-onu
David Bainbridge1f888042019-06-24 18:02:01 +000043 app.kubernetes.io/name: "adapter-open-onu"
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 "openonu_pod_labels" }}
55 {{- range $key, $val := .Values.openonu_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-onu
David Bainbridge03706e62019-10-18 17:59:24 +000064 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 +000065 imagePullPolicy: {{ tpl .Values.images.adapter_open_onu.pullPolicy . }}
66 args:
67 - "/voltha/adapters/brcm_openomci_onu/main.py"
Andy Baviercf8eb802020-01-24 15:50:38 -070068 {{- if eq (tpl .Values.adapter_open_onu.log_level .) "DEBUG" }}
David Bainbridgecd30e542019-05-31 20:52:56 +000069 - "--verbose"
Matteo Scandoloe33ed152019-12-03 10:47:49 -080070 {{- end }}
Andy Baviercf8eb802020-01-24 15:50:38 -070071 {{- if eq (tpl .Values.adapter_open_onu.log_level .) "WARN" }}
Matteo Scandoloe33ed152019-12-03 10:47:49 -080072 - "--quiet"
73 {{- end }}
David Bainbridgecd30e542019-05-31 20:52:56 +000074 - "--kafka_adapter={{ .Values.services.kafka.adapter.service }}:{{ .Values.services.kafka.adapter.port }}"
75 - "--kafka_cluster={{ .Values.services.kafka.cluster.service }}:{{ .Values.services.kafka.cluster.port }}"
76 - "--core_topic=rwcore"
serkant.uluderya6ec764e2019-07-12 00:03:28 +030077 - "--name=brcm_openomci_onu"
David Bainbridgecd30e542019-05-31 20:52:56 +000078 - "--backend=etcd"
79 - "--etcd={{ .Values.services.etcd.service }}:{{ .Values.services.etcd.port }}"
Rohan Agrawal626f1852019-11-21 04:41:10 +000080 - "--probe=:8080"
81 readinessProbe:
82 httpGet:
83 path: /readz
84 port: 8080
85 initialDelaySeconds: 10
86 periodSeconds: 5
87 livenessProbe:
88 httpGet:
89 path: /healthz
90 port: 8080
91 initialDelaySeconds: 10
92 periodSeconds: 5
Holger Hildebrandtb67c3302020-02-25 13:48:59 +000093{{- end }}