mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-07-18 04:54:54 +00:00
Merge pull request #131746 from haircommander/e2e-label
e2e: add corresponding featuregate label to node features
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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},
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user