blob: 45af96b0caecb0541c4923ca40297282bfb2b955 [file] [log] [blame]
Ajay Lotan Thakurc3cd6192020-10-12 20:12:38 -05001{{/*
2# Copyright 2020-present Open Networking Foundation
3
4# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
5
6Default values for mcord-vepc-helm.
7This is a YAML-formatted file.
8Declare 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---
14apiVersion: apps/v1
15kind: StatefulSet
16metadata:
17 name: pcrf
18 labels:
19{{ tuple "pcrf" . | include "omec-control-plane.metadata_labels" | indent 4 }}
20spec:
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 Moon1fc24472021-03-14 19:10:11 -050046 - name: scripts
47 mountPath: /opt/c3po/pcrf
Ajay Lotan Thakurc3cd6192020-10-12 20:12:38 -050048 {{- 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 Moon1fc24472021-03-14 19:10:11 -050062 command: ["bash", "-c", "/opt/c3po/pcrf/scripts/pcrf-run.sh"]
Ajay Lotan Thakurc3cd6192020-10-12 20:12:38 -050063 {{- if .Values.resources.enabled }}
64 resources:
65{{ toYaml .Values.resources.pcrf | indent 10 }}
66 {{- end }}
67 volumeMounts:
Hyunsun Moon1fc24472021-03-14 19:10:11 -050068 - name: scripts
69 mountPath: /opt/c3po/pcrf/scripts
70 - name: configs
Ajay Lotan Thakurc3cd6192020-10-12 20:12:38 -050071 mountPath: /etc/pcrf/conf
72 {{- if .Values.config.coreDump.enabled }}
73 - name: coredump
74 mountPath: /tmp/coredump
75 {{- end }}
76 volumes:
Hyunsun Moon1fc24472021-03-14 19:10:11 -050077 - name: scripts
Ajay Lotan Thakurc3cd6192020-10-12 20:12:38 -050078 configMap:
Hyunsun Moon1fc24472021-03-14 19:10:11 -050079 name: pcrf-scripts
Ajay Lotan Thakurc3cd6192020-10-12 20:12:38 -050080 defaultMode: 493
Hyunsun Moon1fc24472021-03-14 19:10:11 -050081 - name: configs
Ajay Lotan Thakurc3cd6192020-10-12 20:12:38 -050082 configMap:
Hyunsun Moon1fc24472021-03-14 19:10:11 -050083 name: pcrf-configs
Ajay Lotan Thakurc3cd6192020-10-12 20:12:38 -050084 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 }}