blob: 8fa34d8e23f68236b7ccb9af97f61424c47ddd97 [file] [log] [blame]
badhri854c028b32021-11-03 18:24:05 -05001{{/*
2# Copyright 2020-present Open Networking Foundation
3
Ajay Lotan Thakur03189d22022-02-10 14:06:03 -06004# SPDX-License-Identifier: Apache-2.0
badhri854c028b32021-11-03 18:24:05 -05005
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 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 }}