test/e2e/*: default existing tests to privileged pod security policy

This is to ensure that all existing tests don't break when defaulting
the pod security policy to restricted in the e2e test framework.
This commit is contained in:
Sergiusz Urbaniak
2022-04-04 14:00:06 +02:00
parent f578b9a40d
commit 1495c9f2cd
168 changed files with 351 additions and 2 deletions

View File

@@ -29,6 +29,7 @@ import (
e2enode "k8s.io/kubernetes/test/e2e/framework/node"
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
imageutils "k8s.io/kubernetes/test/utils/image"
admissionapi "k8s.io/pod-security-admission/api"
"github.com/onsi/ginkgo"
)
@@ -91,6 +92,7 @@ func makePodToVerifyCgroupSize(cgroupNames []string, expectedCPU string, expecte
var _ = SIGDescribe("Kubelet PodOverhead handling [LinuxOnly]", func() {
f := framework.NewDefaultFramework("podoverhead-handling")
f.NamespacePodSecurityEnforceLevel = admissionapi.LevelPrivileged
ginkgo.Describe("PodOverhead cgroup accounting", func() {
ginkgo.Context("On running pod with PodOverhead defined", func() {
ginkgo.It("Pod cgroup should be sum of overhead and resource limits", func() {