Joey Armstrong | 084e447 | 2024-02-10 18:03:13 -0500 | [diff] [blame] | 1 | # Copyright 2022-2024 Open Networking Foundation (ONF) and the ONF Contributors |
Tinoj Joseph | dd1fd9d | 2022-08-01 23:59:26 +0530 | [diff] [blame] | 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 | apiVersion: apps/v1 |
| 16 | kind: Deployment |
| 17 | metadata: |
| 18 | name: "{{ .Chart.Name }}" |
abhayk | 0d1cf56 | 2025-01-11 13:59:15 +0530 | [diff] [blame] | 19 | namespace: "{{ .Release.Namespace }}" |
Tinoj Joseph | dd1fd9d | 2022-08-01 23:59:26 +0530 | [diff] [blame] | 20 | labels: |
| 21 | release: {{ .Release.Name }} |
| 22 | spec: |
| 23 | replicas: {{ .Values.replicaCount }} |
| 24 | selector: |
| 25 | matchLabels: |
| 26 | app: "{{ .Chart.Name }}" |
| 27 | template: |
| 28 | metadata: |
| 29 | labels: |
| 30 | app: "{{ .Chart.Name }}" |
| 31 | spec: |
abhayk | 9f58b11 | 2025-01-11 00:08:02 +0530 | [diff] [blame] | 32 | {{- if .Values.securityContext.enabled }} |
| 33 | securityContext: |
| 34 | runAsUser: {{ .Values.securityContext.runAsUser }} |
| 35 | runAsGroup: {{ .Values.securityContext.runAsGroup }} |
| 36 | fsGroup: {{ .Values.securityContext.fsGroup }} |
| 37 | {{- end }} |
Tinoj Joseph | dd1fd9d | 2022-08-01 23:59:26 +0530 | [diff] [blame] | 38 | containers: |
abhay | 4a45cc8 | 2025-01-10 21:32:07 +0530 | [diff] [blame] | 39 | - args: |
| 40 | - "/app/voltha-go-controller" |
| 41 | env: |
Tinoj Joseph | dd1fd9d | 2022-08-01 23:59:26 +0530 | [diff] [blame] | 42 | - name: POD_IP |
| 43 | valueFrom: |
| 44 | fieldRef: |
| 45 | fieldPath: status.podIP |
| 46 | - name: NAMESPACE |
abhayk | 0d1cf56 | 2025-01-11 13:59:15 +0530 | [diff] [blame] | 47 | value: {{ .Release.Namespace }} |
Tinoj Joseph | dd1fd9d | 2022-08-01 23:59:26 +0530 | [diff] [blame] | 48 | - name: VOLTHA_HOST |
abhayk | 0d1cf56 | 2025-01-11 13:59:15 +0530 | [diff] [blame] | 49 | value: "{{ .Release.Namespace }}-voltha-api.{{ .Release.Namespace }}.svc.cluster.local" |
Tinoj Joseph | dd1fd9d | 2022-08-01 23:59:26 +0530 | [diff] [blame] | 50 | - name: VOLTHA_PORT |
| 51 | value: "55555" |
| 52 | - name: KV_STORE_TYPE |
abhay | cd29506 | 2024-12-12 11:05:07 +0530 | [diff] [blame] | 53 | value: "{{ .Values.services.kvstore.type }}" |
Tinoj Joseph | dd1fd9d | 2022-08-01 23:59:26 +0530 | [diff] [blame] | 54 | - name: KV_STORE_HOST |
abhay | cd29506 | 2024-12-12 11:05:07 +0530 | [diff] [blame] | 55 | value: "{{ .Values.services.kvstore.address }}" |
Tinoj Joseph | dd1fd9d | 2022-08-01 23:59:26 +0530 | [diff] [blame] | 56 | - name: KV_STORE_PORT |
abhay | cd29506 | 2024-12-12 11:05:07 +0530 | [diff] [blame] | 57 | value: "{{ .Values.services.kvstore.port }}" |
Tinoj Joseph | dd1fd9d | 2022-08-01 23:59:26 +0530 | [diff] [blame] | 58 | - name: KAFKA_ADAPTER_HOST |
Akash Soni | a02e998 | 2022-12-09 10:11:41 +0530 | [diff] [blame] | 59 | value: "{{ tpl .Values.services.kafka.cluster.address . }}" |
Tinoj Joseph | dd1fd9d | 2022-08-01 23:59:26 +0530 | [diff] [blame] | 60 | - name: KAFKA_ADAPTER_PORT |
| 61 | value: "9092" |
| 62 | - name: LOG_LEVEL |
abhayk | 0d1cf56 | 2025-01-11 13:59:15 +0530 | [diff] [blame] | 63 | value: "{{ .Values.global.log_level }}" |
abhay | 4a45cc8 | 2025-01-10 21:32:07 +0530 | [diff] [blame] | 64 | - 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 Joseph | dd1fd9d | 2022-08-01 23:59:26 +0530 | [diff] [blame] | 75 | 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 . }} |
abhayk | 9f58b11 | 2025-01-11 00:08:02 +0530 | [diff] [blame] | 77 | {{- if .Values.securityContext.enabled }} |
abhay | 4a45cc8 | 2025-01-10 21:32:07 +0530 | [diff] [blame] | 78 | securityContext: |
abhayk | 9f58b11 | 2025-01-11 00:08:02 +0530 | [diff] [blame] | 79 | allowPrivilegeEscalation: false |
| 80 | {{- end }} |
Tinoj Joseph | dd1fd9d | 2022-08-01 23:59:26 +0530 | [diff] [blame] | 81 | 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 }}" |
abhay | 4a45cc8 | 2025-01-10 21:32:07 +0530 | [diff] [blame] | 87 | 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 Joseph | dd1fd9d | 2022-08-01 23:59:26 +0530 | [diff] [blame] | 114 | restartPolicy: "Always" |