mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 12:18:16 +00:00 
			
		
		
		
	ingore apparmor on non Linux operating systems.
This commit is contained in:
		@@ -25,6 +25,7 @@ import (
 | 
			
		||||
	"net/url"
 | 
			
		||||
	"os"
 | 
			
		||||
	"path"
 | 
			
		||||
	sysruntime "runtime"
 | 
			
		||||
	"sort"
 | 
			
		||||
	"strings"
 | 
			
		||||
	"sync"
 | 
			
		||||
@@ -784,8 +785,11 @@ func NewMainKubelet(kubeCfg *kubeletconfiginternal.KubeletConfiguration,
 | 
			
		||||
		opt(klet)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if sysruntime.GOOS == "linux" {
 | 
			
		||||
		// AppArmor is a Linux kernel security module and it does not support other operating systems.
 | 
			
		||||
		klet.appArmorValidator = apparmor.NewValidator(containerRuntime)
 | 
			
		||||
		klet.softAdmitHandlers.AddPodAdmitHandler(lifecycle.NewAppArmorAdmitHandler(klet.appArmorValidator))
 | 
			
		||||
	}
 | 
			
		||||
	klet.softAdmitHandlers.AddPodAdmitHandler(lifecycle.NewNoNewPrivsAdmitHandler(klet.containerRuntime))
 | 
			
		||||
	klet.softAdmitHandlers.AddPodAdmitHandler(lifecycle.NewProcMountAdmitHandler(klet.containerRuntime))
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user