blob: 002a6acd499e7512b788b8eb9ee71d79fbbe7c49 [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 Moon8da17882020-10-14 21:28:44 -050031 {{- if .Values.images.credentials }}
32 imagePullSecrets:
33 - name: {{ .Release.Name }}.registry
34 {{- 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 - -n4SrcIPStr
53 - $(POD_IP)
Badhrinath Pa083686a2020-09-29 21:51:42 -070054 {{- if .Values.resources.enabled }}
55 resources:
56{{ toYaml .Values.resources.pfcpiface | indent 10 }}
57 {{- end }}
58 volumeMounts:
59 - name: configs
60 mountPath: /tmp/conf
61 volumes:
62 - name: configs
63 configMap:
64 name: pfcp
65 defaultMode: 493
66 {{- if .Values.config.coreDump.enabled }}
67 - name: host-rootfs
68 hostPath:
69 path: /
70 - name: coredump
71 hostPath:
72 path: {{ .Values.config.coreDump.path }}
73 {{- end }}