blob: 3fc8cb49ca2316100bc97305dbbd40f39eeb5e17 [file] [log] [blame]
David Bainbridge8595b3b2020-06-05 12:23:05 -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---
15apiVersion: apps/v1
16kind: Deployment
17metadata:
David Bainbridge2bdd4302020-06-09 17:13:18 -070018 name: "{{ template "fullname" . }}-onu"
David Bainbridge8595b3b2020-06-05 12:23:05 -070019 namespace: {{ .Release.Namespace }}
20 {{- if or (hasKey .Values "extra_deployment_labels") (hasKey .Values "simonu_deployment_labels") }}
21 labels:
22 {{- if hasKey .Values "extra_deployment_labels" }}
23 {{- range $key, $val := .Values.extra_deployment_labels }}
24 {{ $key }}: {{ $val | quote }}
25 {{- end }}
26 {{- end }}
27 {{- if hasKey .Values "simonu_deployment_labels" }}
28 {{- range $key, $val := .Values.simonu_deployment_labels }}
29 {{ $key }}: {{ $val | quote }}
30 {{- end }}
31 {{- end }}
32 {{- end }}
33spec:
34 replicas: {{ .Values.replicas.adapter_simulated_onu }}
35 selector:
36 matchLabels:
37 app: adapter-simulated-onu
38 release: {{ .Release.Name }}
39 template:
40 metadata:
41 namespace: {{ .Release.Namespace }}
42 labels:
43 app: adapter-simulated-onu
44 release: {{ .Release.Name }}
45 app.kubernetes.io/name: "adapter-simulated-onu"
46 app.kubernetes.io/version: {{ quote .Chart.AppVersion }}
47 app.kubernetes.io/component: "adapter"
48 app.kubernetes.io/part-of: "voltha"
49 app.kubernetes.io/managed-by: {{ quote .Release.Service }}
50 helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
51 {{- if hasKey .Values "extra_pod_labels" }}
52 {{- range $key, $val := .Values.extra_pod_labels }}
53 {{ $key }}: {{ $val | quote }}
54 {{- end }}
55 {{- end }}
56 {{- if hasKey .Values "simonu_pod_labels" }}
57 {{- range $key, $val := .Values.simonu_pod_labels }}
58 {{ $key }}: {{ $val | quote }}
59 {{- end }}
60 {{- end }}
61 spec:
62 {{- if .Values.securityContext.enabled }}
63 securityContext:
64 runAsUser: {{ .Values.securityContext.runAsUser }}
65 runAsGroup: {{ .Values.securityContext.runAsGroup }}
66 fsGroup: {{ .Values.securityContext.fsGroup }}
67 {{- end }}
68 containers:
69 - name: adapter-simulated-onu
70 image: '{{ tpl .Values.images.adapter_simulated_onu.registry . }}{{ tpl .Values.images.adapter_simulated_onu.repository . }}:{{ tpl .Values.images.adapter_simulated_onu.tag . }}'
71 imagePullPolicy: {{ tpl .Values.images.adapter_simulated_onu.pullPolicy . }}
72 args:
73 - "/app/simulated_onu"
74 - "-kafka_adapter_host={{ .Values.services.kafka.adapter.service }}"
75 - "-kafka_adapter_port={{ .Values.services.kafka.adapter.port }}"
76 - "-kafka_cluster_host={{ .Values.services.kafka.cluster.service }}"
77 - "-kafka_cluster_port={{ .Values.services.kafka.cluster.port }}"
78 - "-kv_store_host={{ .Values.services.etcd.service }}"
79 - "-kv_store_port={{ .Values.services.etcd.port }}"
80 - "-core_topic=rwcore"
81 - "-simulator_topic=simulated_onu"
82 - "-probe_port=8080"
83 livenessProbe:
84 httpGet:
85 path: /healthz
86 port: 8080
87 initialDelaySeconds: 10
88 periodSeconds: 5
89 readinessProbe:
90 httpGet:
91 path: /readz
92 port: 8080
93 initialDelaySeconds: 10
94 periodSeconds: 5