Always install the custom virt-launcher policy
@@ -295,7 +295,6 @@ func (app *virtHandlerApp) Run() {
defer close(stop)
factory.Start(stop)
- selinuxLauncherType := clusterConfig.GetSELinuxLauncherType()
se, exists, err := selinux.NewSELinux()
if err == nil && exists {
for _, dir := range []string{app.VirtShareDir, app.VirtLibDir} {
@@ -312,10 +311,8 @@ func (app *virtHandlerApp) Run() {
panic(err)
}
}
- // Only install KubeVirt's policy if not using a custom one
- if selinuxLauncherType == "" {
+ // Install KubeVirt's virt-launcher policy
err = se.InstallPolicy("/var/run/kubevirt")
- }
if err != nil {
panic(fmt.Errorf("failed to install virt-launcher selinux policy: %v", err))
}
