badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [diff] [blame] | 1 | {{/* |
| 2 | # Copyright 2020-present Open Networking Foundation |
| 3 | |
Ajay Lotan Thakur | 03189d2 | 2022-02-10 14:06:03 -0600 | [diff] [blame^] | 4 | # SPDX-License-Identifier: Apache-2.0 |
badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [diff] [blame] | 5 | |
| 6 | Default values for mcord-vepc-helm. |
| 7 | This is a YAML-formatted file. |
| 8 | Declare variables to be passed into your templates. |
| 9 | */}} |
| 10 | |
| 11 | {{- if .Values.config.pcrf.deploy }} |
| 12 | {{ tuple "pcrf" . | include "omec-control-plane.service_account" }} |
| 13 | --- |
| 14 | apiVersion: apps/v1 |
| 15 | kind: StatefulSet |
| 16 | metadata: |
| 17 | name: pcrf |
| 18 | labels: |
| 19 | {{ tuple "pcrf" . | include "omec-control-plane.metadata_labels" | indent 4 }} |
| 20 | spec: |
| 21 | replicas: 1 |
| 22 | serviceName: pcrf-headless |
| 23 | selector: |
| 24 | matchLabels: |
| 25 | {{ tuple "pcrf" . | include "omec-control-plane.metadata_labels" | indent 6 }} |
| 26 | template: |
| 27 | metadata: |
| 28 | labels: |
| 29 | {{ tuple "pcrf" . | include "omec-control-plane.metadata_labels" | indent 8 }} |
| 30 | spec: |
| 31 | {{- if .Values.nodeSelectors.enabled }} |
| 32 | nodeSelector: |
| 33 | {{ .Values.nodeSelectors.pcrf.label }}: {{ .Values.nodeSelectors.pcrf.value }} |
| 34 | {{- end }} |
| 35 | {{- if hasKey .Values.images "pullSecrets" }} |
| 36 | imagePullSecrets: |
| 37 | {{ toYaml .Values.images.pullSecrets | indent 8 }} |
| 38 | {{- end }} |
| 39 | serviceAccountName: pcrf |
| 40 | initContainers: |
| 41 | - name: pcrf-bootstrap |
| 42 | image: {{ .Values.images.tags.pcrfdb }} |
| 43 | imagePullPolicy: {{ .Values.images.pullPolicy }} |
| 44 | command: ["/opt/c3po/pcrf/pcrf-bootstrap.sh"] |
| 45 | volumeMounts: |
| 46 | - name: scripts |
| 47 | mountPath: /opt/c3po/pcrf |
| 48 | {{- if .Values.config.coreDump.enabled }} |
| 49 | {{ tuple "pcrf" . | include "omec-control-plane.coredump_init" | indent 6 }} |
| 50 | {{- end }} |
| 51 | containers: |
| 52 | - name: pcrf |
| 53 | image: {{ .Values.images.tags.pcrf }} |
| 54 | imagePullPolicy: {{ .Values.images.pullPolicy }} |
| 55 | {{- if .Values.config.coreDump.enabled }} |
| 56 | securityContext: |
| 57 | privileged: true |
| 58 | runAsUser: 0 |
| 59 | {{- end }} |
| 60 | stdin: true |
| 61 | tty: true |
| 62 | command: ["bash", "-c", "/opt/c3po/pcrf/scripts/pcrf-run.sh"] |
| 63 | {{- if .Values.resources.enabled }} |
| 64 | resources: |
| 65 | {{ toYaml .Values.resources.pcrf | indent 10 }} |
| 66 | {{- end }} |
| 67 | volumeMounts: |
| 68 | - name: scripts |
| 69 | mountPath: /opt/c3po/pcrf/scripts |
| 70 | - name: configs |
| 71 | mountPath: /etc/pcrf/conf |
| 72 | {{- if .Values.config.coreDump.enabled }} |
| 73 | - name: coredump |
| 74 | mountPath: /tmp/coredump |
| 75 | {{- end }} |
| 76 | volumes: |
| 77 | - name: scripts |
| 78 | configMap: |
| 79 | name: pcrf-scripts |
| 80 | defaultMode: 493 |
| 81 | - name: configs |
| 82 | configMap: |
| 83 | name: pcrf-configs |
| 84 | defaultMode: 420 |
| 85 | {{- if .Values.config.coreDump.enabled }} |
| 86 | - name: host-rootfs |
| 87 | hostPath: |
| 88 | path: / |
| 89 | - name: coredump |
| 90 | hostPath: |
| 91 | path: {{ .Values.config.coreDump.path }} |
| 92 | {{- end }} |
| 93 | {{- end }} |