AETHER-2600: Add PSP to omec-user-plane chart
Change-Id: I59193df2e811ca6cb1982efbc3189982f16e0ef4
diff --git a/omec/omec-user-plane/templates/psprolebinding-upf.yaml b/omec/omec-user-plane/templates/psprolebinding-upf.yaml
new file mode 100644
index 0000000..b2d8451
--- /dev/null
+++ b/omec/omec-user-plane/templates/psprolebinding-upf.yaml
@@ -0,0 +1,20 @@
+{{/*
+# Copyright 2020-present Open Networking Foundation
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+*/}}
+
+{{- if .Values.podsecuritypolicy.enabled }}
+apiVersion: rbac.authorization.k8s.io/v1
+kind: RoleBinding
+metadata:
+ name: role:psp:upf
+ namespace: {{ .Release.Namespace }}
+roleRef:
+ apiGroup: rbac.authorization.k8s.io
+ kind: ClusterRole
+ name: psp:upf
+subjects:
+- kind: Group
+ name: system:serviceaccounts:{{ .Release.Namespace }}
+ namespace: {{ .Release.Namespace }}
+{{- end }}