blob: a78829fd63bf736dea28657c53d7ec3194b70e06 [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.
14
15apiVersion: apps/v1
16kind: Deployment
17metadata:
18 name: adapter-open-onu
19 namespace: {{ .Release.Namespace }}
David Bainbridge534a73d2019-08-30 18:57:23 +000020 {{- if or (hasKey .Values "extra_deployment_labels") (hasKey .Values "openonu_deployment_labels") }}
21 labels:
22 {{- if hasKey .Values "extra_deployment_labels" }}
23 {{- range $key, $val := .Values.extra_deployment_labels }}
24 {{ $key }}: {{ $val | quote }}
25 {{- end }}
26 {{- end }}
27 {{- if hasKey .Values "openonu_deployment_labels" }}
28 {{- range $key, $val := .Values.openonu_deployment_labels }}
29 {{ $key }}: {{ $val | quote }}
30 {{- end }}
31 {{- end }}
32 {{- end }}
David Bainbridgecd30e542019-05-31 20:52:56 +000033spec:
34 replicas: {{ .Values.replicas.adapter_open_onu }}
35 selector:
36 matchLabels:
37 app: adapter-open-onu
38 template:
39 metadata:
40 labels:
41 app: adapter-open-onu
David Bainbridge1f888042019-06-24 18:02:01 +000042 app.kubernetes.io/name: "adapter-open-onu"
43 app.kubernetes.io/version: {{ quote .Chart.AppVersion }}
44 app.kubernetes.io/component: "adapter"
45 app.kubernetes.io/part-of: "voltha"
46 app.kubernetes.io/managed-by: {{ quote .Release.Service }}
47 helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
David Bainbridge534a73d2019-08-30 18:57:23 +000048 {{- if hasKey .Values "extra_pod_labels" }}
49 {{- range $key, $val := .Values.extra_pod_labels }}
50 {{ $key }}: {{ $val | quote }}
51 {{- end }}
52 {{- end }}
53 {{- if hasKey .Values "openonu_pod_labels" }}
54 {{- range $key, $val := .Values.openonu_pod_labels }}
55 {{ $key }}: {{ $val | quote }}
56 {{- end }}
57 {{- end }}
David Bainbridgecd30e542019-05-31 20:52:56 +000058 annotations:
59 cni: "calico"
60 spec:
61 containers:
62 - name: adapter-open-onu
David Bainbridge03706e62019-10-18 17:59:24 +000063 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 +000064 imagePullPolicy: {{ tpl .Values.images.adapter_open_onu.pullPolicy . }}
65 args:
66 - "/voltha/adapters/brcm_openomci_onu/main.py"
Matteo Scandoloe33ed152019-12-03 10:47:49 -080067 {{- if eq .Values.adapter_open_onu.log_level "DEBUG" }}
David Bainbridgecd30e542019-05-31 20:52:56 +000068 - "--verbose"
Matteo Scandoloe33ed152019-12-03 10:47:49 -080069 {{- end }}
70 {{- if eq .Values.adapter_open_onu.log_level "WARN" }}
71 - "--quiet"
72 {{- end }}
David Bainbridgecd30e542019-05-31 20:52:56 +000073 - "--kafka_adapter={{ .Values.services.kafka.adapter.service }}:{{ .Values.services.kafka.adapter.port }}"
74 - "--kafka_cluster={{ .Values.services.kafka.cluster.service }}:{{ .Values.services.kafka.cluster.port }}"
75 - "--core_topic=rwcore"
serkant.uluderya6ec764e2019-07-12 00:03:28 +030076 - "--name=brcm_openomci_onu"
David Bainbridgecd30e542019-05-31 20:52:56 +000077 - "--backend=etcd"
78 - "--etcd={{ .Values.services.etcd.service }}:{{ .Values.services.etcd.port }}"
Rohan Agrawal626f1852019-11-21 04:41:10 +000079 - "--probe=:8080"
80 readinessProbe:
81 httpGet:
82 path: /readz
83 port: 8080
84 initialDelaySeconds: 10
85 periodSeconds: 5
86 livenessProbe:
87 httpGet:
88 path: /healthz
89 port: 8080
90 initialDelaySeconds: 10
91 periodSeconds: 5