From e42de2b2be5249df3abbd7f6359bdcb34caa88f6 Mon Sep 17 00:00:00 2001 From: Lyndon-Li Date: Fri, 27 Sep 2024 11:17:13 +0800 Subject: [PATCH] issue 8249: disable selinux relabel for backupPod Signed-off-by: Lyndon-Li --- pkg/exposer/csi_snapshot.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/exposer/csi_snapshot.go b/pkg/exposer/csi_snapshot.go index 4dcc50d129..3d2890cb71 100644 --- a/pkg/exposer/csi_snapshot.go +++ b/pkg/exposer/csi_snapshot.go @@ -546,6 +546,9 @@ func (e *csiSnapshotExposer) createBackupPod( RestartPolicy: corev1.RestartPolicyNever, SecurityContext: &corev1.PodSecurityContext{ RunAsUser: &userID, + SELinuxOptions: &corev1.SELinuxOptions{ + Type: "spc_t", + }, }, }, }