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 }}" |
| 19 | labels: |
| 20 | release: {{ .Release.Name }} |
| 21 | spec: |
| 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: |
abhay | 4a45cc8 | 2025-01-10 21:32:07 +0530 | [diff] [blame^] | 32 | - args: |
| 33 | - "/app/voltha-go-controller" |
| 34 | env: |
Tinoj Joseph | dd1fd9d | 2022-08-01 23:59:26 +0530 | [diff] [blame] | 35 | - 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 |
abhay | cd29506 | 2024-12-12 11:05:07 +0530 | [diff] [blame] | 48 | value: "{{ .Values.services.kvstore.type }}" |
Tinoj Joseph | dd1fd9d | 2022-08-01 23:59:26 +0530 | [diff] [blame] | 49 | - name: KV_STORE_HOST |
abhay | cd29506 | 2024-12-12 11:05:07 +0530 | [diff] [blame] | 50 | value: "{{ .Values.services.kvstore.address }}" |
Tinoj Joseph | dd1fd9d | 2022-08-01 23:59:26 +0530 | [diff] [blame] | 51 | - name: KV_STORE_PORT |
abhay | cd29506 | 2024-12-12 11:05:07 +0530 | [diff] [blame] | 52 | value: "{{ .Values.services.kvstore.port }}" |
Tinoj Joseph | dd1fd9d | 2022-08-01 23:59:26 +0530 | [diff] [blame] | 53 | - name: KAFKA_ADAPTER_HOST |
Akash Soni | a02e998 | 2022-12-09 10:11:41 +0530 | [diff] [blame] | 54 | value: "{{ tpl .Values.services.kafka.cluster.address . }}" |
Tinoj Joseph | dd1fd9d | 2022-08-01 23:59:26 +0530 | [diff] [blame] | 55 | - name: KAFKA_ADAPTER_PORT |
| 56 | value: "9092" |
| 57 | - name: LOG_LEVEL |
| 58 | value: .Values.global.log_level |
abhay | 4a45cc8 | 2025-01-10 21:32:07 +0530 | [diff] [blame^] | 59 | - 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 Joseph | dd1fd9d | 2022-08-01 23:59:26 +0530 | [diff] [blame] | 70 | 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 . }} |
abhay | 4a45cc8 | 2025-01-10 21:32:07 +0530 | [diff] [blame^] | 72 | securityContext: |
| 73 | runAsUser: {{ .Values.securityContext.runAsUser }} |
| 74 | runAsGroup: {{ .Values.securityContext.runAsGroup }} |
| 75 | fsGroup: {{ .Values.securityContext.fsGroup }} |
Tinoj Joseph | dd1fd9d | 2022-08-01 23:59:26 +0530 | [diff] [blame] | 76 | 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 }}" |
abhay | 4a45cc8 | 2025-01-10 21:32:07 +0530 | [diff] [blame^] | 82 | 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 Joseph | dd1fd9d | 2022-08-01 23:59:26 +0530 | [diff] [blame] | 109 | restartPolicy: "Always" |