diff --git a/test/e2e/common/node/container_probe.go b/test/e2e/common/node/container_probe.go index 60053a49861..7ec421a4867 100644 --- a/test/e2e/common/node/container_probe.go +++ b/test/e2e/common/node/container_probe.go @@ -261,7 +261,7 @@ var _ = SIGDescribe("Probing container", func() { Testname: Pod liveness probe, container exec timeout, restart Description: A Pod is created with liveness probe with a Exec action on the Pod. If the liveness probe call does not return within the timeout specified, liveness probe MUST restart the Pod. */ - ginkgo.It("should be restarted with a failing exec liveness probe that took longer than the timeout", func(ctx context.Context) { + f.It("should be restarted with a failing exec liveness probe that took longer than the timeout", f.WithNodeConformance(), func(ctx context.Context) { cmd := []string{"/bin/sh", "-c", "sleep 600"} livenessProbe := &v1.Probe{ ProbeHandler: execHandler([]string{"/bin/sh", "-c", "sleep 10 & exit 1"}), @@ -278,7 +278,7 @@ var _ = SIGDescribe("Probing container", func() { Testname: Pod http liveness probe, redirected to a local address Description: A Pod is created with liveness probe on http endpoint /redirect?loc=healthz. The http handler on the /redirect will redirect to the /healthz endpoint, which will return a http error after 10 seconds since the Pod is started. This MUST result in liveness check failure. The Pod MUST now be killed and restarted incrementing restart count to 1. */ - ginkgo.It("should be restarted with a local redirect http liveness probe", func(ctx context.Context) { + f.It("should be restarted with a local redirect http liveness probe", f.WithNodeConformance(), func(ctx context.Context) { livenessProbe := &v1.Probe{ ProbeHandler: httpGetHandler("/redirect?loc="+url.QueryEscape("/healthz"), 8080), InitialDelaySeconds: 15, @@ -293,7 +293,7 @@ var _ = SIGDescribe("Probing container", func() { Testname: Pod http liveness probe, redirected to a non-local address Description: A Pod is created with liveness probe on http endpoint /redirect with a redirect to http://0.0.0.0/. The http handler on the /redirect should not follow the redirect, but instead treat it as a success and generate an event. */ - ginkgo.It("should *not* be restarted with a non-local redirect http liveness probe", func(ctx context.Context) { + f.It("should *not* be restarted with a non-local redirect http liveness probe", f.WithNodeConformance(), func(ctx context.Context) { livenessProbe := &v1.Probe{ ProbeHandler: httpGetHandler("/redirect?loc="+url.QueryEscape("http://0.0.0.0/"), 8080), InitialDelaySeconds: 15, @@ -317,7 +317,7 @@ var _ = SIGDescribe("Probing container", func() { Testname: Pod startup probe restart Description: A Pod is created with a failing startup probe. The Pod MUST be killed and restarted incrementing restart count to 1, even if liveness would succeed. */ - ginkgo.It("should be restarted startup probe fails", func(ctx context.Context) { + f.It("should be restarted startup probe fails", f.WithNodeConformance(), func(ctx context.Context) { cmd := []string{"/bin/sh", "-c", "sleep 600"} livenessProbe := &v1.Probe{ ProbeHandler: v1.ProbeHandler{ @@ -346,7 +346,7 @@ var _ = SIGDescribe("Probing container", func() { Testname: Pod liveness probe delayed (long) by startup probe Description: A Pod is created with failing liveness and startup probes. Liveness probe MUST NOT fail until startup probe expires. */ - ginkgo.It("should *not* be restarted by liveness probe because startup probe delays it", func(ctx context.Context) { + f.It("should *not* be restarted by liveness probe because startup probe delays it", f.WithNodeConformance(), func(ctx context.Context) { cmd := []string{"/bin/sh", "-c", "sleep 600"} livenessProbe := &v1.Probe{ ProbeHandler: v1.ProbeHandler{ @@ -375,7 +375,7 @@ var _ = SIGDescribe("Probing container", func() { Testname: Pod liveness probe fails after startup success Description: A Pod is created with failing liveness probe and delayed startup probe that uses 'exec' command to cat /temp/health file. The Container is started by creating /tmp/startup after 10 seconds, triggering liveness probe to fail. The Pod MUST now be killed and restarted incrementing restart count to 1. */ - ginkgo.It("should be restarted by liveness probe after startup probe enables it", func(ctx context.Context) { + f.It("should be restarted by liveness probe after startup probe enables it", f.WithNodeConformance(), func(ctx context.Context) { cmd := []string{"/bin/sh", "-c", "sleep 10; echo ok >/tmp/startup; sleep 600"} livenessProbe := &v1.Probe{ ProbeHandler: v1.ProbeHandler{ @@ -404,7 +404,7 @@ var _ = SIGDescribe("Probing container", func() { Testname: Pod readiness probe, delayed by startup probe Description: A Pod is created with startup and readiness probes. The Container is started by creating /tmp/startup after 45 seconds, delaying the ready state by this amount of time. This is similar to the "Pod readiness probe, with initial delay" test. */ - ginkgo.It("should be ready immediately after startupProbe succeeds", func(ctx context.Context) { + f.It("should be ready immediately after startupProbe succeeds", f.WithNodeConformance(), func(ctx context.Context) { // Probe workers sleep at Kubelet start for a random time which is at most PeriodSeconds // this test requires both readiness and startup workers running before updating statuses // to avoid flakes, ensure sleep before startup (32s) > readinessProbe.PeriodSeconds @@ -562,7 +562,7 @@ var _ = SIGDescribe("Probing container", func() { RunLivenessTest(ctx, f, pod, 1, defaultObservationTimeout) }) - ginkgo.It("should mark readiness on pods to false while pod is in progress of terminating when a pod has a readiness probe", func(ctx context.Context) { + f.It("should mark readiness on pods to false while pod is in progress of terminating when a pod has a readiness probe", f.WithNodeConformance(), func(ctx context.Context) { podName := "probe-test-" + string(uuid.NewUUID()) podClient := e2epod.NewPodClient(f) terminationGracePeriod := int64(30) @@ -628,7 +628,7 @@ done framework.ExpectNoError(err) }) - ginkgo.It("should mark readiness on pods to false and disable liveness probes while pod is in progress of terminating", func(ctx context.Context) { + f.It("should mark readiness on pods to false and disable liveness probes while pod is in progress of terminating", f.WithNodeConformance(), func(ctx context.Context) { podName := "probe-test-" + string(uuid.NewUUID()) podClient := e2epod.NewPodClient(f) terminationGracePeriod := int64(30) diff --git a/test/e2e/common/node/downwardapi.go b/test/e2e/common/node/downwardapi.go index 535dc1f93bb..51dcda79da0 100644 --- a/test/e2e/common/node/downwardapi.go +++ b/test/e2e/common/node/downwardapi.go @@ -139,7 +139,7 @@ var _ = SIGDescribe("Downward API", func() { testDownwardAPI(ctx, f, podName, env, expectations) }) - ginkgo.It("should provide host IP and pod IP as an env var if pod uses host network [LinuxOnly]", func(ctx context.Context) { + f.It("should provide host IP and pod IP as an env var if pod uses host network [LinuxOnly]", f.WithNodeConformance(), func(ctx context.Context) { podName := "downward-api-" + string(uuid.NewUUID()) env := []v1.EnvVar{ { diff --git a/test/e2e/common/node/file_key.go b/test/e2e/common/node/file_key.go index 5aed89c53a2..e319b5ecc6b 100644 --- a/test/e2e/common/node/file_key.go +++ b/test/e2e/common/node/file_key.go @@ -28,6 +28,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/uuid" "k8s.io/kubernetes/pkg/features" + "k8s.io/kubernetes/test/e2e/feature" "k8s.io/kubernetes/test/e2e/framework" e2epod "k8s.io/kubernetes/test/e2e/framework/pod" e2epodoutput "k8s.io/kubernetes/test/e2e/framework/pod/output" @@ -38,7 +39,7 @@ import ( "github.com/onsi/gomega" ) -var _ = SIGDescribe("FileKeyRef", framework.WithFeatureGate(features.EnvFiles), func() { +var _ = SIGDescribe("FileKeyRef", feature.EnvFiles, framework.WithFeatureGate(features.EnvFiles), func() { f := framework.NewDefaultFramework("filekeyref") f.NamespacePodSecurityLevel = admissionapi.LevelBaseline diff --git a/test/e2e/common/node/lifecycle_hook.go b/test/e2e/common/node/lifecycle_hook.go index 7fbd1e73c8b..d51a5652221 100644 --- a/test/e2e/common/node/lifecycle_hook.go +++ b/test/e2e/common/node/lifecycle_hook.go @@ -575,7 +575,7 @@ func validDuration(duration time.Duration, low, high int64) bool { return duration >= time.Second*time.Duration(low) && duration <= time.Second*time.Duration(high) } -var _ = SIGDescribe("Lifecycle Sleep Hook", func() { +var _ = SIGDescribe("Lifecycle Sleep Hook", framework.WithNodeConformance(), func() { f := framework.NewDefaultFramework("pod-lifecycle-sleep-action") f.NamespacePodSecurityLevel = admissionapi.LevelBaseline var podClient *e2epod.PodClient @@ -732,7 +732,7 @@ var _ = SIGDescribe("Lifecycle Sleep Hook", func() { }) }) -var _ = SIGDescribe("Lifecycle sleep action zero value", func() { +var _ = SIGDescribe("Lifecycle sleep action zero value", framework.WithNodeConformance(), func() { f := framework.NewDefaultFramework("pod-lifecycle-sleep-action-allow-zero") f.NamespacePodSecurityLevel = admissionapi.LevelBaseline var podClient *e2epod.PodClient diff --git a/test/e2e/common/node/node_lease.go b/test/e2e/common/node/node_lease.go index e1a671d9581..d97e17304d2 100644 --- a/test/e2e/common/node/node_lease.go +++ b/test/e2e/common/node/node_lease.go @@ -38,7 +38,7 @@ import ( "github.com/onsi/gomega" ) -var _ = SIGDescribe("NodeLease", func() { +var _ = SIGDescribe("NodeLease", framework.WithNodeConformance(), func() { var nodeName string f := framework.NewDefaultFramework("node-lease-test") f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged diff --git a/test/e2e/common/node/pod_hostnameoverride.go b/test/e2e/common/node/pod_hostnameoverride.go index 964a0173fa5..1b02e10d22a 100644 --- a/test/e2e/common/node/pod_hostnameoverride.go +++ b/test/e2e/common/node/pod_hostnameoverride.go @@ -52,7 +52,7 @@ func newTestPod(namespace string) *v1.Pod { } } -var _ = SIGDescribe("Override hostname of Pod", framework.WithFeatureGate(features.HostnameOverride), func() { +var _ = SIGDescribe("Override hostname of Pod", framework.WithNodeConformance(), framework.WithFeatureGate(features.HostnameOverride), func() { f := framework.NewDefaultFramework("hostfqdn") f.NamespacePodSecurityLevel = admissionapi.LevelBaseline diff --git a/test/e2e/common/node/pod_resize.go b/test/e2e/common/node/pod_resize.go index c1f31a16e34..7bfccb1d590 100644 --- a/test/e2e/common/node/pod_resize.go +++ b/test/e2e/common/node/pod_resize.go @@ -31,6 +31,7 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/kubernetes/test/e2e/common/node/framework/cgroups" "k8s.io/kubernetes/test/e2e/common/node/framework/podresize" + "k8s.io/kubernetes/test/e2e/feature" "k8s.io/kubernetes/test/e2e/framework" e2enode "k8s.io/kubernetes/test/e2e/framework/node" e2epod "k8s.io/kubernetes/test/e2e/framework/pod" @@ -80,7 +81,7 @@ func offsetMemory(index int64, value string) string { } func doGuaranteedPodResizeTests(f *framework.Framework) { - ginkgo.DescribeTableSubtree("guaranteed qos - 1 container with resize policy", func(cpuPolicy, memPolicy v1.ResourceResizeRestartPolicy, resizeInitCtrs bool) { + ginkgo.DescribeTableSubtree("guaranteed qos - 1 container with resize policy", feature.InPlacePodVerticalScaling, func(cpuPolicy, memPolicy v1.ResourceResizeRestartPolicy, resizeInitCtrs bool) { ginkgo.DescribeTable("resizing", func(ctx context.Context, desiredCPU, desiredMem string) { // The tests for guaranteed pods include extended resources. @@ -237,7 +238,7 @@ type resourceRequestsLimits struct { } func doBurstablePodResizeTests(f *framework.Framework) { - ginkgo.DescribeTableSubtree("burstable pods - 1 container with all requests & limits set and resize policy", func(cpuPolicy, memPolicy v1.ResourceResizeRestartPolicy) { + ginkgo.DescribeTableSubtree("burstable pods - 1 container with all requests & limits set and resize policy", feature.InPlacePodVerticalScaling, func(cpuPolicy, memPolicy v1.ResourceResizeRestartPolicy) { ginkgo.DescribeTable("resizing", func(ctx context.Context, desiredContainerResources resourceRequestsLimits) { originalContainers := makeBurstableContainers(1, cpuPolicy, memPolicy, originalCPU, originalCPULimit, originalMem, originalMemLimit) expectedContainers := makeBurstableContainers(1, cpuPolicy, memPolicy, desiredContainerResources.cpuReq, desiredContainerResources.cpuLim, desiredContainerResources.memReq, desiredContainerResources.memLim) @@ -366,7 +367,7 @@ func doBurstablePodResizeTests(f *framework.Framework) { } func doPodResizePatchErrorTests(f *framework.Framework) { - ginkgo.DescribeTable("apply invalid resize patch requests", func(ctx context.Context, originalContainers, desiredContainers []podresize.ResizableContainerInfo, patchError string, waitForStart bool) { + ginkgo.DescribeTable("apply invalid resize patch requests", feature.InPlacePodVerticalScaling, func(ctx context.Context, originalContainers, desiredContainers []podresize.ResizableContainerInfo, patchError string, waitForStart bool) { podClient := e2epod.NewPodClient(f) var newPod *v1.Pod @@ -611,7 +612,7 @@ func doPodResizeMemoryLimitDecreaseTest(f *framework.Framework) { // 1. Decrease the limit a little bit - should succeed // 2. Decrease the limit down to a tiny amount - should fail // 3. Revert the limit back to the original value - should succeed - ginkgo.It("decrease memory limit below usage", func(ctx context.Context) { + ginkgo.It("decrease memory limit below usage", feature.InPlacePodVerticalScaling, func(ctx context.Context) { podClient := e2epod.NewPodClient(f) original := []podresize.ResizableContainerInfo{{ Name: "c1", diff --git a/test/e2e/common/node/security_context.go b/test/e2e/common/node/security_context.go index 3a95fb57ca3..53f67cdd2e2 100644 --- a/test/e2e/common/node/security_context.go +++ b/test/e2e/common/node/security_context.go @@ -549,7 +549,7 @@ var _ = SIGDescribe("Security Context", func() { }) }) - ginkgo.Context("When creating a container with runAsNonRoot", func() { + f.Context("When creating a container with runAsNonRoot", f.WithNodeConformance(), func() { rootImage := imageutils.GetE2EImage(imageutils.BusyBox) nonRootImage := imageutils.GetE2EImage(imageutils.NonRoot) makeNonRootPod := func(podName, image string, userid *int64) *v1.Pod { @@ -821,7 +821,7 @@ var _ = SIGDescribe("Security Context", func() { }) }) - f.Context("SupplementalGroupsPolicy [LinuxOnly]", func() { + f.Context("SupplementalGroupsPolicy [LinuxOnly]", feature.SupplementalGroupsPolicy, func() { timeout := 1 * time.Minute agnhostImage := imageutils.GetE2EImage(imageutils.Agnhost) diff --git a/test/e2e/common/storage/configmap_volume.go b/test/e2e/common/storage/configmap_volume.go index bfdf085f787..e7dde43f633 100644 --- a/test/e2e/common/storage/configmap_volume.go +++ b/test/e2e/common/storage/configmap_volume.go @@ -59,7 +59,7 @@ var _ = SIGDescribe("ConfigMap", func() { doConfigMapE2EWithoutMappings(ctx, f, false, 0, &defaultMode) }) - f.It("should be consumable from pods in volume as non-root with defaultMode and fsGroup set [LinuxOnly]", func(ctx context.Context) { + f.It("should be consumable from pods in volume as non-root with defaultMode and fsGroup set [LinuxOnly]", f.WithNodeConformance(), func(ctx context.Context) { // Windows does not support RunAsUser / FSGroup SecurityContext options, and it does not support setting file permissions. e2eskipper.SkipIfNodeOSDistroIs("windows") defaultMode := int32(0440) /* setting fsGroup sets mode to at least 440 */ @@ -75,7 +75,7 @@ var _ = SIGDescribe("ConfigMap", func() { doConfigMapE2EWithoutMappings(ctx, f, true, 0, nil) }) - f.It("should be consumable from pods in volume as non-root with FSGroup [LinuxOnly]", func(ctx context.Context) { + f.It("should be consumable from pods in volume as non-root with FSGroup [LinuxOnly]", f.WithNodeConformance(), func(ctx context.Context) { // Windows does not support RunAsUser / FSGroup SecurityContext options. e2eskipper.SkipIfNodeOSDistroIs("windows") doConfigMapE2EWithoutMappings(ctx, f, true, 1001, nil) @@ -110,7 +110,7 @@ var _ = SIGDescribe("ConfigMap", func() { doConfigMapE2EWithMappings(ctx, f, true, 0, nil) }) - f.It("should be consumable from pods in volume with mappings as non-root with FSGroup [LinuxOnly]", func(ctx context.Context) { + f.It("should be consumable from pods in volume with mappings as non-root with FSGroup [LinuxOnly]", f.WithNodeConformance(), func(ctx context.Context) { // Windows does not support RunAsUser / FSGroup SecurityContext options. e2eskipper.SkipIfNodeOSDistroIs("windows") doConfigMapE2EWithMappings(ctx, f, true, 1001, nil) @@ -554,7 +554,7 @@ var _ = SIGDescribe("ConfigMap", func() { // The pod is in pending during volume creation until the configMap objects are available // or until mount the configMap volume times out. There is no configMap object defined for the pod, so it should return timeout exception unless it is marked optional. // Slow (~5 mins) - f.It("Should fail non-optional pod creation due to configMap object does not exist", f.WithSlow(), func(ctx context.Context) { + f.It("Should fail non-optional pod creation due to configMap object does not exist", f.WithSlow(), f.WithNodeConformance(), func(ctx context.Context) { volumeMountPath := "/etc/configmap-volumes" pod := createNonOptionalConfigMapPod(ctx, f, volumeMountPath) getPod := e2epod.Get(f.ClientSet, pod) @@ -564,7 +564,7 @@ var _ = SIGDescribe("ConfigMap", func() { // ConfigMap object defined for the pod, If a key is specified which is not present in the ConfigMap, // the volume setup will error unless it is marked optional, during the pod creation. // Slow (~5 mins) - f.It("Should fail non-optional pod creation due to the key in the configMap object does not exist", f.WithSlow(), func(ctx context.Context) { + f.It("Should fail non-optional pod creation due to the key in the configMap object does not exist", f.WithSlow(), f.WithNodeConformance(), func(ctx context.Context) { volumeMountPath := "/etc/configmap-volumes" pod := createNonOptionalConfigMapPodWithConfig(ctx, f, volumeMountPath) getPod := e2epod.Get(f.ClientSet, pod) diff --git a/test/e2e/common/storage/downwardapi_volume.go b/test/e2e/common/storage/downwardapi_volume.go index e2334df72d9..51c39702730 100644 --- a/test/e2e/common/storage/downwardapi_volume.go +++ b/test/e2e/common/storage/downwardapi_volume.go @@ -92,7 +92,7 @@ var _ = SIGDescribe("Downward API volume", func() { }) }) - f.It("should provide podname as non-root with fsgroup [LinuxOnly]", func(ctx context.Context) { + f.It("should provide podname as non-root with fsgroup [LinuxOnly]", f.WithNodeConformance(), func(ctx context.Context) { // Windows does not support RunAsUser / FSGroup SecurityContext options. e2eskipper.SkipIfNodeOSDistroIs("windows") podName := "metadata-volume-" + string(uuid.NewUUID()) @@ -107,7 +107,7 @@ var _ = SIGDescribe("Downward API volume", func() { }) }) - f.It("should provide podname as non-root with fsgroup and defaultMode [LinuxOnly]", func(ctx context.Context) { + f.It("should provide podname as non-root with fsgroup and defaultMode [LinuxOnly]", f.WithNodeConformance(), func(ctx context.Context) { // Windows does not support RunAsUser / FSGroup SecurityContext options, and it does not support setting file permissions. e2eskipper.SkipIfNodeOSDistroIs("windows") podName := "metadata-volume-" + string(uuid.NewUUID()) diff --git a/test/e2e/common/storage/empty_dir.go b/test/e2e/common/storage/empty_dir.go index 7c8d5427fd9..fd1b18b72e9 100644 --- a/test/e2e/common/storage/empty_dir.go +++ b/test/e2e/common/storage/empty_dir.go @@ -48,7 +48,7 @@ var _ = SIGDescribe("EmptyDir volumes", func() { f := framework.NewDefaultFramework("emptydir") f.NamespacePodSecurityLevel = admissionapi.LevelBaseline - f.Context("when FSGroup is specified [LinuxOnly]", func() { + f.Context("when FSGroup is specified [LinuxOnly]", f.WithNodeConformance(), func() { ginkgo.BeforeEach(func() { // Windows does not support the FSGroup SecurityContext option. @@ -298,7 +298,7 @@ var _ = SIGDescribe("EmptyDir volumes", func() { Testname: EmptyDir, Memory backed volume is sized to specified limit Description: A Pod created with an 'emptyDir' Volume backed by memory should be sized to user provided value. */ - ginkgo.It("pod should support memory backed volumes of specified size", func(ctx context.Context) { + f.It("pod should support memory backed volumes of specified size", f.WithNodeConformance(), func(ctx context.Context) { var ( volumeName = "shared-data" busyBoxMainVolumeMountPath = "/usr/share/volumeshare" diff --git a/test/e2e/common/storage/projected_configmap.go b/test/e2e/common/storage/projected_configmap.go index a1d8dac0102..0b1a229ac0c 100644 --- a/test/e2e/common/storage/projected_configmap.go +++ b/test/e2e/common/storage/projected_configmap.go @@ -59,7 +59,7 @@ var _ = SIGDescribe("Projected configMap", func() { doProjectedConfigMapE2EWithoutMappings(ctx, f, false, 0, &defaultMode) }) - f.It("should be consumable from pods in volume as non-root with defaultMode and fsGroup set [LinuxOnly]", func(ctx context.Context) { + f.It("should be consumable from pods in volume as non-root with defaultMode and fsGroup set [LinuxOnly]", f.WithNodeConformance(), func(ctx context.Context) { // Windows does not support RunAsUser / FSGroup SecurityContext options, and it does not support setting file permissions. e2eskipper.SkipIfNodeOSDistroIs("windows") defaultMode := int32(0440) /* setting fsGroup sets mode to at least 440 */ @@ -75,7 +75,7 @@ var _ = SIGDescribe("Projected configMap", func() { doProjectedConfigMapE2EWithoutMappings(ctx, f, true, 0, nil) }) - f.It("should be consumable from pods in volume as non-root with FSGroup [LinuxOnly]", func(ctx context.Context) { + f.It("should be consumable from pods in volume as non-root with FSGroup [LinuxOnly]", f.WithNodeConformance(), func(ctx context.Context) { // Windows does not support RunAsUser / FSGroup SecurityContext options. e2eskipper.SkipIfNodeOSDistroIs("windows") doProjectedConfigMapE2EWithoutMappings(ctx, f, true, 1001, nil) @@ -110,7 +110,7 @@ var _ = SIGDescribe("Projected configMap", func() { doProjectedConfigMapE2EWithMappings(ctx, f, true, 0, nil) }) - f.It("should be consumable from pods in volume with mappings as non-root with FSGroup [LinuxOnly]", func(ctx context.Context) { + f.It("should be consumable from pods in volume with mappings as non-root with FSGroup [LinuxOnly]", f.WithNodeConformance(), func(ctx context.Context) { // Windows does not support RunAsUser / FSGroup SecurityContext options. e2eskipper.SkipIfNodeOSDistroIs("windows") doProjectedConfigMapE2EWithMappings(ctx, f, true, 1001, nil) @@ -460,7 +460,7 @@ var _ = SIGDescribe("Projected configMap", func() { //The pod is in pending during volume creation until the configMap objects are available //or until mount the configMap volume times out. There is no configMap object defined for the pod, so it should return timeout exception unless it is marked optional. //Slow (~5 mins) - f.It("Should fail non-optional pod creation due to configMap object does not exist", f.WithSlow(), func(ctx context.Context) { + f.It("Should fail non-optional pod creation due to configMap object does not exist", f.WithSlow(), f.WithNodeConformance(), func(ctx context.Context) { volumeMountPath := "/etc/projected-configmap-volumes" pod := createNonOptionalConfigMapPod(ctx, f, volumeMountPath) getPod := e2epod.Get(f.ClientSet, pod) @@ -470,7 +470,7 @@ var _ = SIGDescribe("Projected configMap", func() { //ConfigMap object defined for the pod, If a key is specified which is not present in the ConfigMap, // the volume setup will error unless it is marked optional, during the pod creation. //Slow (~5 mins) - f.It("Should fail non-optional pod creation due to the key in the configMap object does not exist", f.WithSlow(), func(ctx context.Context) { + f.It("Should fail non-optional pod creation due to the key in the configMap object does not exist", f.WithSlow(), f.WithNodeConformance(), func(ctx context.Context) { volumeMountPath := "/etc/configmap-volumes" pod := createNonOptionalConfigMapPodWithConfig(ctx, f, volumeMountPath) getPod := e2epod.Get(f.ClientSet, pod) diff --git a/test/e2e/common/storage/projected_downwardapi.go b/test/e2e/common/storage/projected_downwardapi.go index 78ed1c90228..2c0b605f57b 100644 --- a/test/e2e/common/storage/projected_downwardapi.go +++ b/test/e2e/common/storage/projected_downwardapi.go @@ -92,7 +92,7 @@ var _ = SIGDescribe("Projected downwardAPI", func() { }) }) - f.It("should provide podname as non-root with fsgroup [LinuxOnly]", func(ctx context.Context) { + f.It("should provide podname as non-root with fsgroup [LinuxOnly]", f.WithNodeConformance(), func(ctx context.Context) { // Windows does not support RunAsUser / FSGroup SecurityContext options. e2eskipper.SkipIfNodeOSDistroIs("windows") podName := "metadata-volume-" + string(uuid.NewUUID()) @@ -107,7 +107,7 @@ var _ = SIGDescribe("Projected downwardAPI", func() { }) }) - f.It("should provide podname as non-root with fsgroup and defaultMode [LinuxOnly]", func(ctx context.Context) { + f.It("should provide podname as non-root with fsgroup and defaultMode [LinuxOnly]", f.WithNodeConformance(), func(ctx context.Context) { // Windows does not support RunAsUser / FSGroup SecurityContext options, and it does not support setting file permissions. e2eskipper.SkipIfNodeOSDistroIs("windows") podName := "metadata-volume-" + string(uuid.NewUUID()) diff --git a/test/e2e/common/storage/projected_secret.go b/test/e2e/common/storage/projected_secret.go index cf1f81ea61e..d26d17ce805 100644 --- a/test/e2e/common/storage/projected_secret.go +++ b/test/e2e/common/storage/projected_secret.go @@ -411,7 +411,7 @@ var _ = SIGDescribe("Projected secret", func() { //The secret is in pending during volume creation until the secret objects are available //or until mount the secret volume times out. There is no secret object defined for the pod, so it should return timeout exception unless it is marked optional. //Slow (~5 mins) - f.It("Should fail non-optional pod creation due to secret object does not exist", f.WithSlow(), func(ctx context.Context) { + f.It("Should fail non-optional pod creation due to secret object does not exist", f.WithSlow(), f.WithNodeConformance(), func(ctx context.Context) { volumeMountPath := "/etc/projected-secret-volumes" podName := "pod-secrets-" + string(uuid.NewUUID()) pod := createNonOptionalSecretPod(ctx, f, volumeMountPath, podName) @@ -422,7 +422,7 @@ var _ = SIGDescribe("Projected secret", func() { //Secret object defined for the pod, If a key is specified which is not present in the secret, // the volume setup will error unless it is marked optional, during the pod creation. //Slow (~5 mins) - f.It("Should fail non-optional pod creation due to the key in the secret object does not exist", f.WithSlow(), func(ctx context.Context) { + f.It("Should fail non-optional pod creation due to the key in the secret object does not exist", f.WithSlow(), f.WithNodeConformance(), func(ctx context.Context) { volumeMountPath := "/etc/secret-volumes" podName := "pod-secrets-" + string(uuid.NewUUID()) pod := createNonOptionalSecretPodWithSecret(ctx, f, volumeMountPath, podName) diff --git a/test/e2e/common/storage/secrets_volume.go b/test/e2e/common/storage/secrets_volume.go index a41595aa9ae..22cb3eea430 100644 --- a/test/e2e/common/storage/secrets_volume.go +++ b/test/e2e/common/storage/secrets_volume.go @@ -436,7 +436,7 @@ var _ = SIGDescribe("Secrets", func() { // The secret is in pending during volume creation until the secret objects are available // or until mount the secret volume times out. There is no secret object defined for the pod, so it should return timeout exception unless it is marked optional. // Slow (~5 mins) - f.It("Should fail non-optional pod creation due to secret object does not exist", f.WithSlow(), func(ctx context.Context) { + f.It("Should fail non-optional pod creation due to secret object does not exist", f.WithSlow(), f.WithNodeConformance(), func(ctx context.Context) { volumeMountPath := "/etc/secret-volumes" podName := "pod-secrets-" + string(uuid.NewUUID()) pod := createNonOptionalSecretPod(ctx, f, volumeMountPath, podName) @@ -447,7 +447,7 @@ var _ = SIGDescribe("Secrets", func() { // Secret object defined for the pod, If a key is specified which is not present in the secret, // the volume setup will error unless it is marked optional, during the pod creation. // Slow (~5 mins) - f.It("Should fail non-optional pod creation due to the key in the secret object does not exist", f.WithSlow(), func(ctx context.Context) { + f.It("Should fail non-optional pod creation due to the key in the secret object does not exist", f.WithSlow(), f.WithNodeConformance(), func(ctx context.Context) { volumeMountPath := "/etc/secret-volumes" podName := "pod-secrets-" + string(uuid.NewUUID()) pod := createNonOptionalSecretPodWithSecret(ctx, f, volumeMountPath, podName) diff --git a/test/e2e/feature/feature.go b/test/e2e/feature/feature.go index b0bf9feaf7d..0df876ca542 100644 --- a/test/e2e/feature/feature.go +++ b/test/e2e/feature/feature.go @@ -129,6 +129,10 @@ var ( // their dependency on specific feature gates and the corresponding API groups. DynamicResourceAllocation = framework.WithFeature(framework.ValidFeatures.Add("DynamicResourceAllocation")) + // Owner: sig-node + // EnvFiles is used for testing the EnvFiles feature (file-based environment variables). + EnvFiles = framework.WithFeature(framework.ValidFeatures.Add("EnvFiles")) + // TODO: document the feature (owning SIG, when to use this feature for a test) EphemeralStorage = framework.WithFeature(framework.ValidFeatures.Add("EphemeralStorage")) @@ -202,6 +206,10 @@ var ( // ImageVolume is used for testing the image volume source feature (https://kep.k8s.io/4639). ImageVolume = framework.WithFeature(framework.ValidFeatures.Add("ImageVolume")) + // Owner: sig-node + // InPlacePodVerticalScaling is used for testing in-place pod vertical scaling (https://kep.k8s.io/1287). + InPlacePodVerticalScaling = framework.WithFeature(framework.ValidFeatures.Add("InPlacePodVerticalScaling")) + // Owner: sig-network // Marks tests that require a conforming implementation of // Ingress.networking.k8s.io to be present. @@ -446,6 +454,10 @@ var ( // TODO: document the feature (owning SIG, when to use this feature for a test) StorageVersionAPI = framework.WithFeature(framework.ValidFeatures.Add("StorageVersionAPI")) + // Owner: sig-node + // SupplementalGroupsPolicy is used for testing the SupplementalGroupsPolicy feature. + SupplementalGroupsPolicy = framework.WithFeature(framework.ValidFeatures.Add("SupplementalGroupsPolicy")) + // The Swap feature tests must run on nodes with the swap memory allocated and kubelet swap enabled. KEP-2400 (Node Swap Support) Swap = framework.WithFeature(framework.ValidFeatures.Add("NodeSwap")) diff --git a/test/e2e_node/mount_rro_linux_test.go b/test/e2e_node/mount_rro_linux_test.go index fae4c72a291..bf6fabb2e46 100644 --- a/test/e2e_node/mount_rro_linux_test.go +++ b/test/e2e_node/mount_rro_linux_test.go @@ -33,7 +33,7 @@ import ( "k8s.io/utils/ptr" ) -var _ = SIGDescribe("Mount recursive read-only [LinuxOnly]", func() { +var _ = SIGDescribe("Mount recursive read-only [LinuxOnly]", framework.WithNodeConformance(), func() { f := framework.NewDefaultFramework("mount-rro") f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged ginkgo.Describe("Mount recursive read-only", func() { diff --git a/test/e2e_node/pod_conditions_test.go b/test/e2e_node/pod_conditions_test.go index 46ff72033f2..103fccc9c3a 100644 --- a/test/e2e_node/pod_conditions_test.go +++ b/test/e2e_node/pod_conditions_test.go @@ -62,7 +62,7 @@ var _ = SIGDescribe("Pod conditions managed by Kubelet", func() { addAfterEachForCleaningUpPods(f) }) - ginkgo.Context("without PodReadyToStartContainersCondition condition", func() { + f.Context("without PodReadyToStartContainersCondition condition", f.WithNodeConformance(), func() { ginkgo.It("a pod without init containers should report all conditions set in expected order after the pod is up", runPodReadyConditionsTest(f, false, false)) ginkgo.It("a pod with init containers should report all conditions set in expected order after the pod is up", runPodReadyConditionsTest(f, true, false)) ginkgo.It("a pod failing to mount volumes and without init containers should report scheduled and initialized conditions set", runPodFailingConditionsTest(f, false, false)) diff --git a/test/e2e_node/pod_host_ips.go b/test/e2e_node/pod_host_ips.go index 2e6439608cb..1e6a2113bef 100644 --- a/test/e2e_node/pod_host_ips.go +++ b/test/e2e_node/pod_host_ips.go @@ -37,7 +37,7 @@ import ( admissionapi "k8s.io/pod-security-admission/api" ) -var _ = common.SIGDescribe("Pod Host IPs", func() { +var _ = common.SIGDescribe("Pod Host IPs", framework.WithNodeConformance(), func() { f := framework.NewDefaultFramework("host-ips") f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged diff --git a/test/e2e_node/pod_ips.go b/test/e2e_node/pod_ips.go index 3ac38d5042c..578a654dcba 100644 --- a/test/e2e_node/pod_ips.go +++ b/test/e2e_node/pod_ips.go @@ -38,7 +38,7 @@ import ( admissionapi "k8s.io/pod-security-admission/api" ) -var _ = common.SIGDescribe("Pod IPs", func() { +var _ = common.SIGDescribe("Pod IPs", framework.WithNodeConformance(), func() { f := framework.NewDefaultFramework("pod-ips") f.NamespacePodSecurityLevel = admissionapi.LevelRestricted testFinalizer := "example.com/test-finalizer" diff --git a/test/e2e_node/runtimeclass_test.go b/test/e2e_node/runtimeclass_test.go index 8505bc04d6e..467f24f7486 100644 --- a/test/e2e_node/runtimeclass_test.go +++ b/test/e2e_node/runtimeclass_test.go @@ -90,7 +90,7 @@ func makePodToVerifyCgroupSize(cgroupNames []string, expectedCPU string, expecte return pod } -var _ = SIGDescribe("Kubelet PodOverhead handling [LinuxOnly]", func() { +var _ = SIGDescribe("Kubelet PodOverhead handling [LinuxOnly]", framework.WithNodeConformance(), func() { f := framework.NewDefaultFramework("podoverhead-handling") f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged ginkgo.Describe("PodOverhead cgroup accounting", func() { diff --git a/test/e2e_node/terminate_pods_test.go b/test/e2e_node/terminate_pods_test.go index b5de26f52c0..dbc8225dbec 100644 --- a/test/e2e_node/terminate_pods_test.go +++ b/test/e2e_node/terminate_pods_test.go @@ -32,7 +32,7 @@ import ( e2epod "k8s.io/kubernetes/test/e2e/framework/pod" ) -var _ = SIGDescribe("Terminate Pods", func() { +var _ = SIGDescribe("Terminate Pods", framework.WithNodeConformance(), func() { f := framework.NewDefaultFramework("terminate-pods") f.NamespacePodSecurityLevel = admissionapi.LevelBaseline