From ba7a74a0bef0419ec5b753339d336b58637fb9e9 Mon Sep 17 00:00:00 2001 From: Ed Bartosh Date: Thu, 15 Feb 2024 16:36:29 +0200 Subject: [PATCH] e2e_node: fix DevicePlugin feature flags Feature:DevicePluginProbe and NodeFeature:DevicePluginProbe are not used by any of the test-infra jobs. This commit renames NodeFeature:DevicePluginProbe to NodeFeature:DevicePlugin and removes Feature:DevicePlugin and Feature:DeviceManager to avoid having both Feature and NodeFeature tags for the same feature. NOTE: Test-infra SIG-Node jobs should focus on the NodeFeature:DevicePlugin to run generic Device Plugins tests. --- test/e2e/feature/feature.go | 6 ------ test/e2e/nodefeature/nodefeature.go | 2 +- test/e2e_node/device_manager_test.go | 3 +-- test/e2e_node/device_plugin_test.go | 3 +-- 4 files changed, 3 insertions(+), 11 deletions(-) diff --git a/test/e2e/feature/feature.go b/test/e2e/feature/feature.go index a8358d0d559..8db50487495 100644 --- a/test/e2e/feature/feature.go +++ b/test/e2e/feature/feature.go @@ -91,12 +91,6 @@ var ( // TODO: document the feature (owning SIG, when to use this feature for a test) CustomMetricsAutoscaling = framework.WithFeature(framework.ValidFeatures.Add("CustomMetricsAutoscaling")) - // TODO: document the feature (owning SIG, when to use this feature for a test) - DeviceManager = framework.WithFeature(framework.ValidFeatures.Add("DeviceManager")) - - // TODO: document the feature (owning SIG, when to use this feature for a test) - DevicePluginProbe = framework.WithFeature(framework.ValidFeatures.Add("DevicePluginProbe")) - // TODO: document the feature (owning SIG, when to use this feature for a test) Downgrade = framework.WithFeature(framework.ValidFeatures.Add("Downgrade")) diff --git a/test/e2e/nodefeature/nodefeature.go b/test/e2e/nodefeature/nodefeature.go index 1a1f425a91a..63d8751f54a 100644 --- a/test/e2e/nodefeature/nodefeature.go +++ b/test/e2e/nodefeature/nodefeature.go @@ -38,7 +38,7 @@ var ( DeviceManager = framework.WithNodeFeature(framework.ValidNodeFeatures.Add("DeviceManager")) // TODO: document the feature (owning SIG, when to use this feature for a test) - DevicePluginProbe = framework.WithNodeFeature(framework.ValidNodeFeatures.Add("DevicePluginProbe")) + DevicePlugin = framework.WithNodeFeature(framework.ValidNodeFeatures.Add("DevicePlugin")) // TODO: document the feature (owning SIG, when to use this feature for a test) DownwardAPIHugePages = framework.WithNodeFeature(framework.ValidNodeFeatures.Add("DownwardAPIHugePages")) diff --git a/test/e2e_node/device_manager_test.go b/test/e2e_node/device_manager_test.go index 4c39fb19251..af608dc15d9 100644 --- a/test/e2e_node/device_manager_test.go +++ b/test/e2e_node/device_manager_test.go @@ -33,7 +33,6 @@ import ( "k8s.io/klog/v2" admissionapi "k8s.io/pod-security-admission/api" - "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" @@ -52,7 +51,7 @@ const ( ) // Serial because the test updates kubelet configuration. -var _ = SIGDescribe("Device Manager", framework.WithSerial(), feature.DeviceManager, nodefeature.DeviceManager, func() { +var _ = SIGDescribe("Device Manager", framework.WithSerial(), nodefeature.DeviceManager, func() { f := framework.NewDefaultFramework("devicemanager-test") f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged diff --git a/test/e2e_node/device_plugin_test.go b/test/e2e_node/device_plugin_test.go index 749dabc9e62..788822f10e6 100644 --- a/test/e2e_node/device_plugin_test.go +++ b/test/e2e_node/device_plugin_test.go @@ -49,7 +49,6 @@ import ( kubeletpodresourcesv1 "k8s.io/kubelet/pkg/apis/podresources/v1" kubeletpodresourcesv1alpha1 "k8s.io/kubelet/pkg/apis/podresources/v1alpha1" "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" e2epod "k8s.io/kubernetes/test/e2e/framework/pod" @@ -64,7 +63,7 @@ var ( ) // Serial because the test restarts Kubelet -var _ = SIGDescribe("Device Plugin", feature.DevicePluginProbe, nodefeature.DevicePluginProbe, framework.WithSerial(), func() { +var _ = SIGDescribe("Device Plugin", nodefeature.DevicePlugin, framework.WithSerial(), func() { f := framework.NewDefaultFramework("device-plugin-errors") f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged testDevicePlugin(f, kubeletdevicepluginv1beta1.DevicePluginPath)