blob: 4012c2091bcfe9cc0e36cae57ea40bf202c2ddc1 [file] [log] [blame]
David Bainbridge2f9b76f2019-05-15 13:48:11 -07001# 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 Bainbridge2f9b76f2019-05-15 13:48:11 -070016apiVersion: apps/v1
17kind: Deployment
18metadata:
19 name: adapter-simulated-olt
20 namespace: {{ .Release.Namespace }}
David Bainbridge534a73d2019-08-30 18:57:23 +000021 {{- 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 Bainbridge2f9b76f2019-05-15 13:48:11 -070034spec:
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 Bainbridge1f888042019-06-24 18:02:01 +000043 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 Bainbridge534a73d2019-08-30 18:57:23 +000049 {{- 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 Bainbridge2f9b76f2019-05-15 13:48:11 -070059 annotations:
60 cni: "calico"
61 spec:
62 containers:
63 - name: adapter-simulated-olt
David Bainbridge5cb5d172019-07-24 02:30:19 +000064 image: {{ tpl .Values.images.adapter_simulated_olt.registry . }}{{ tpl .Values.images.adapter_simulated_olt.repository . }}:{{ tpl ( tpl .Values.images.adapter_simulated_olt.tag . ) . }}
David Bainbridgecd30e542019-05-31 20:52:56 +000065 imagePullPolicy: {{ tpl .Values.images.adapter_simulated_olt.pullPolicy . }}
David Bainbridge2f9b76f2019-05-15 13:48:11 -070066 args:
67 - "/app/simulated_olt"
David Bainbridgecd30e542019-05-31 20:52:56 +000068 - "-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 Bainbridge2f9b76f2019-05-15 13:48:11 -070074 - "-core_topic=rwcore"
75 - "-simulator_topic=simulated_olt"
David Bainbridgeeb3e8582019-07-31 20:42:31 +000076 - "-onu_number={{ .Values.onus_per_pon_port }}"
David Bainbridge2f9b76f2019-05-15 13:48:11 -070077---
78apiVersion: apps/v1
79kind: Deployment
80metadata:
81 name: adapter-simulated-onu
82 namespace: {{ .Release.Namespace }}
David Bainbridge534a73d2019-08-30 18:57:23 +000083 {{- 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 Bainbridge2f9b76f2019-05-15 13:48:11 -070096spec:
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 Bainbridge1f888042019-06-24 18:02:01 +0000105 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 Bainbridge534a73d2019-08-30 18:57:23 +0000111 {{- 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 Bainbridge2f9b76f2019-05-15 13:48:11 -0700121 annotations:
122 cni: "calico"
123 spec:
124 containers:
125 - name: adapter-simulated-onu
David Bainbridge5cb5d172019-07-24 02:30:19 +0000126 image: {{ tpl .Values.images.adapter_simulated_onu.registry . }}{{ tpl .Values.images.adapter_simulated_onu.repository . }}:{{ tpl ( tpl .Values.images.adapter_simulated_onu.tag . ) . }}
David Bainbridgecd30e542019-05-31 20:52:56 +0000127 imagePullPolicy: {{ tpl .Values.images.adapter_simulated_onu.pullPolicy . }}
David Bainbridge2f9b76f2019-05-15 13:48:11 -0700128 args:
129 - "/app/simulated_onu"
David Bainbridgecd30e542019-05-31 20:52:56 +0000130 - "-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 Bainbridge2f9b76f2019-05-15 13:48:11 -0700136 - "-core_topic=rwcore"
David Bainbridge2f9b76f2019-05-15 13:48:11 -0700137 - "-simulator_topic=simulated_onu"