blob: 830c2a5d093e8c3d9718f3c54b6aeef151e40bea [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 Bainbridge03706e62019-10-18 17:59:24 +000064 image: '{{ tpl .Values.images.adapter_simulated_olt.registry . }}{{ tpl .Values.images.adapter_simulated_olt.repository . }}:{{ 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 }}"
Vignesh Ethiraj95fa34d2019-10-15 10:21:06 +000077 - "-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 Bainbridge2f9b76f2019-05-15 13:48:11 -070091---
92apiVersion: apps/v1
93kind: Deployment
94metadata:
95 name: adapter-simulated-onu
96 namespace: {{ .Release.Namespace }}
David Bainbridge534a73d2019-08-30 18:57:23 +000097 {{- 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 Bainbridge2f9b76f2019-05-15 13:48:11 -0700110spec:
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 Bainbridge1f888042019-06-24 18:02:01 +0000119 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 Bainbridge534a73d2019-08-30 18:57:23 +0000125 {{- 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 Bainbridge2f9b76f2019-05-15 13:48:11 -0700135 annotations:
136 cni: "calico"
137 spec:
138 containers:
139 - name: adapter-simulated-onu
David Bainbridge03706e62019-10-18 17:59:24 +0000140 image: '{{ tpl .Values.images.adapter_simulated_onu.registry . }}{{ tpl .Values.images.adapter_simulated_onu.repository . }}:{{ tpl .Values.images.adapter_simulated_onu.tag . }}'
David Bainbridgecd30e542019-05-31 20:52:56 +0000141 imagePullPolicy: {{ tpl .Values.images.adapter_simulated_onu.pullPolicy . }}
David Bainbridge2f9b76f2019-05-15 13:48:11 -0700142 args:
143 - "/app/simulated_onu"
David Bainbridgecd30e542019-05-31 20:52:56 +0000144 - "-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 Bainbridge2f9b76f2019-05-15 13:48:11 -0700150 - "-core_topic=rwcore"
David Bainbridge2f9b76f2019-05-15 13:48:11 -0700151 - "-simulator_topic=simulated_onu"
Vignesh Ethiraj95fa34d2019-10-15 10:21:06 +0000152 - "-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