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 }} |
| 20 | spec: |
| 21 | replicas: {{ .Values.replicas.adapter_open_olt }} |
| 22 | selector: |
| 23 | matchLabels: |
| 24 | app: adapter-open-olt |
| 25 | template: |
| 26 | metadata: |
| 27 | labels: |
| 28 | app: adapter-open-olt |
David Bainbridge | 1f88804 | 2019-06-24 18:02:01 +0000 | [diff] [blame] | 29 | app.kubernetes.io/name: "adapter-open-olt" |
| 30 | app.kubernetes.io/version: {{ quote .Chart.AppVersion }} |
| 31 | app.kubernetes.io/component: "adapter" |
| 32 | app.kubernetes.io/part-of: "voltha" |
| 33 | app.kubernetes.io/managed-by: {{ quote .Release.Service }} |
| 34 | helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" |
David Bainbridge | cd30e54 | 2019-05-31 20:52:56 +0000 | [diff] [blame] | 35 | annotations: |
| 36 | cni: "calico" |
| 37 | spec: |
| 38 | containers: |
| 39 | - name: adapter-open-olt |
David Bainbridge | 6a43d8d | 2019-06-18 19:09:09 +0000 | [diff] [blame] | 40 | {{- if .Values.use_go }} |
David Bainbridge | 5cb5d17 | 2019-07-24 02:30:19 +0000 | [diff] [blame] | 41 | {{- $image_tag := tpl .Values.images.adapter_open_olt.tag_go . }} |
| 42 | {{- if eq "::DEFAULT::" $image_tag }} |
| 43 | {{- $image_tag = .Values.defaults.default_go_image_tag }} |
| 44 | {{- end }} |
| 45 | image: {{ tpl .Values.images.adapter_open_olt.registry . }}{{ tpl .Values.images.adapter_open_olt.repository . }}:{{ $image_tag }} |
David Bainbridge | 6a43d8d | 2019-06-18 19:09:09 +0000 | [diff] [blame] | 46 | {{- else }} |
David Bainbridge | 5cb5d17 | 2019-07-24 02:30:19 +0000 | [diff] [blame] | 47 | {{- $image_tag := tpl .Values.images.adapter_open_olt.tag . }} |
| 48 | {{- if eq "::DEFAULT::" $image_tag }} |
| 49 | {{- $image_tag = .Values.defaults.default_py_image_tag }} |
| 50 | {{- end }} |
| 51 | image: {{ tpl .Values.images.adapter_open_olt.registry . }}{{ tpl .Values.images.adapter_open_olt.repository . }}:{{ $image_tag }} |
David Bainbridge | 6a43d8d | 2019-06-18 19:09:09 +0000 | [diff] [blame] | 52 | {{- end }} |
David Bainbridge | cd30e54 | 2019-05-31 20:52:56 +0000 | [diff] [blame] | 53 | imagePullPolicy: {{ tpl .Values.images.adapter_open_olt.pullPolicy . }} |
| 54 | args: |
David Bainbridge | 6a43d8d | 2019-06-18 19:09:09 +0000 | [diff] [blame] | 55 | {{- if .Values.use_go }} |
| 56 | - "/app/openolt" |
| 57 | - "--kafka_adapter_host={{ .Values.services.kafka.adapter.service }}" |
| 58 | - "--kafka_adapter_port={{ .Values.services.kafka.adapter.port }}" |
| 59 | - "--kafka_cluster_host={{ .Values.services.kafka.cluster.service }}" |
| 60 | - "--kafka_cluster_port={{ .Values.services.kafka.cluster.port }}" |
| 61 | - "--core_topic=rwcore" |
| 62 | - "--kv_store_host={{ .Values.services.etcd.service }}" |
| 63 | - "--kv_store_port={{ .Values.services.etcd.port }}" |
| 64 | {{- else}} |
David Bainbridge | cd30e54 | 2019-05-31 20:52:56 +0000 | [diff] [blame] | 65 | - "/voltha/adapters/openolt/main.py" |
| 66 | - "--verbose" |
| 67 | - "--kafka_adapter={{ .Values.services.kafka.adapter.service }}:{{ .Values.services.kafka.adapter.port }}" |
| 68 | - "--kafka_cluster={{ .Values.services.kafka.cluster.service }}:{{ .Values.services.kafka.cluster.port }}" |
| 69 | - "--core_topic=rwcore" |
| 70 | - "--backend=etcd" |
| 71 | - "--etcd={{ .Values.services.etcd.service }}:{{ .Values.services.etcd.port }}" |
David Bainbridge | 6a43d8d | 2019-06-18 19:09:09 +0000 | [diff] [blame] | 72 | {{- end}} |