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-olt |
| 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 "openolt_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 "openolt_deployment_labels" }} |
| 28 | {{- range $key, $val := .Values.openolt_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_olt }} |
| 35 | selector: |
| 36 | matchLabels: |
| 37 | app: adapter-open-olt |
| 38 | template: |
| 39 | metadata: |
| 40 | labels: |
| 41 | app: adapter-open-olt |
David Bainbridge | 1f88804 | 2019-06-24 18:02:01 +0000 | [diff] [blame] | 42 | app.kubernetes.io/name: "adapter-open-olt" |
| 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 "openolt_pod_labels" }} |
| 54 | {{- range $key, $val := .Values.openolt_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-olt |
David Bainbridge | 03706e6 | 2019-10-18 17:59:24 +0000 | [diff] [blame] | 63 | image: '{{ tpl .Values.images.adapter_open_olt.registry . }}{{ tpl .Values.images.adapter_open_olt.repository . }}:{{ tpl ( tpl .Values.images.adapter_open_olt.tag . ) . }}' |
David Bainbridge | cd30e54 | 2019-05-31 20:52:56 +0000 | [diff] [blame] | 64 | imagePullPolicy: {{ tpl .Values.images.adapter_open_olt.pullPolicy . }} |
| 65 | args: |
David Bainbridge | 6a43d8d | 2019-06-18 19:09:09 +0000 | [diff] [blame] | 66 | - "/app/openolt" |
| 67 | - "--kafka_adapter_host={{ .Values.services.kafka.adapter.service }}" |
| 68 | - "--kafka_adapter_port={{ .Values.services.kafka.adapter.port }}" |
| 69 | - "--kafka_cluster_host={{ .Values.services.kafka.cluster.service }}" |
| 70 | - "--kafka_cluster_port={{ .Values.services.kafka.cluster.port }}" |
| 71 | - "--core_topic=rwcore" |
| 72 | - "--kv_store_host={{ .Values.services.etcd.service }}" |
| 73 | - "--kv_store_port={{ .Values.services.etcd.port }}" |
Rohan Agrawal | 6930356 | 2019-10-22 12:24:58 +0000 | [diff] [blame] | 74 | - "--probe_port=8080" |
| 75 | livenessProbe: |
| 76 | httpGet: |
| 77 | path: /healthz |
| 78 | port: 8080 |
| 79 | initialDelaySeconds: 10 |
| 80 | periodSeconds: 5 |
| 81 | readinessProbe: |
| 82 | httpGet: |
| 83 | path: /readz |
| 84 | port: 8080 |
| 85 | initialDelaySeconds: 10 |
| 86 | periodSeconds: 5 |
| 87 | |