blob: 9ff5e58af9895492dd480b3e4c6bf07713c79f26 [file] [log] [blame]
Holger Hildebrandtb67c3302020-02-25 13:48:59 +00001{{- if and (hasKey .Values "use_openonu_adapter_go") .Values.use_openonu_adapter_go }}
2# 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{{- $log_level := tpl .Values.adapter_open_onu.log_level . | upper }}
16
17apiVersion: apps/v1
18kind: Deployment
19metadata:
20 name: adapter-open-onu
21 namespace: {{ .Release.Namespace }}
22 {{- if or (hasKey .Values "extra_deployment_labels") (hasKey .Values "openonu_deployment_labels") }}
23 labels:
24 {{- if hasKey .Values "extra_deployment_labels" }}
25 {{- range $key, $val := .Values.extra_deployment_labels }}
26 {{ $key }}: {{ $val | quote }}
27 {{- end }}
28 {{- end }}
29 {{- if hasKey .Values "openonu_deployment_labels" }}
30 {{- range $key, $val := .Values.openonu_deployment_labels }}
31 {{ $key }}: {{ $val | quote }}
32 {{- end }}
33 {{- end }}
34 {{- end }}
35spec:
36 replicas: {{ .Values.replicas.adapter_open_onu }}
37 selector:
38 matchLabels:
39 app: adapter-open-onu
40 template:
41 metadata:
42 labels:
43 app: adapter-open-onu
44 app.kubernetes.io/name: "adapter-open-onu"
45 app.kubernetes.io/version: {{ quote .Chart.AppVersion }}
46 app.kubernetes.io/component: "adapter"
47 app.kubernetes.io/part-of: "voltha"
48 app.kubernetes.io/managed-by: {{ quote .Release.Service }}
49 helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
50 {{- if hasKey .Values "extra_pod_labels" }}
51 {{- range $key, $val := .Values.extra_pod_labels }}
52 {{ $key }}: {{ $val | quote }}
53 {{- end }}
54 {{- end }}
55 {{- if hasKey .Values "openonu_pod_labels" }}
56 {{- range $key, $val := .Values.openonu_pod_labels }}
57 {{ $key }}: {{ $val | quote }}
58 {{- end }}
59 {{- end }}
60 annotations:
61 cni: "calico"
62 spec:
63 containers:
64 - name: adapter-open-onu
65 image: '{{ tpl .Values.images.adapter_open_onu.registry . }}{{ tpl .Values.images.adapter_open_onu_go.repository . }}:{{ tpl ( tpl .Values.images.adapter_open_onu_go.tag . ) . }}'
66 imagePullPolicy: {{ tpl .Values.images.adapter_open_onu_go.pullPolicy . }}
67 args:
Matteo Scandolo4f6d59a2020-03-25 10:37:18 -070068 - "/app/openonu"
Holger Hildebrandtb67c3302020-02-25 13:48:59 +000069 - "--banner=true"
70 - "--kafka_reconnect_retries=-1"
71 - "--kafka_adapter_host={{ .Values.services.kafka.adapter.service }}"
72 - "--kafka_adapter_port={{ .Values.services.kafka.adapter.port }}"
73 - "--kafka_cluster_host={{ .Values.services.kafka.cluster.service }}"
74 - "--kafka_cluster_port={{ .Values.services.kafka.cluster.port }}"
75 - "--core_topic=rwcore"
76 - "--adapter_topic=brcm_openomci_onu"
77 - "--kv_store_host={{ .Values.services.etcd.service }}"
78 - "--kv_store_port={{ .Values.services.etcd.port }}"
79 - "--log_level={{ $log_level }}"
80 - "--probe_port=8080"
81 livenessProbe:
82 httpGet:
83 path: /healthz
84 port: 8080
85 initialDelaySeconds: 10
86 periodSeconds: 5
87 readinessProbe:
88 httpGet:
89 path: /readz
90 port: 8080
91 initialDelaySeconds: 10
92 periodSeconds: 5
Matteo Scandolo4f6d59a2020-03-25 10:37:18 -070093{{- end }}