blob: 1b3f5f4c2f12f2173f0aa68f21f694881a98b9ca [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"
67 - "--verbose"
68 - "--kafka_adapter={{ .Values.services.kafka.adapter.service }}:{{ .Values.services.kafka.adapter.port }}"
69 - "--kafka_cluster={{ .Values.services.kafka.cluster.service }}:{{ .Values.services.kafka.cluster.port }}"
70 - "--core_topic=rwcore"
serkant.uluderya6ec764e2019-07-12 00:03:28 +030071 - "--name=brcm_openomci_onu"
David Bainbridgecd30e542019-05-31 20:52:56 +000072 - "--backend=etcd"
73 - "--etcd={{ .Values.services.etcd.service }}:{{ .Values.services.etcd.port }}"
Rohan Agrawal626f1852019-11-21 04:41:10 +000074 - "--probe=:8080"
75 readinessProbe:
76 httpGet:
77 path: /readz
78 port: 8080
79 initialDelaySeconds: 10
80 periodSeconds: 5
81 livenessProbe:
82 httpGet:
83 path: /healthz
84 port: 8080
85 initialDelaySeconds: 10
86 periodSeconds: 5