File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ import (
25
25
"net/url"
26
26
"os"
27
27
"path"
28
+ sysruntime "runtime"
28
29
"sort"
29
30
"strings"
30
31
"sync"
@@ -775,8 +776,11 @@ func NewMainKubelet(kubeCfg *kubeletconfiginternal.KubeletConfiguration,
775
776
opt (klet )
776
777
}
777
778
778
- klet .appArmorValidator = apparmor .NewValidator (containerRuntime )
779
- klet .softAdmitHandlers .AddPodAdmitHandler (lifecycle .NewAppArmorAdmitHandler (klet .appArmorValidator ))
779
+ if sysruntime .GOOS == "linux" {
780
+ // AppArmor is a Linux kernel security module and it does not support other operating systems.
781
+ klet .appArmorValidator = apparmor .NewValidator (containerRuntime )
782
+ klet .softAdmitHandlers .AddPodAdmitHandler (lifecycle .NewAppArmorAdmitHandler (klet .appArmorValidator ))
783
+ }
780
784
klet .softAdmitHandlers .AddPodAdmitHandler (lifecycle .NewNoNewPrivsAdmitHandler (klet .containerRuntime ))
781
785
klet .softAdmitHandlers .AddPodAdmitHandler (lifecycle .NewProcMountAdmitHandler (klet .containerRuntime ))
782
786
You can’t perform that action at this time.
0 commit comments