Ajay Lotan Thakur | 6de3b78 | 2022-04-14 08:41:12 -0600 | [diff] [blame] | 1 | {{/* |
| 2 | # Copyright 2020-present Open Networking Foundation |
| 3 | |
| 4 | # SPDX-License-Identifier: Apache-2.0 |
| 5 | */}} |
| 6 | |
| 7 | {{- if .Values.config.sctplb.deploy }} |
| 8 | {{ tuple "sctplb" . | include "5g-control-plane.service_account" }} |
| 9 | --- |
| 10 | apiVersion: apps/v1 |
| 11 | kind: Deployment |
| 12 | metadata: |
| 13 | name: sctplb |
| 14 | labels: |
| 15 | {{ tuple "sctplb" . | include "5g-control-plane.metadata_labels" | indent 4 }} |
| 16 | spec: |
| 17 | replicas: 1 |
| 18 | #serviceName: sctplb-headless |
| 19 | selector: |
| 20 | matchLabels: |
| 21 | {{ tuple "sctplb" . | include "5g-control-plane.metadata_labels" | indent 6 }} |
| 22 | template: |
| 23 | metadata: |
| 24 | labels: |
| 25 | {{ tuple "sctplb" . | include "5g-control-plane.metadata_labels" | indent 8 }} |
| 26 | {{- with .Values.config.sctplb.podAnnotations }} |
| 27 | annotations: |
| 28 | {{- toYaml . | nindent 8 }} |
| 29 | {{- end }} |
| 30 | spec: |
| 31 | serviceAccountName: sctplb |
| 32 | {{- if hasKey .Values.images "pullSecrets" }} |
| 33 | imagePullSecrets: |
| 34 | {{ toYaml .Values.images.pullSecrets | indent 8 }} |
| 35 | {{- end }} |
Ajay Lotan Thakur | 6de3b78 | 2022-04-14 08:41:12 -0600 | [diff] [blame] | 36 | {{- if .Values.config.coreDump.enabled }} |
Ajay Lotan Thakur | d925212 | 2022-08-30 22:35:59 +0000 | [diff] [blame] | 37 | initContainers: |
| 38 | {{ tuple "sctplb" . | include "5g-control-plane.coredump_init" | indent 6 }} |
Ajay Lotan Thakur | 6de3b78 | 2022-04-14 08:41:12 -0600 | [diff] [blame] | 39 | {{- end }} |
| 40 | containers: |
| 41 | - name: sctplb |
| 42 | image: {{ .Values.images.tags.sctplb }} |
| 43 | imagePullPolicy: {{ .Values.images.pullPolicy }} |
| 44 | {{- if .Values.config.coreDump.enabled }} |
| 45 | securityContext: |
| 46 | runAsUser: 0 |
| 47 | {{- end }} |
| 48 | stdin: true |
| 49 | tty: true |
| 50 | command: ["/sdcore/script/sctplb-run.sh"] |
| 51 | env: |
| 52 | - name: GRPC_GO_LOG_VERBOSITY_LEVEL |
| 53 | value: {{ .Values.config.grpc.golog_verbosity | quote }} |
| 54 | - name: GRPC_GO_LOG_SEVERITY_LEVEL |
| 55 | value: {{ .Values.config.grpc.severity | quote }} |
| 56 | - name: GRPC_TRACE |
| 57 | value: {{ .Values.config.grpc.trace | quote }} |
| 58 | - name: GRPC_VERBOSITY |
| 59 | value: {{ .Values.config.grpc.verbosity | quote }} |
| 60 | - name: POD_IP |
| 61 | valueFrom: |
| 62 | fieldRef: |
| 63 | fieldPath: status.podIP |
| 64 | {{- if .Values.config.managedByConfigPod.enabled }} |
| 65 | - name: MANAGED_BY_CONFIG_POD |
| 66 | value: "true" |
| 67 | {{- end }} |
| 68 | {{- if .Values.resources.enabled }} |
| 69 | resources: |
| 70 | {{ toYaml .Values.resources.sctplb | indent 10 }} |
| 71 | {{- end }} |
| 72 | volumeMounts: |
| 73 | - name: run-script |
| 74 | mountPath: /sdcore/script/sctplb-run.sh |
| 75 | subPath: sctplb-run.sh |
| 76 | - name: sctplb-config |
| 77 | mountPath: /sdcore/config |
| 78 | {{- if .Values.config.coreDump.enabled }} |
| 79 | - name: coredump |
| 80 | mountPath: /tmp/coredump |
| 81 | {{- end }} |
| 82 | volumes: |
| 83 | - name: run-script |
| 84 | configMap: |
| 85 | name: sctplb |
| 86 | defaultMode: 493 |
| 87 | - name: sctplb-config |
| 88 | configMap: |
| 89 | name: sctplb |
| 90 | defaultMode: 493 |
| 91 | {{- if .Values.config.coreDump.enabled }} |
| 92 | - name: host-rootfs |
| 93 | hostPath: |
| 94 | path: / |
| 95 | - name: coredump |
| 96 | hostPath: |
| 97 | path: {{ .Values.config.coreDump.path }} |
| 98 | {{- end }} |
| 99 | {{- end }} |