mirror of
https://github.com/kata-containers/kata-containers.git
synced 2026-02-21 06:12:26 +00:00
Merge pull request #12008 from microsoft/saulparedes/allow_priv
webhook: allow privileged containers
This commit is contained in:
@@ -57,15 +57,6 @@ func annotatePodMutator(_ context.Context, ar *kwhmodel.AdmissionReview, obj met
|
||||
return &kwhmutating.MutatorResult{}, nil
|
||||
}
|
||||
|
||||
for i := range pod.Spec.Containers {
|
||||
if pod.Spec.Containers[i].SecurityContext != nil && pod.Spec.Containers[i].SecurityContext.Privileged != nil {
|
||||
if *pod.Spec.Containers[i].SecurityContext.Privileged {
|
||||
fmt.Println("privileged container: ", pod.GetNamespace(), pod.GetName())
|
||||
return &kwhmutating.MutatorResult{}, nil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if pod.Spec.RuntimeClassName != nil {
|
||||
fmt.Println("explicit runtime: ", pod.GetNamespace(), pod.GetName(), pod.Spec.RuntimeClassName)
|
||||
return &kwhmutating.MutatorResult{}, nil
|
||||
|
||||
Reference in New Issue
Block a user