From 7740d21cd23affe4447aaf85f229f0d29731ceb3 Mon Sep 17 00:00:00 2001 From: galal-hussein Date: Wed, 22 May 2024 23:52:28 +0300 Subject: [PATCH] Give the helper pod more range of MCS categories Signed-off-by: galal-hussein --- provisioner.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/provisioner.go b/provisioner.go index 797df703c..b8259414b 100644 --- a/provisioner.go +++ b/provisioner.go @@ -613,7 +613,11 @@ func (p *LocalPathProvisioner) createHelperPod(action ActionType, cmd []string, "-s", strconv.FormatInt(o.SizeInBytes, 10), "-m", string(o.Mode), "-a", string(action)} - + helperPod.Spec.Containers[0].SecurityContext = &v1.SecurityContext{ + SELinuxOptions: &v1.SELinuxOptions{ + Level: "s0-s0:c0.c1023", + }, + } // If it already exists due to some previous errors, the pod will be cleaned up later automatically // /~https://github.com/rancher/local-path-provisioner/issues/27 logrus.Infof("create the helper pod %s into %s", helperPod.Name, p.namespace)