blob: fab2f2dff25e7a876184a84802371bbe4fcba2a2 [file] [log] [blame]
Joey Armstrong084e4472024-02-10 18:03:13 -05001# Copyright 2022-2024 Open Networking Foundation (ONF) and the ONF Contributors
Tinoj Josephdd1fd9d2022-08-01 23:59:26 +05302#
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:
18 name: "{{ .Chart.Name }}"
abhayk0d1cf562025-01-11 13:59:15 +053019 namespace: "{{ .Release.Namespace }}"
Tinoj Josephdd1fd9d2022-08-01 23:59:26 +053020 labels:
21 release: {{ .Release.Name }}
22spec:
23 replicas: {{ .Values.replicaCount }}
24 selector:
25 matchLabels:
26 app: "{{ .Chart.Name }}"
27 template:
28 metadata:
29 labels:
30 app: "{{ .Chart.Name }}"
31 spec:
abhayk9f58b112025-01-11 00:08:02 +053032 {{- if .Values.securityContext.enabled }}
33 securityContext:
34 runAsUser: {{ .Values.securityContext.runAsUser }}
35 runAsGroup: {{ .Values.securityContext.runAsGroup }}
36 fsGroup: {{ .Values.securityContext.fsGroup }}
37 {{- end }}
Tinoj Josephdd1fd9d2022-08-01 23:59:26 +053038 containers:
abhay4a45cc82025-01-10 21:32:07 +053039 - args:
40 - "/app/voltha-go-controller"
41 env:
Tinoj Josephdd1fd9d2022-08-01 23:59:26 +053042 - name: POD_IP
43 valueFrom:
44 fieldRef:
45 fieldPath: status.podIP
46 - name: NAMESPACE
abhayk0d1cf562025-01-11 13:59:15 +053047 value: {{ .Release.Namespace }}
Tinoj Josephdd1fd9d2022-08-01 23:59:26 +053048 - name: VOLTHA_HOST
abhayk0d1cf562025-01-11 13:59:15 +053049 value: "{{ .Release.Namespace }}-voltha-api.{{ .Release.Namespace }}.svc.cluster.local"
Tinoj Josephdd1fd9d2022-08-01 23:59:26 +053050 - name: VOLTHA_PORT
51 value: "55555"
52 - name: KV_STORE_TYPE
abhaycd295062024-12-12 11:05:07 +053053 value: "{{ .Values.services.kvstore.type }}"
Tinoj Josephdd1fd9d2022-08-01 23:59:26 +053054 - name: KV_STORE_HOST
abhaycd295062024-12-12 11:05:07 +053055 value: "{{ .Values.services.kvstore.address }}"
Tinoj Josephdd1fd9d2022-08-01 23:59:26 +053056 - name: KV_STORE_PORT
abhaycd295062024-12-12 11:05:07 +053057 value: "{{ .Values.services.kvstore.port }}"
Tinoj Josephdd1fd9d2022-08-01 23:59:26 +053058 - name: KAFKA_ADAPTER_HOST
Akash Sonia02e9982022-12-09 10:11:41 +053059 value: "{{ tpl .Values.services.kafka.cluster.address . }}"
Tinoj Josephdd1fd9d2022-08-01 23:59:26 +053060 - name: KAFKA_ADAPTER_PORT
61 value: "9092"
62 - name: LOG_LEVEL
abhayk0d1cf562025-01-11 13:59:15 +053063 value: "{{ .Values.global.log_level }}"
abhay4a45cc82025-01-10 21:32:07 +053064 - name: KV_STORE_TIMEOUT
65 value: "3000000000"
66 - name: DEVICE_SYNC_DURATION
67 value: "10"
68 - name: MAX_FLOW_RETRY_DURATION
69 value: "60"
70 - name: LIVE_PROBE_INTERVAL
71 value: "60"
72 - name: NOT_LIVE_PROBE_INTERVAL
73 value: "5"
74 name: voltha-go-controller
Tinoj Josephdd1fd9d2022-08-01 23:59:26 +053075 image: '{{ tpl .Values.images.voltha_go_controller.registry . }}{{ tpl .Values.images.voltha_go_controller.repository . }}:{{ tpl ( tpl .Values.images.voltha_go_controller.tag . ) . }}'
76 imagePullPolicy: {{ tpl .Values.images.voltha_go_controller.pullPolicy . }}
abhayk9f58b112025-01-11 00:08:02 +053077 {{- if .Values.securityContext.enabled }}
abhay4a45cc82025-01-10 21:32:07 +053078 securityContext:
abhayk9f58b112025-01-11 00:08:02 +053079 allowPrivilegeEscalation: false
80 {{- end }}
Tinoj Josephdd1fd9d2022-08-01 23:59:26 +053081 ports:
82 - containerPort: {{ .Values.voltha_go_controller.sshPort }}
83 name: ssh-port
84 - containerPort: {{ .Values.voltha_go_controller.uiPort }}
85 name: ui-port
86 protocol: "{{ .Values.voltha_go_controller.uiProtocol }}"
abhay4a45cc82025-01-10 21:32:07 +053087 livenessProbe:
88 httpGet:
89 path: /healthz
90 port: 8090
91 initialDelaySeconds: {{ .Values.probe.liveness.initial_delay_seconds }}
92 periodSeconds: {{ .Values.probe.liveness.period_seconds }}
93 readinessProbe:
94 httpGet:
95 path: /readz
96 port: 8090
97 initialDelaySeconds: {{ .Values.probe.readiness.initial_delay_seconds }}
98 periodSeconds: {{ .Values.probe.readiness.period_seconds }}
99 resources:
100 requests:
101 {{- if .Values.resources.requests.memory }}
102 memory: {{ .Values.resources.requests.memory }}
103 {{- end }}
104 {{- if .Values.resources.requests.cpu }}
105 cpu: {{ .Values.resources.requests.cpu }}
106 {{- end }}
107 limits:
108 {{- if .Values.resources.limits.memory }}
109 memory: {{ .Values.resources.limits.memory }}
110 {{- end }}
111 {{- if .Values.resources.limits.cpu }}
112 cpu: {{ .Values.resources.limits.cpu }}
113 {{- end }}
Tinoj Josephdd1fd9d2022-08-01 23:59:26 +0530114 restartPolicy: "Always"