Ajay Lotan Thakur | c3cd619 | 2020-10-12 20:12:38 -0500 | [diff] [blame] | 1 | {{/* |
| 2 | # Copyright 2020-present Open Networking Foundation |
| 3 | |
| 4 | # SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0 |
| 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 .Values.images.credentials }} |
| 36 | imagePullSecrets: |
| 37 | - name: {{ .Release.Name }}.registry |
| 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: |
Hyunsun Moon | 1fc2447 | 2021-03-14 19:10:11 -0500 | [diff] [blame^] | 46 | - name: scripts |
| 47 | mountPath: /opt/c3po/pcrf |
Ajay Lotan Thakur | c3cd619 | 2020-10-12 20:12:38 -0500 | [diff] [blame] | 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 |
Hyunsun Moon | 1fc2447 | 2021-03-14 19:10:11 -0500 | [diff] [blame^] | 62 | command: ["bash", "-c", "/opt/c3po/pcrf/scripts/pcrf-run.sh"] |
Ajay Lotan Thakur | c3cd619 | 2020-10-12 20:12:38 -0500 | [diff] [blame] | 63 | {{- if .Values.resources.enabled }} |
| 64 | resources: |
| 65 | {{ toYaml .Values.resources.pcrf | indent 10 }} |
| 66 | {{- end }} |
| 67 | volumeMounts: |
Hyunsun Moon | 1fc2447 | 2021-03-14 19:10:11 -0500 | [diff] [blame^] | 68 | - name: scripts |
| 69 | mountPath: /opt/c3po/pcrf/scripts |
| 70 | - name: configs |
Ajay Lotan Thakur | c3cd619 | 2020-10-12 20:12:38 -0500 | [diff] [blame] | 71 | mountPath: /etc/pcrf/conf |
| 72 | {{- if .Values.config.coreDump.enabled }} |
| 73 | - name: coredump |
| 74 | mountPath: /tmp/coredump |
| 75 | {{- end }} |
| 76 | volumes: |
Hyunsun Moon | 1fc2447 | 2021-03-14 19:10:11 -0500 | [diff] [blame^] | 77 | - name: scripts |
Ajay Lotan Thakur | c3cd619 | 2020-10-12 20:12:38 -0500 | [diff] [blame] | 78 | configMap: |
Hyunsun Moon | 1fc2447 | 2021-03-14 19:10:11 -0500 | [diff] [blame^] | 79 | name: pcrf-scripts |
Ajay Lotan Thakur | c3cd619 | 2020-10-12 20:12:38 -0500 | [diff] [blame] | 80 | defaultMode: 493 |
Hyunsun Moon | 1fc2447 | 2021-03-14 19:10:11 -0500 | [diff] [blame^] | 81 | - name: configs |
Ajay Lotan Thakur | c3cd619 | 2020-10-12 20:12:38 -0500 | [diff] [blame] | 82 | configMap: |
Hyunsun Moon | 1fc2447 | 2021-03-14 19:10:11 -0500 | [diff] [blame^] | 83 | name: pcrf-configs |
Ajay Lotan Thakur | c3cd619 | 2020-10-12 20:12:38 -0500 | [diff] [blame] | 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 }} |