David Bainbridge | cd30e54 | 2019-05-31 20:52:56 +0000 | [diff] [blame] | 1 | # 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 | |
| 15 | apiVersion: apps/v1 |
| 16 | kind: Deployment |
| 17 | metadata: |
| 18 | name: adapter-open-onu |
| 19 | namespace: {{ .Release.Namespace }} |
David Bainbridge | 534a73d | 2019-08-30 18:57:23 +0000 | [diff] [blame] | 20 | {{- 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 Bainbridge | cd30e54 | 2019-05-31 20:52:56 +0000 | [diff] [blame] | 33 | spec: |
| 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 Bainbridge | 1f88804 | 2019-06-24 18:02:01 +0000 | [diff] [blame] | 42 | 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 Bainbridge | 534a73d | 2019-08-30 18:57:23 +0000 | [diff] [blame] | 48 | {{- 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 Bainbridge | cd30e54 | 2019-05-31 20:52:56 +0000 | [diff] [blame] | 58 | annotations: |
| 59 | cni: "calico" |
| 60 | spec: |
| 61 | containers: |
| 62 | - name: adapter-open-onu |
David Bainbridge | 03706e6 | 2019-10-18 17:59:24 +0000 | [diff] [blame] | 63 | 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] | 64 | imagePullPolicy: {{ tpl .Values.images.adapter_open_onu.pullPolicy . }} |
| 65 | args: |
| 66 | - "/voltha/adapters/brcm_openomci_onu/main.py" |
Matteo Scandolo | e33ed15 | 2019-12-03 10:47:49 -0800 | [diff] [blame^] | 67 | {{- if eq .Values.adapter_open_onu.log_level "DEBUG" }} |
David Bainbridge | cd30e54 | 2019-05-31 20:52:56 +0000 | [diff] [blame] | 68 | - "--verbose" |
Matteo Scandolo | e33ed15 | 2019-12-03 10:47:49 -0800 | [diff] [blame^] | 69 | {{- end }} |
| 70 | {{- if eq .Values.adapter_open_onu.log_level "WARN" }} |
| 71 | - "--quiet" |
| 72 | {{- end }} |
David Bainbridge | cd30e54 | 2019-05-31 20:52:56 +0000 | [diff] [blame] | 73 | - "--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.uluderya | 6ec764e | 2019-07-12 00:03:28 +0300 | [diff] [blame] | 76 | - "--name=brcm_openomci_onu" |
David Bainbridge | cd30e54 | 2019-05-31 20:52:56 +0000 | [diff] [blame] | 77 | - "--backend=etcd" |
| 78 | - "--etcd={{ .Values.services.etcd.service }}:{{ .Values.services.etcd.port }}" |
Rohan Agrawal | 626f185 | 2019-11-21 04:41:10 +0000 | [diff] [blame] | 79 | - "--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 |