David Bainbridge | 2f9b76f | 2019-05-15 13:48:11 -0700 | [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 | --- |
David Bainbridge | 2f9b76f | 2019-05-15 13:48:11 -0700 | [diff] [blame] | 16 | apiVersion: apps/v1 |
| 17 | kind: Deployment |
| 18 | metadata: |
| 19 | name: adapter-simulated-olt |
| 20 | namespace: {{ .Release.Namespace }} |
David Bainbridge | 534a73d | 2019-08-30 18:57:23 +0000 | [diff] [blame^] | 21 | {{- if or (hasKey .Values "extra_deployment_labels") (hasKey .Values "simolt_deployment_labels") }} |
| 22 | labels: |
| 23 | {{- if hasKey .Values "extra_deployment_labels" }} |
| 24 | {{- range $key, $val := .Values.extra_deployment_labels }} |
| 25 | {{ $key }}: {{ $val | quote }} |
| 26 | {{- end }} |
| 27 | {{- end }} |
| 28 | {{- if hasKey .Values "simolt_deployment_labels" }} |
| 29 | {{- range $key, $val := .Values.simolt_deployment_labels }} |
| 30 | {{ $key }}: {{ $val | quote }} |
| 31 | {{- end }} |
| 32 | {{- end }} |
| 33 | {{- end }} |
David Bainbridge | 2f9b76f | 2019-05-15 13:48:11 -0700 | [diff] [blame] | 34 | spec: |
| 35 | replicas: {{ .Values.replicas.adapter_simulated_olt }} |
| 36 | selector: |
| 37 | matchLabels: |
| 38 | app: adapter-simulated-olt |
| 39 | template: |
| 40 | metadata: |
| 41 | labels: |
| 42 | app: adapter-simulated-olt |
David Bainbridge | 1f88804 | 2019-06-24 18:02:01 +0000 | [diff] [blame] | 43 | app.kubernetes.io/name: "adapter-simulated-olt" |
| 44 | app.kubernetes.io/version: {{ quote .Chart.AppVersion }} |
| 45 | app.kubernetes.io/component: "adapter" |
| 46 | app.kubernetes.io/part-of: "voltha" |
| 47 | app.kubernetes.io/managed-by: {{ quote .Release.Service }} |
| 48 | helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" |
David Bainbridge | 534a73d | 2019-08-30 18:57:23 +0000 | [diff] [blame^] | 49 | {{- if hasKey .Values "extra_pod_labels" }} |
| 50 | {{- range $key, $val := .Values.extra_pod_labels }} |
| 51 | {{ $key }}: {{ $val | quote }} |
| 52 | {{- end }} |
| 53 | {{- end }} |
| 54 | {{- if hasKey .Values "simolt_pod_labels" }} |
| 55 | {{- range $key, $val := .Values.simolt_pod_labels }} |
| 56 | {{ $key }}: {{ $val | quote }} |
| 57 | {{- end }} |
| 58 | {{- end }} |
David Bainbridge | 2f9b76f | 2019-05-15 13:48:11 -0700 | [diff] [blame] | 59 | annotations: |
| 60 | cni: "calico" |
| 61 | spec: |
| 62 | containers: |
| 63 | - name: adapter-simulated-olt |
David Bainbridge | 5cb5d17 | 2019-07-24 02:30:19 +0000 | [diff] [blame] | 64 | image: {{ tpl .Values.images.adapter_simulated_olt.registry . }}{{ tpl .Values.images.adapter_simulated_olt.repository . }}:{{ tpl ( tpl .Values.images.adapter_simulated_olt.tag . ) . }} |
David Bainbridge | cd30e54 | 2019-05-31 20:52:56 +0000 | [diff] [blame] | 65 | imagePullPolicy: {{ tpl .Values.images.adapter_simulated_olt.pullPolicy . }} |
David Bainbridge | 2f9b76f | 2019-05-15 13:48:11 -0700 | [diff] [blame] | 66 | args: |
| 67 | - "/app/simulated_olt" |
David Bainbridge | cd30e54 | 2019-05-31 20:52:56 +0000 | [diff] [blame] | 68 | - "-kafka_adapter_host={{ .Values.services.kafka.adapter.service }}" |
| 69 | - "-kafka_adapter_port={{ .Values.services.kafka.adapter.port }}" |
| 70 | - "-kafka_cluster_host={{ .Values.services.kafka.cluster.service }}" |
| 71 | - "-kafka_cluster_port={{ .Values.services.kafka.cluster.port }}" |
| 72 | - "-kv_store_host={{ .Values.services.etcd.service }}" |
| 73 | - "-kv_store_port={{ .Values.services.etcd.port }}" |
David Bainbridge | 2f9b76f | 2019-05-15 13:48:11 -0700 | [diff] [blame] | 74 | - "-core_topic=rwcore" |
| 75 | - "-simulator_topic=simulated_olt" |
David Bainbridge | eb3e858 | 2019-07-31 20:42:31 +0000 | [diff] [blame] | 76 | - "-onu_number={{ .Values.onus_per_pon_port }}" |
David Bainbridge | 2f9b76f | 2019-05-15 13:48:11 -0700 | [diff] [blame] | 77 | --- |
| 78 | apiVersion: apps/v1 |
| 79 | kind: Deployment |
| 80 | metadata: |
| 81 | name: adapter-simulated-onu |
| 82 | namespace: {{ .Release.Namespace }} |
David Bainbridge | 534a73d | 2019-08-30 18:57:23 +0000 | [diff] [blame^] | 83 | {{- if or (hasKey .Values "extra_deployment_labels") (hasKey .Values "simonu_deployment_labels") }} |
| 84 | labels: |
| 85 | {{- if hasKey .Values "extra_deployment_labels" }} |
| 86 | {{- range $key, $val := .Values.extra_deployment_labels }} |
| 87 | {{ $key }}: {{ $val | quote }} |
| 88 | {{- end }} |
| 89 | {{- end }} |
| 90 | {{- if hasKey .Values "simonu_deployment_labels" }} |
| 91 | {{- range $key, $val := .Values.simonu_deployment_labels }} |
| 92 | {{ $key }}: {{ $val | quote }} |
| 93 | {{- end }} |
| 94 | {{- end }} |
| 95 | {{- end }} |
David Bainbridge | 2f9b76f | 2019-05-15 13:48:11 -0700 | [diff] [blame] | 96 | spec: |
| 97 | replicas: {{ .Values.replicas.adapter_simulated_onu }} |
| 98 | selector: |
| 99 | matchLabels: |
| 100 | app: adapter-simulated-onu |
| 101 | template: |
| 102 | metadata: |
| 103 | labels: |
| 104 | app: adapter-simulated-onu |
David Bainbridge | 1f88804 | 2019-06-24 18:02:01 +0000 | [diff] [blame] | 105 | app.kubernetes.io/name: "adapter-simulated-onu" |
| 106 | app.kubernetes.io/version: {{ quote .Chart.AppVersion }} |
| 107 | app.kubernetes.io/component: "adapter" |
| 108 | app.kubernetes.io/part-of: "voltha" |
| 109 | app.kubernetes.io/managed-by: {{ quote .Release.Service }} |
| 110 | helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" |
David Bainbridge | 534a73d | 2019-08-30 18:57:23 +0000 | [diff] [blame^] | 111 | {{- if hasKey .Values "extra_pod_labels" }} |
| 112 | {{- range $key, $val := .Values.extra_pod_labels }} |
| 113 | {{ $key }}: {{ $val | quote }} |
| 114 | {{- end }} |
| 115 | {{- end }} |
| 116 | {{- if hasKey .Values "simonu_pod_labels" }} |
| 117 | {{- range $key, $val := .Values.simonu_pod_labels }} |
| 118 | {{ $key }}: {{ $val | quote }} |
| 119 | {{- end }} |
| 120 | {{- end }} |
David Bainbridge | 2f9b76f | 2019-05-15 13:48:11 -0700 | [diff] [blame] | 121 | annotations: |
| 122 | cni: "calico" |
| 123 | spec: |
| 124 | containers: |
| 125 | - name: adapter-simulated-onu |
David Bainbridge | 5cb5d17 | 2019-07-24 02:30:19 +0000 | [diff] [blame] | 126 | image: {{ tpl .Values.images.adapter_simulated_onu.registry . }}{{ tpl .Values.images.adapter_simulated_onu.repository . }}:{{ tpl ( tpl .Values.images.adapter_simulated_onu.tag . ) . }} |
David Bainbridge | cd30e54 | 2019-05-31 20:52:56 +0000 | [diff] [blame] | 127 | imagePullPolicy: {{ tpl .Values.images.adapter_simulated_onu.pullPolicy . }} |
David Bainbridge | 2f9b76f | 2019-05-15 13:48:11 -0700 | [diff] [blame] | 128 | args: |
| 129 | - "/app/simulated_onu" |
David Bainbridge | cd30e54 | 2019-05-31 20:52:56 +0000 | [diff] [blame] | 130 | - "-kafka_adapter_host={{ .Values.services.kafka.adapter.service }}" |
| 131 | - "-kafka_adapter_port={{ .Values.services.kafka.adapter.port }}" |
| 132 | - "-kafka_cluster_host={{ .Values.services.kafka.cluster.service }}" |
| 133 | - "-kafka_cluster_port={{ .Values.services.kafka.cluster.port }}" |
| 134 | - "-kv_store_host={{ .Values.services.etcd.service }}" |
| 135 | - "-kv_store_port={{ .Values.services.etcd.port }}" |
David Bainbridge | 2f9b76f | 2019-05-15 13:48:11 -0700 | [diff] [blame] | 136 | - "-core_topic=rwcore" |
David Bainbridge | 2f9b76f | 2019-05-15 13:48:11 -0700 | [diff] [blame] | 137 | - "-simulator_topic=simulated_onu" |