diff --git a/test/e2e/common/node/container_probe.go b/test/e2e/common/node/container_probe.go index a2b31c04767..a3b10a744c3 100644 --- a/test/e2e/common/node/container_probe.go +++ b/test/e2e/common/node/container_probe.go @@ -34,6 +34,7 @@ import ( clientset "k8s.io/client-go/kubernetes" "k8s.io/client-go/tools/cache" podutil "k8s.io/kubernetes/pkg/api/v1/pod" + "k8s.io/kubernetes/pkg/features" "k8s.io/kubernetes/pkg/kubelet/events" "k8s.io/kubernetes/test/e2e/feature" "k8s.io/kubernetes/test/e2e/framework" @@ -729,7 +730,7 @@ done }) }) -var _ = SIGDescribe(feature.SidecarContainers, "Probing restartable init container", func() { +var _ = SIGDescribe(feature.SidecarContainers, framework.WithFeatureGate(features.SidecarContainers), "Probing restartable init container", func() { f := framework.NewDefaultFramework("container-probe") f.NamespacePodSecurityLevel = admissionapi.LevelBaseline var podClient *e2epod.PodClient diff --git a/test/e2e/common/node/lifecycle_hook.go b/test/e2e/common/node/lifecycle_hook.go index a666b87f1ff..eeca6dc3111 100644 --- a/test/e2e/common/node/lifecycle_hook.go +++ b/test/e2e/common/node/lifecycle_hook.go @@ -26,6 +26,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/intstr" utilrand "k8s.io/apimachinery/pkg/util/rand" + "k8s.io/kubernetes/pkg/features" "k8s.io/kubernetes/test/e2e/feature" "k8s.io/kubernetes/test/e2e/framework" e2enode "k8s.io/kubernetes/test/e2e/framework/node" @@ -255,7 +256,7 @@ var _ = SIGDescribe("Container Lifecycle Hook", func() { }) }) -var _ = SIGDescribe(feature.SidecarContainers, "Restartable Init Container Lifecycle Hook", func() { +var _ = SIGDescribe(feature.SidecarContainers, framework.WithFeatureGate(features.SidecarContainers), "Restartable Init Container Lifecycle Hook", func() { f := framework.NewDefaultFramework("restartable-init-container-lifecycle-hook") f.NamespacePodSecurityLevel = admissionapi.LevelBaseline var podClient *e2epod.PodClient @@ -551,7 +552,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(feature.PodLifecycleSleepAction, func() { +var _ = SIGDescribe(feature.PodLifecycleSleepAction, framework.WithFeatureGate(features.PodLifecycleSleepAction), func() { f := framework.NewDefaultFramework("pod-lifecycle-sleep-action") f.NamespacePodSecurityLevel = admissionapi.LevelBaseline var podClient *e2epod.PodClient @@ -630,7 +631,7 @@ var _ = SIGDescribe(feature.PodLifecycleSleepAction, func() { }) }) -var _ = SIGDescribe(feature.PodLifecycleSleepActionAllowZero, func() { +var _ = SIGDescribe(feature.PodLifecycleSleepActionAllowZero, framework.WithFeatureGate(features.PodLifecycleSleepActionAllowZero), func() { f := framework.NewDefaultFramework("pod-lifecycle-sleep-action-allow-zero") f.NamespacePodSecurityLevel = admissionapi.LevelBaseline var podClient *e2epod.PodClient @@ -663,7 +664,7 @@ var _ = SIGDescribe(feature.PodLifecycleSleepActionAllowZero, func() { }) }) -var _ = SIGDescribe(feature.ContainerStopSignals, func() { +var _ = SIGDescribe(feature.ContainerStopSignals, framework.WithFeatureGate(features.ContainerStopSignals), func() { f := framework.NewDefaultFramework("container-stop-signals") f.NamespacePodSecurityLevel = admissionapi.LevelBaseline var podClient *e2epod.PodClient diff --git a/test/e2e/common/node/pod_level_resources.go b/test/e2e/common/node/pod_level_resources.go index 2633da386c6..cfb88e23186 100644 --- a/test/e2e/common/node/pod_level_resources.go +++ b/test/e2e/common/node/pod_level_resources.go @@ -27,6 +27,7 @@ import ( v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" utilerrors "k8s.io/apimachinery/pkg/util/errors" + "k8s.io/kubernetes/pkg/features" "k8s.io/kubernetes/test/e2e/common/node/framework/cgroups" "k8s.io/kubernetes/test/e2e/feature" "k8s.io/kubernetes/test/e2e/framework" @@ -41,7 +42,7 @@ var ( cmd = e2epod.InfiniteSleepCommand ) -var _ = SIGDescribe("Pod Level Resources", framework.WithSerial(), feature.PodLevelResources, func() { +var _ = SIGDescribe("Pod Level Resources", framework.WithSerial(), feature.PodLevelResources, framework.WithFeatureGate(features.PodLevelResources), func() { f := framework.NewDefaultFramework("pod-level-resources-tests") f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged diff --git a/test/e2e/common/node/security_context.go b/test/e2e/common/node/security_context.go index 435613141a2..0bad8e86bf3 100644 --- a/test/e2e/common/node/security_context.go +++ b/test/e2e/common/node/security_context.go @@ -969,7 +969,7 @@ var _ = SIGDescribe("User Namespaces for Pod Security Standards [LinuxOnly]", fu f.NamespacePodSecurityLevel = admissionapi.LevelRestricted ginkgo.Context("with UserNamespacesSupport and UserNamespacesPodSecurityStandards enabled", func() { - f.It("should allow pod", feature.UserNamespacesPodSecurityStandards, func(ctx context.Context) { + f.It("should allow pod", feature.UserNamespacesPodSecurityStandards, framework.WithFeatureGate(features.UserNamespacesSupport), framework.WithFeatureGate(features.UserNamespacesPodSecurityStandards), func(ctx context.Context) { name := "pod-user-namespaces-pss-" + string(uuid.NewUUID()) pod := &v1.Pod{ ObjectMeta: metav1.ObjectMeta{Name: name}, diff --git a/test/e2e/node/kubelet.go b/test/e2e/node/kubelet.go index 7744de2593e..3a4de508dc3 100644 --- a/test/e2e/node/kubelet.go +++ b/test/e2e/node/kubelet.go @@ -35,6 +35,7 @@ import ( "k8s.io/apimachinery/pkg/util/uuid" "k8s.io/apimachinery/pkg/util/wait" clientset "k8s.io/client-go/kubernetes" + "k8s.io/kubernetes/pkg/features" admissionapi "k8s.io/pod-security-admission/api" "k8s.io/kubernetes/test/e2e/feature" @@ -642,7 +643,7 @@ var _ = SIGDescribe("kubelet", func() { }) }) -var _ = SIGDescribe("specific log stream", feature.PodLogsQuerySplitStreams, func() { +var _ = SIGDescribe("specific log stream", feature.PodLogsQuerySplitStreams, framework.WithFeatureGate(features.PodLogsQuerySplitStreams), func() { var ( c clientset.Interface ns string