From 8b1b06c507fa754ff940911fcbe45c54b30eae26 Mon Sep 17 00:00:00 2001 From: Danielle Lancashire Date: Tue, 5 Oct 2021 10:26:10 +0200 Subject: [PATCH 1/4] e2e_node: Remove KubeletPodResources enablement as it is a default gate --- test/e2e_node/device_plugin_test.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/test/e2e_node/device_plugin_test.go b/test/e2e_node/device_plugin_test.go index 9e4493f3a21..0de90d98717 100644 --- a/test/e2e_node/device_plugin_test.go +++ b/test/e2e_node/device_plugin_test.go @@ -34,8 +34,6 @@ import ( "k8s.io/apimachinery/pkg/util/uuid" kubeletpodresourcesv1 "k8s.io/kubelet/pkg/apis/podresources/v1" kubeletpodresourcesv1alpha1 "k8s.io/kubelet/pkg/apis/podresources/v1alpha1" - "k8s.io/kubernetes/pkg/features" - kubeletconfig "k8s.io/kubernetes/pkg/kubelet/apis/config" "k8s.io/kubernetes/test/e2e/framework" e2enode "k8s.io/kubernetes/test/e2e/framework/node" e2epod "k8s.io/kubernetes/test/e2e/framework/pod" @@ -113,12 +111,6 @@ func testDevicePlugin(f *framework.Framework, pluginSockDir string) { pluginSockDir = filepath.Join(pluginSockDir) + "/" ginkgo.Context("DevicePlugin", func() { ginkgo.By("Enabling support for Kubelet Plugins Watcher") - tempSetCurrentKubeletConfig(f, func(initialConfig *kubeletconfig.KubeletConfiguration) { - if initialConfig.FeatureGates == nil { - initialConfig.FeatureGates = map[string]bool{} - } - initialConfig.FeatureGates[string(features.KubeletPodResources)] = true - }) ginkgo.It("[Flaky] Verifies the Kubelet device plugin functionality.", func() { ginkgo.By("Wait for node is ready to start with") e2enode.WaitForNodeToBeReady(f.ClientSet, framework.TestContext.NodeName, 5*time.Minute) From 71e6d9cbe0278593ea27ae271eb9a6566569c82d Mon Sep 17 00:00:00 2001 From: Danielle Lancashire Date: Tue, 5 Oct 2021 10:36:32 +0200 Subject: [PATCH 2/4] e2e_node: remove no-op config change from critical_pod_test --- test/e2e_node/critical_pod_test.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/test/e2e_node/critical_pod_test.go b/test/e2e_node/critical_pod_test.go index 45eda9ffa21..2135fc99ab6 100644 --- a/test/e2e_node/critical_pod_test.go +++ b/test/e2e_node/critical_pod_test.go @@ -25,7 +25,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" kubeapi "k8s.io/kubernetes/pkg/apis/core" "k8s.io/kubernetes/pkg/apis/scheduling" - kubeletconfig "k8s.io/kubernetes/pkg/kubelet/apis/config" kubelettypes "k8s.io/kubernetes/pkg/kubelet/types" "k8s.io/kubernetes/test/e2e/framework" e2eskipper "k8s.io/kubernetes/test/e2e/framework/skipper" @@ -44,12 +43,6 @@ const ( var _ = SIGDescribe("CriticalPod [Serial] [Disruptive] [NodeFeature:CriticalPod]", func() { f := framework.NewDefaultFramework("critical-pod-test") ginkgo.Context("when we need to admit a critical pod", func() { - tempSetCurrentKubeletConfig(f, func(initialConfig *kubeletconfig.KubeletConfiguration) { - if initialConfig.FeatureGates == nil { - initialConfig.FeatureGates = make(map[string]bool) - } - }) - ginkgo.It("[Flaky] should be able to create and delete a critical pod", func() { configEnabled, err := isKubeletConfigEnabled(f) framework.ExpectNoError(err) From f28dd90810215353403793d549527bc51b6e7b3c Mon Sep 17 00:00:00 2001 From: Danielle Lancashire Date: Tue, 5 Oct 2021 10:54:44 +0200 Subject: [PATCH 3/4] e2e_node: NodeGracefulShutdown is a Beta feature --- test/e2e_node/node_shutdown_linux_test.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/test/e2e_node/node_shutdown_linux_test.go b/test/e2e_node/node_shutdown_linux_test.go index 1203a072695..e21c5f35da9 100644 --- a/test/e2e_node/node_shutdown_linux_test.go +++ b/test/e2e_node/node_shutdown_linux_test.go @@ -32,7 +32,6 @@ import ( "github.com/onsi/ginkgo" "github.com/onsi/gomega" "k8s.io/kubernetes/pkg/apis/scheduling" - "k8s.io/kubernetes/pkg/features" "k8s.io/kubernetes/test/e2e/framework" v1 "k8s.io/api/core/v1" @@ -42,7 +41,7 @@ import ( testutils "k8s.io/kubernetes/test/utils" ) -var _ = SIGDescribe("GracefulNodeShutdown [Serial] [NodeAlphaFeature:GracefulNodeShutdown]", func() { +var _ = SIGDescribe("GracefulNodeShutdown [Serial] [NodeFeature:GracefulNodeShutdown]", func() { f := framework.NewDefaultFramework("graceful-node-shutdown") ginkgo.Context("when gracefully shutting down", func() { @@ -55,9 +54,6 @@ var _ = SIGDescribe("GracefulNodeShutdown [Serial] [NodeAlphaFeature:GracefulNod ) tempSetCurrentKubeletConfig(f, func(initialConfig *kubeletconfig.KubeletConfiguration) { - initialConfig.FeatureGates = map[string]bool{ - string(features.GracefulNodeShutdown): true, - } initialConfig.ShutdownGracePeriod = metav1.Duration{Duration: nodeShutdownGracePeriod} initialConfig.ShutdownGracePeriodCriticalPods = metav1.Duration{Duration: nodeShutdownGracePeriodCriticalPods} }) From 742d3d36f5f46866c06c2a267ea38e382f817ecb Mon Sep 17 00:00:00 2001 From: Danielle Lancashire Date: Tue, 5 Oct 2021 10:59:08 +0200 Subject: [PATCH 4/4] e2e_node: cleanup features in podresources --- test/e2e_node/podresources_test.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/test/e2e_node/podresources_test.go b/test/e2e_node/podresources_test.go index e72ead5df49..7bb3b8bbb12 100644 --- a/test/e2e_node/podresources_test.go +++ b/test/e2e_node/podresources_test.go @@ -664,11 +664,7 @@ func configurePodResourcesInKubelet(f *framework.Framework, cleanStateFile bool, oldCfg, err := getCurrentKubeletConfig() framework.ExpectNoError(err) newCfg := oldCfg.DeepCopy() - if newCfg.FeatureGates == nil { - newCfg.FeatureGates = make(map[string]bool) - } - newCfg.FeatureGates["CPUManager"] = true - newCfg.FeatureGates["KubeletPodResourcesGetAllocatable"] = true + newCfg.FeatureGates[string(kubefeatures.KubeletPodResourcesGetAllocatable)] = true // After graduation of the CPU Manager feature to Beta, the CPU Manager // "none" policy is ON by default. But when we set the CPU Manager policy to