blob: ac7de7f52e80adcae5200eedb86f46b24cfd7972 [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
Ajay Lotan Thakur71115fe2022-03-03 22:26:08 -070042 image: {{ .Values.images.repository }}{{ .Values.images.tags.pcrfdb }}
badhri854c028b32021-11-03 18:24:05 -050043 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
Ajay Lotan Thakur71115fe2022-03-03 22:26:08 -070053 image: {{ .Values.images.repository }}{{ .Values.images.tags.pcrf }}
badhri854c028b32021-11-03 18:24:05 -050054 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 }}