From 6219d34e02e5b8a0658b6dcde2188eb5eceac3e3 Mon Sep 17 00:00:00 2001 From: Jonathan Dobson Date: Fri, 6 Jan 2023 10:39:14 -0700 Subject: [PATCH 1/2] UPSTREAM: 112993: remove in-tree volume limits test now that CSIMigration is GA --- test/e2e/storage/volume_limits.go | 64 ------------------------------- 1 file changed, 64 deletions(-) delete mode 100644 test/e2e/storage/volume_limits.go diff --git a/test/e2e/storage/volume_limits.go b/test/e2e/storage/volume_limits.go deleted file mode 100644 index 81620a4d5389e..0000000000000 --- a/test/e2e/storage/volume_limits.go +++ /dev/null @@ -1,64 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package storage - -import ( - "github.com/onsi/ginkgo/v2" - "k8s.io/api/core/v1" - clientset "k8s.io/client-go/kubernetes" - v1helper "k8s.io/kubernetes/pkg/apis/core/v1/helper" - "k8s.io/kubernetes/test/e2e/framework" - e2enode "k8s.io/kubernetes/test/e2e/framework/node" - e2eskipper "k8s.io/kubernetes/test/e2e/framework/skipper" - "k8s.io/kubernetes/test/e2e/storage/utils" - admissionapi "k8s.io/pod-security-admission/api" -) - -var _ = utils.SIGDescribe("Volume limits", func() { - var ( - c clientset.Interface - ) - f := framework.NewDefaultFramework("volume-limits-on-node") - f.NamespacePodSecurityEnforceLevel = admissionapi.LevelPrivileged - ginkgo.BeforeEach(func() { - e2eskipper.SkipUnlessProviderIs("aws", "gce", "gke") - c = f.ClientSet - framework.ExpectNoError(framework.WaitForAllNodesSchedulable(c, framework.TestContext.NodeSchedulableTimeout)) - }) - - ginkgo.It("should verify that all nodes have volume limits", func() { - nodeList, err := e2enode.GetReadySchedulableNodes(f.ClientSet) - framework.ExpectNoError(err) - for _, node := range nodeList.Items { - volumeLimits := getVolumeLimit(&node) - if len(volumeLimits) == 0 { - framework.Failf("Expected volume limits to be set") - } - } - }) -}) - -func getVolumeLimit(node *v1.Node) map[v1.ResourceName]int64 { - volumeLimits := map[v1.ResourceName]int64{} - nodeAllocatables := node.Status.Allocatable - for k, v := range nodeAllocatables { - if v1helper.IsAttachableVolumeResourceName(k) { - volumeLimits[k] = v.Value() - } - } - return volumeLimits -} From 94421b50a143014f44e00004b78be1e1d9b33357 Mon Sep 17 00:00:00 2001 From: Jonathan Dobson Date: Fri, 6 Jan 2023 11:55:25 -0700 Subject: [PATCH 2/2] UPSTREAM: : update e2e test annotations --- .../e2e/annotate/generated/zz_generated.annotations.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/openshift-hack/e2e/annotate/generated/zz_generated.annotations.go b/openshift-hack/e2e/annotate/generated/zz_generated.annotations.go index 9e5b1adbf5608..931d78f196135 100644 --- a/openshift-hack/e2e/annotate/generated/zz_generated.annotations.go +++ b/openshift-hack/e2e/annotate/generated/zz_generated.annotations.go @@ -13887,8 +13887,6 @@ var Annotations = map[string]string{ "[sig-storage] Volume Provisioning on Datastore [Feature:vsphere] verify dynamically provisioned pv using storageclass fails on an invalid datastore": " [Suite:openshift/conformance/parallel] [Suite:k8s]", - "[sig-storage] Volume limits should verify that all nodes have volume limits": " [Suite:openshift/conformance/parallel] [Suite:k8s]", - "[sig-storage] Volumes ConfigMap should be mountable": " [Suite:openshift/conformance/parallel] [Suite:k8s]", "[sig-storage] Volumes GlusterFS should be mountable": " [Disabled:Unsupported] [Suite:k8s]",