blob: 0e2ffa08709a51cd4c65a4bf28baf2abdc8f6370 [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 }}"
19 labels:
20 release: {{ .Release.Name }}
21spec:
22 replicas: {{ .Values.replicaCount }}
23 selector:
24 matchLabels:
25 app: "{{ .Chart.Name }}"
26 template:
27 metadata:
28 labels:
29 app: "{{ .Chart.Name }}"
30 spec:
31 containers:
abhay4a45cc82025-01-10 21:32:07 +053032 - args:
33 - "/app/voltha-go-controller"
34 env:
Tinoj Josephdd1fd9d2022-08-01 23:59:26 +053035 - name: POD_IP
36 valueFrom:
37 fieldRef:
38 fieldPath: status.podIP
39 - name: NAMESPACE
40 valueFrom:
41 fieldRef:
42 fieldPath: metadata.namespace
43 - name: VOLTHA_HOST
44 value: "$(NAMESPACE)-voltha-api.$(NAMESPACE).svc.cluster.local"
45 - name: VOLTHA_PORT
46 value: "55555"
47 - name: KV_STORE_TYPE
abhaycd295062024-12-12 11:05:07 +053048 value: "{{ .Values.services.kvstore.type }}"
Tinoj Josephdd1fd9d2022-08-01 23:59:26 +053049 - name: KV_STORE_HOST
abhaycd295062024-12-12 11:05:07 +053050 value: "{{ .Values.services.kvstore.address }}"
Tinoj Josephdd1fd9d2022-08-01 23:59:26 +053051 - name: KV_STORE_PORT
abhaycd295062024-12-12 11:05:07 +053052 value: "{{ .Values.services.kvstore.port }}"
Tinoj Josephdd1fd9d2022-08-01 23:59:26 +053053 - name: KAFKA_ADAPTER_HOST
Akash Sonia02e9982022-12-09 10:11:41 +053054 value: "{{ tpl .Values.services.kafka.cluster.address . }}"
Tinoj Josephdd1fd9d2022-08-01 23:59:26 +053055 - name: KAFKA_ADAPTER_PORT
56 value: "9092"
57 - name: LOG_LEVEL
58 value: .Values.global.log_level
abhay4a45cc82025-01-10 21:32:07 +053059 - name: KV_STORE_TIMEOUT
60 value: "3000000000"
61 - name: DEVICE_SYNC_DURATION
62 value: "10"
63 - name: MAX_FLOW_RETRY_DURATION
64 value: "60"
65 - name: LIVE_PROBE_INTERVAL
66 value: "60"
67 - name: NOT_LIVE_PROBE_INTERVAL
68 value: "5"
69 name: voltha-go-controller
Tinoj Josephdd1fd9d2022-08-01 23:59:26 +053070 image: '{{ tpl .Values.images.voltha_go_controller.registry . }}{{ tpl .Values.images.voltha_go_controller.repository . }}:{{ tpl ( tpl .Values.images.voltha_go_controller.tag . ) . }}'
71 imagePullPolicy: {{ tpl .Values.images.voltha_go_controller.pullPolicy . }}
abhay4a45cc82025-01-10 21:32:07 +053072 securityContext:
73 runAsUser: {{ .Values.securityContext.runAsUser }}
74 runAsGroup: {{ .Values.securityContext.runAsGroup }}
75 fsGroup: {{ .Values.securityContext.fsGroup }}
Tinoj Josephdd1fd9d2022-08-01 23:59:26 +053076 ports:
77 - containerPort: {{ .Values.voltha_go_controller.sshPort }}
78 name: ssh-port
79 - containerPort: {{ .Values.voltha_go_controller.uiPort }}
80 name: ui-port
81 protocol: "{{ .Values.voltha_go_controller.uiProtocol }}"
abhay4a45cc82025-01-10 21:32:07 +053082 livenessProbe:
83 httpGet:
84 path: /healthz
85 port: 8090
86 initialDelaySeconds: {{ .Values.probe.liveness.initial_delay_seconds }}
87 periodSeconds: {{ .Values.probe.liveness.period_seconds }}
88 readinessProbe:
89 httpGet:
90 path: /readz
91 port: 8090
92 initialDelaySeconds: {{ .Values.probe.readiness.initial_delay_seconds }}
93 periodSeconds: {{ .Values.probe.readiness.period_seconds }}
94 resources:
95 requests:
96 {{- if .Values.resources.requests.memory }}
97 memory: {{ .Values.resources.requests.memory }}
98 {{- end }}
99 {{- if .Values.resources.requests.cpu }}
100 cpu: {{ .Values.resources.requests.cpu }}
101 {{- end }}
102 limits:
103 {{- if .Values.resources.limits.memory }}
104 memory: {{ .Values.resources.limits.memory }}
105 {{- end }}
106 {{- if .Values.resources.limits.cpu }}
107 cpu: {{ .Values.resources.limits.cpu }}
108 {{- end }}
Tinoj Josephdd1fd9d2022-08-01 23:59:26 +0530109 restartPolicy: "Always"