diff --git a/test/e2e/dra/dra.go b/test/e2e/dra/dra.go index 59d6063f1e5..c90eac646d7 100644 --- a/test/e2e/dra/dra.go +++ b/test/e2e/dra/dra.go @@ -45,6 +45,7 @@ import ( "k8s.io/client-go/kubernetes" "k8s.io/dynamic-resource-allocation/resourceslice" "k8s.io/klog/v2" + "k8s.io/kubernetes/pkg/features" "k8s.io/kubernetes/test/e2e/feature" "k8s.io/kubernetes/test/e2e/framework" e2edaemonset "k8s.io/kubernetes/test/e2e/framework/daemonset" @@ -79,7 +80,7 @@ func perNode(maxAllocations int, nodes *Nodes) func() Resources { } } -var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, func() { +var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, framework.WithFeatureGate(features.DynamicResourceAllocation), func() { f := framework.NewDefaultFramework("dra") // The driver containers have to run with sufficient privileges to @@ -404,7 +405,7 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, }).WithTimeout(f.Timeouts.PodDelete).Should(gomega.HaveField("Status.Allocation", (*resourceapi.AllocationResult)(nil))) }) - f.It("must be possible for the driver to update the ResourceClaim.Status.Devices once allocated", feature.DRAResourceClaimDeviceStatus, func(ctx context.Context) { + f.It("must be possible for the driver to update the ResourceClaim.Status.Devices once allocated", feature.DRAResourceClaimDeviceStatus, framework.WithFeatureGate(features.DRAResourceClaimDeviceStatus), framework.WithFeatureGate(features.DynamicResourceAllocation), func(ctx context.Context) { pod := b.podExternal() claim := b.externalClaim() b.create(ctx, claim, pod) @@ -898,7 +899,7 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, driver := NewDriver(f, nodes, networkResources) b := newBuilder(f, driver) - f.It("support validating admission policy for admin access", feature.DRAAdminAccess, func(ctx context.Context) { + f.It("support validating admission policy for admin access", feature.DRAAdminAccess, framework.WithFeatureGate(features.DRAAdminAccess), framework.WithFeatureGate(features.DynamicResourceAllocation), func(ctx context.Context) { // Create VAP, after making it unique to the current test. adminAccessPolicyYAML := strings.ReplaceAll(adminAccessPolicyYAML, "dra.example.com", b.f.UniqueName) driver.createFromYAML(ctx, []byte(adminAccessPolicyYAML), "") @@ -1017,7 +1018,7 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, }).Should(gomega.MatchError(gomega.ContainSubstring("exceeded quota: object-count, requested: count/resourceclaims.resource.k8s.io=1, used: count/resourceclaims.resource.k8s.io=1, limited: count/resourceclaims.resource.k8s.io=1")), "creating second claim not allowed") }) - f.It("DaemonSet with admin access", feature.DRAAdminAccess, func(ctx context.Context) { + f.It("DaemonSet with admin access", feature.DRAAdminAccess, framework.WithFeatureGate(features.DRAAdminAccess), framework.WithFeatureGate(features.DynamicResourceAllocation), func(ctx context.Context) { pod, template := b.podInline() template.Spec.Spec.Devices.Requests[0].AdminAccess = ptr.To(true) // Limit the daemon set to the one node where we have the driver.