mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 23:47:50 +00:00
Add init container loading to the kubelet
This commit is contained in:
@@ -63,6 +63,11 @@ func canRunPod(pod *api.Pod) error {
|
||||
return fmt.Errorf("pod with UID %q specified privileged container, but is disallowed", pod.UID)
|
||||
}
|
||||
}
|
||||
for _, container := range pod.Spec.InitContainers {
|
||||
if securitycontext.HasPrivilegedRequest(&container) {
|
||||
return fmt.Errorf("pod with UID %q specified privileged container, but is disallowed", pod.UID)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user