Holger Hildebrandt | b67c330 | 2020-02-25 13:48:59 +0000 | [diff] [blame] | 1 | {{- if not (and (hasKey .Values "use_openonu_adapter_go") .Values.use_openonu_adapter_go) }} |
David Bainbridge | cd30e54 | 2019-05-31 20:52:56 +0000 | [diff] [blame] | 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 | |
Rohan Agrawal | 781b33f | 2020-03-09 12:50:06 +0000 | [diff] [blame] | 16 | {{- $log_level := tpl .Values.adapter_open_onu.log_level . | upper }} |
| 17 | |
David Bainbridge | cd30e54 | 2019-05-31 20:52:56 +0000 | [diff] [blame] | 18 | apiVersion: apps/v1 |
| 19 | kind: Deployment |
| 20 | metadata: |
| 21 | name: adapter-open-onu |
| 22 | namespace: {{ .Release.Namespace }} |
David Bainbridge | 534a73d | 2019-08-30 18:57:23 +0000 | [diff] [blame] | 23 | {{- 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 Bainbridge | cd30e54 | 2019-05-31 20:52:56 +0000 | [diff] [blame] | 36 | spec: |
| 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 Bainbridge | 1f88804 | 2019-06-24 18:02:01 +0000 | [diff] [blame] | 45 | 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 Bainbridge | 534a73d | 2019-08-30 18:57:23 +0000 | [diff] [blame] | 51 | {{- 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 Bainbridge | cd30e54 | 2019-05-31 20:52:56 +0000 | [diff] [blame] | 61 | annotations: |
| 62 | cni: "calico" |
| 63 | spec: |
| 64 | containers: |
| 65 | - name: adapter-open-onu |
David Bainbridge | 03706e6 | 2019-10-18 17:59:24 +0000 | [diff] [blame] | 66 | image: '{{ tpl .Values.images.adapter_open_onu.registry . }}{{ tpl .Values.images.adapter_open_onu.repository . }}:{{ tpl ( tpl .Values.images.adapter_open_onu.tag . ) . }}' |
David Bainbridge | cd30e54 | 2019-05-31 20:52:56 +0000 | [diff] [blame] | 67 | imagePullPolicy: {{ tpl .Values.images.adapter_open_onu.pullPolicy . }} |
| 68 | args: |
| 69 | - "/voltha/adapters/brcm_openomci_onu/main.py" |
David Bainbridge | cd30e54 | 2019-05-31 20:52:56 +0000 | [diff] [blame] | 70 | - "--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.uluderya | 6ec764e | 2019-07-12 00:03:28 +0300 | [diff] [blame] | 73 | - "--name=brcm_openomci_onu" |
David Bainbridge | cd30e54 | 2019-05-31 20:52:56 +0000 | [diff] [blame] | 74 | - "--backend=etcd" |
| 75 | - "--etcd={{ .Values.services.etcd.service }}:{{ .Values.services.etcd.port }}" |
Rohan Agrawal | 626f185 | 2019-11-21 04:41:10 +0000 | [diff] [blame] | 76 | - "--probe=:8080" |
Rohan Agrawal | 781b33f | 2020-03-09 12:50:06 +0000 | [diff] [blame] | 77 | - "--log_level={{ $log_level }}" |
Rohan Agrawal | 626f185 | 2019-11-21 04:41:10 +0000 | [diff] [blame] | 78 | 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 Agrawal | 781b33f | 2020-03-09 12:50:06 +0000 | [diff] [blame] | 90 | {{- end }} |