Skip to content

Commit 4aac5b4

Browse files
andrewrynhardsmira
authored andcommitted
feat: mount /sys/kernel/security into kubelet
This allows the kubelet to detect AppArmor. Signed-off-by: Andrew Rynhard <andrew@rynhard.io> Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
1 parent 817f181 commit 4aac5b4

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

  • internal/app/machined/pkg/system/services

internal/app/machined/pkg/system/services/kubelet.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ func (k *Kubelet) Runner(r runtime.Runtime) (runner.Runner, error) {
120120
mounts := []specs.Mount{
121121
{Type: "bind", Destination: "/dev", Source: "/dev", Options: []string{"rbind", "rshared", "rw"}},
122122
{Type: "sysfs", Destination: "/sys", Source: "/sys", Options: []string{"bind", "ro"}},
123+
{Type: "securityfs", Destination: "/sys/kernel/security", Source: "/sys/kernel/security", Options: []string{"bind", "ro"}},
123124
{Type: "bind", Destination: constants.CgroupMountPath, Source: constants.CgroupMountPath, Options: []string{"rbind", "rshared", "rw"}},
124125
{Type: "bind", Destination: "/lib/modules", Source: "/lib/modules", Options: []string{"bind", "ro"}},
125126
{Type: "bind", Destination: "/etc/kubernetes", Source: "/etc/kubernetes", Options: []string{"bind", "rshared", "rw"}},

0 commit comments

Comments
 (0)