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 | 03706e6 | 2019-10-18 17:59:24 +0000 | [diff] [blame] | 64 | image: '{{ tpl .Values.images.adapter_simulated_olt.registry . }}{{ tpl .Values.images.adapter_simulated_olt.repository . }}:{{ 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 }}" |
Vignesh Ethiraj | 95fa34d | 2019-10-15 10:21:06 +0000 | [diff] [blame] | 77 | - "-probe_port=8080" |
| 78 | livenessProbe: |
| 79 | httpGet: |
| 80 | path: /healthz |
| 81 | port: 8080 |
| 82 | initialDelaySeconds: 10 |
| 83 | periodSeconds: 5 |
| 84 | readinessProbe: |
| 85 | httpGet: |
| 86 | path: /readz |
| 87 | port: 8080 |
| 88 | initialDelaySeconds: 10 |
| 89 | periodSeconds: 5 |
| 90 | |
David Bainbridge | 2f9b76f | 2019-05-15 13:48:11 -0700 | [diff] [blame] | 91 | --- |
| 92 | apiVersion: apps/v1 |
| 93 | kind: Deployment |
| 94 | metadata: |
| 95 | name: adapter-simulated-onu |
| 96 | namespace: {{ .Release.Namespace }} |
David Bainbridge | 534a73d | 2019-08-30 18:57:23 +0000 | [diff] [blame] | 97 | {{- if or (hasKey .Values "extra_deployment_labels") (hasKey .Values "simonu_deployment_labels") }} |
| 98 | labels: |
| 99 | {{- if hasKey .Values "extra_deployment_labels" }} |
| 100 | {{- range $key, $val := .Values.extra_deployment_labels }} |
| 101 | {{ $key }}: {{ $val | quote }} |
| 102 | {{- end }} |
| 103 | {{- end }} |
| 104 | {{- if hasKey .Values "simonu_deployment_labels" }} |
| 105 | {{- range $key, $val := .Values.simonu_deployment_labels }} |
| 106 | {{ $key }}: {{ $val | quote }} |
| 107 | {{- end }} |
| 108 | {{- end }} |
| 109 | {{- end }} |
David Bainbridge | 2f9b76f | 2019-05-15 13:48:11 -0700 | [diff] [blame] | 110 | spec: |
| 111 | replicas: {{ .Values.replicas.adapter_simulated_onu }} |
| 112 | selector: |
| 113 | matchLabels: |
| 114 | app: adapter-simulated-onu |
| 115 | template: |
| 116 | metadata: |
| 117 | labels: |
| 118 | app: adapter-simulated-onu |
David Bainbridge | 1f88804 | 2019-06-24 18:02:01 +0000 | [diff] [blame] | 119 | app.kubernetes.io/name: "adapter-simulated-onu" |
| 120 | app.kubernetes.io/version: {{ quote .Chart.AppVersion }} |
| 121 | app.kubernetes.io/component: "adapter" |
| 122 | app.kubernetes.io/part-of: "voltha" |
| 123 | app.kubernetes.io/managed-by: {{ quote .Release.Service }} |
| 124 | helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" |
David Bainbridge | 534a73d | 2019-08-30 18:57:23 +0000 | [diff] [blame] | 125 | {{- if hasKey .Values "extra_pod_labels" }} |
| 126 | {{- range $key, $val := .Values.extra_pod_labels }} |
| 127 | {{ $key }}: {{ $val | quote }} |
| 128 | {{- end }} |
| 129 | {{- end }} |
| 130 | {{- if hasKey .Values "simonu_pod_labels" }} |
| 131 | {{- range $key, $val := .Values.simonu_pod_labels }} |
| 132 | {{ $key }}: {{ $val | quote }} |
| 133 | {{- end }} |
| 134 | {{- end }} |
David Bainbridge | 2f9b76f | 2019-05-15 13:48:11 -0700 | [diff] [blame] | 135 | annotations: |
| 136 | cni: "calico" |
| 137 | spec: |
| 138 | containers: |
| 139 | - name: adapter-simulated-onu |
David Bainbridge | 03706e6 | 2019-10-18 17:59:24 +0000 | [diff] [blame] | 140 | image: '{{ tpl .Values.images.adapter_simulated_onu.registry . }}{{ tpl .Values.images.adapter_simulated_onu.repository . }}:{{ tpl .Values.images.adapter_simulated_onu.tag . }}' |
David Bainbridge | cd30e54 | 2019-05-31 20:52:56 +0000 | [diff] [blame] | 141 | imagePullPolicy: {{ tpl .Values.images.adapter_simulated_onu.pullPolicy . }} |
David Bainbridge | 2f9b76f | 2019-05-15 13:48:11 -0700 | [diff] [blame] | 142 | args: |
| 143 | - "/app/simulated_onu" |
David Bainbridge | cd30e54 | 2019-05-31 20:52:56 +0000 | [diff] [blame] | 144 | - "-kafka_adapter_host={{ .Values.services.kafka.adapter.service }}" |
| 145 | - "-kafka_adapter_port={{ .Values.services.kafka.adapter.port }}" |
| 146 | - "-kafka_cluster_host={{ .Values.services.kafka.cluster.service }}" |
| 147 | - "-kafka_cluster_port={{ .Values.services.kafka.cluster.port }}" |
| 148 | - "-kv_store_host={{ .Values.services.etcd.service }}" |
| 149 | - "-kv_store_port={{ .Values.services.etcd.port }}" |
David Bainbridge | 2f9b76f | 2019-05-15 13:48:11 -0700 | [diff] [blame] | 150 | - "-core_topic=rwcore" |
David Bainbridge | 2f9b76f | 2019-05-15 13:48:11 -0700 | [diff] [blame] | 151 | - "-simulator_topic=simulated_onu" |
Vignesh Ethiraj | 95fa34d | 2019-10-15 10:21:06 +0000 | [diff] [blame] | 152 | - "-probe_port=8080" |
| 153 | livenessProbe: |
| 154 | httpGet: |
| 155 | path: /healthz |
| 156 | port: 8080 |
| 157 | initialDelaySeconds: 10 |
| 158 | periodSeconds: 5 |
| 159 | readinessProbe: |
| 160 | httpGet: |
| 161 | path: /readz |
| 162 | port: 8080 |
| 163 | initialDelaySeconds: 10 |
| 164 | periodSeconds: 5 |