blob: 8e0dde277b02655fe6891b9441970e881d53150d [file] [log] [blame]
Badhrinath Pa083686a2020-09-29 21:51:42 -07001{{/*
2# Copyright 2020-present Open Networking Foundation
3
4# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
5*/}}
6
7{{- $upfConfig := index .Values.config.pfcp.cfgFiles "upf.json" }}
8---
9apiVersion: apps/v1
10kind: StatefulSet
11metadata:
12 name: pfcp
13 labels:
14{{ tuple "pfcp" . | include "omec-upf-pfcp-agent.metadata_labels" | indent 4 }}
15spec:
16 replicas: 1
17 serviceName: pfcp-headless
18 selector:
19 matchLabels:
20{{ tuple "pfcp" . | include "omec-upf-pfcp-agent.metadata_labels" | indent 6 }}
21 template:
22 metadata:
23 labels:
24{{ tuple "pfcp" . | include "omec-upf-pfcp-agent.metadata_labels" | indent 8 }}
25 spec:
26 shareProcessNamespace: true
27 {{- if .Values.nodeSelectors.enabled }}
28 nodeSelector:
29 {{ .Values.nodeSelectors.pfcp.label }}: {{ .Values.nodeSelectors.pfcp.value }}
30 {{- end }}
Hyunsun Moon7eb0c1d2021-06-04 10:56:53 -070031 {{- if hasKey .Values.images "pullSecrets" }}
Hyunsun Moon8da17882020-10-14 21:28:44 -050032 imagePullSecrets:
Hyunsun Moon7eb0c1d2021-06-04 10:56:53 -070033{{ toYaml .Values.images.pullSecrets | indent 8 }}
Hyunsun Moon8da17882020-10-14 21:28:44 -050034 {{- end }}
Badhrinath Pa083686a2020-09-29 21:51:42 -070035 {{- if .Values.config.coreDump.enabled }}
Hyunsun Moon8da17882020-10-14 21:28:44 -050036 initContainers:
Badhrinath Pa083686a2020-09-29 21:51:42 -070037{{ tuple "pfcp" . | include "omec-upf-pfcp-agent.coredump_init" | indent 8 }}
38 {{- end }}
39 containers:
40 - name: pfcp-agent
41 image: {{ .Values.images.tags.pfcpiface | quote }}
42 imagePullPolicy: {{ .Values.images.pullPolicy | quote }}
43 env:
44 - name: POD_IP
45 valueFrom:
46 fieldRef:
47 fieldPath: status.podIP
48 command: ["pfcpiface"]
49 args:
50 - -config
badhrinath78857fc2020-10-22 15:43:17 -050051 - /tmp/conf/upf.json
Badhrinath Pa083686a2020-09-29 21:51:42 -070052 {{- if .Values.resources.enabled }}
53 resources:
54{{ toYaml .Values.resources.pfcpiface | indent 10 }}
55 {{- end }}
56 volumeMounts:
57 - name: configs
58 mountPath: /tmp/conf
59 volumes:
60 - name: configs
61 configMap:
62 name: pfcp
63 defaultMode: 493
64 {{- if .Values.config.coreDump.enabled }}
65 - name: host-rootfs
66 hostPath:
67 path: /
68 - name: coredump
69 hostPath:
70 path: {{ .Values.config.coreDump.path }}
71 {{- end }}