Merge pull request #125452 from carlory/clean-e2efeatures

remove unneeded e2e features
This commit is contained in:
Kubernetes Prow Robot 2025-03-14 10:57:47 -07:00 committed by GitHub
commit 45f5ecfefd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 31 additions and 43 deletions

View File

@ -1274,7 +1274,7 @@ var _ = SIGDescribe("ResourceQuota", func() {
})
})
var _ = SIGDescribe("ResourceQuota", feature.VolumeAttributesClass, framework.WithFeatureGate(features.VolumeAttributesClass), func() {
var _ = SIGDescribe("ResourceQuota", framework.WithFeatureGate(features.VolumeAttributesClass), func() {
f := framework.NewDefaultFramework("resourcequota-volumeattributesclass")
f.NamespacePodSecurityLevel = admissionapi.LevelBaseline

View File

@ -528,13 +528,6 @@ var (
// TODO: document the feature (owning SIG, when to use this feature for a test)
ValidatingAdmissionPolicy = framework.WithFeature(framework.ValidFeatures.Add("ValidatingAdmissionPolicy"))
// Owner: sig-storage
// Tests related to VolumeAttributesClass (https://kep.k8s.io/3751)
//
// TODO: This label only requires the API storage.k8s.io/v1alpha1 and the VolumeAttributesClass feature-gate enabled.
// It should be removed after k/k #124350 is merged.
VolumeAttributesClass = framework.WithFeature(framework.ValidFeatures.Add("VolumeAttributesClass"))
// TODO: document the feature (owning SIG, when to use this feature for a test)
Volumes = framework.WithFeature(framework.ValidFeatures.Add("Volumes"))

View File

@ -30,7 +30,6 @@ import (
"k8s.io/apimachinery/pkg/util/errors"
clientset "k8s.io/client-go/kubernetes"
"k8s.io/kubernetes/pkg/features"
e2efeature "k8s.io/kubernetes/test/e2e/feature"
"k8s.io/kubernetes/test/e2e/framework"
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
e2epv "k8s.io/kubernetes/test/e2e/framework/pv"
@ -61,7 +60,7 @@ func InitCustomVolumeModifyTestSuite(patterns []storageframework.TestPattern) st
SupportedSizeRange: e2evolume.SizeRange{
Min: "1Gi",
},
TestTags: []interface{}{e2efeature.VolumeAttributesClass, framework.WithFeatureGate(features.VolumeAttributesClass)},
TestTags: []interface{}{framework.WithFeatureGate(features.VolumeAttributesClass)},
},
}
}

View File

@ -34,7 +34,6 @@ import (
"k8s.io/component-helpers/storage/ephemeral"
"k8s.io/kubernetes/pkg/features"
kubeletmetrics "k8s.io/kubernetes/pkg/kubelet/metrics"
"k8s.io/kubernetes/test/e2e/feature"
"k8s.io/kubernetes/test/e2e/framework"
e2emetrics "k8s.io/kubernetes/test/e2e/framework/metrics"
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
@ -626,38 +625,36 @@ var _ = utils.SIGDescribe(framework.WithSerial(), "Volume metrics", func() {
})
// TODO: Merge with bound/unbound tests when "VolumeAttributesClass" feature is enabled by default
f.It("should create unbound pvc count metrics for pvc controller with volume attributes class dimension after creating pvc only",
feature.VolumeAttributesClass, framework.WithFeatureGate(features.VolumeAttributesClass), func(ctx context.Context) {
var err error
dimensions := []string{namespaceKey, storageClassKey, volumeAttributeClassKey}
pvcConfigWithVAC := pvcConfig
pvcConfigWithVAC.VolumeAttributesClassName = &volumeAttributesClassName
pvcWithVAC := e2epv.MakePersistentVolumeClaim(pvcConfigWithVAC, ns)
pvc, err = e2epv.CreatePVC(ctx, c, ns, pvcWithVAC)
framework.ExpectNoError(err, "Error creating pvc: %v", err)
waitForPVControllerSync(ctx, metricsGrabber, unboundPVCKey, volumeAttributeClassKey)
controllerMetrics, err := metricsGrabber.GrabFromControllerManager(ctx)
framework.ExpectNoError(err, "Error getting c-m metricValues: %v", err)
err = testutil.ValidateMetrics(testutil.Metrics(controllerMetrics), unboundPVCKey, dimensions...)
framework.ExpectNoError(err, "Invalid metric in Controller Manager metrics: %q", unboundPVCKey)
})
f.It("should create unbound pvc count metrics for pvc controller with volume attributes class dimension after creating pvc only", framework.WithFeatureGate(features.VolumeAttributesClass), func(ctx context.Context) {
var err error
dimensions := []string{namespaceKey, storageClassKey, volumeAttributeClassKey}
pvcConfigWithVAC := pvcConfig
pvcConfigWithVAC.VolumeAttributesClassName = &volumeAttributesClassName
pvcWithVAC := e2epv.MakePersistentVolumeClaim(pvcConfigWithVAC, ns)
pvc, err = e2epv.CreatePVC(ctx, c, ns, pvcWithVAC)
framework.ExpectNoError(err, "Error creating pvc: %v", err)
waitForPVControllerSync(ctx, metricsGrabber, unboundPVCKey, volumeAttributeClassKey)
controllerMetrics, err := metricsGrabber.GrabFromControllerManager(ctx)
framework.ExpectNoError(err, "Error getting c-m metricValues: %v", err)
err = testutil.ValidateMetrics(testutil.Metrics(controllerMetrics), unboundPVCKey, dimensions...)
framework.ExpectNoError(err, "Invalid metric in Controller Manager metrics: %q", unboundPVCKey)
})
// TODO: Merge with bound/unbound tests when "VolumeAttributesClass" feature is enabled by default
f.It("should create bound pv/pvc count metrics for pvc controller with volume attributes class dimension after creating both pv and pvc",
feature.VolumeAttributesClass, framework.WithFeatureGate(features.VolumeAttributesClass), func(ctx context.Context) {
var err error
dimensions := []string{namespaceKey, storageClassKey, volumeAttributeClassKey}
pvcConfigWithVAC := pvcConfig
pvcConfigWithVAC.VolumeAttributesClassName = &volumeAttributesClassName
pv, pvc, err = e2epv.CreatePVPVC(ctx, c, f.Timeouts, pvConfig, pvcConfigWithVAC, ns, true)
framework.ExpectNoError(err, "Error creating pv pvc: %v", err)
waitForPVControllerSync(ctx, metricsGrabber, boundPVKey, storageClassKey)
waitForPVControllerSync(ctx, metricsGrabber, boundPVCKey, volumeAttributeClassKey)
controllerMetrics, err := metricsGrabber.GrabFromControllerManager(ctx)
framework.ExpectNoError(err, "Error getting c-m metricValues: %v", err)
err = testutil.ValidateMetrics(testutil.Metrics(controllerMetrics), boundPVCKey, dimensions...)
framework.ExpectNoError(err, "Invalid metric in Controller Manager metrics: %q", boundPVCKey)
})
f.It("should create bound pv/pvc count metrics for pvc controller with volume attributes class dimension after creating both pv and pvc", framework.WithFeatureGate(features.VolumeAttributesClass), func(ctx context.Context) {
var err error
dimensions := []string{namespaceKey, storageClassKey, volumeAttributeClassKey}
pvcConfigWithVAC := pvcConfig
pvcConfigWithVAC.VolumeAttributesClassName = &volumeAttributesClassName
pv, pvc, err = e2epv.CreatePVPVC(ctx, c, f.Timeouts, pvConfig, pvcConfigWithVAC, ns, true)
framework.ExpectNoError(err, "Error creating pv pvc: %v", err)
waitForPVControllerSync(ctx, metricsGrabber, boundPVKey, storageClassKey)
waitForPVControllerSync(ctx, metricsGrabber, boundPVCKey, volumeAttributeClassKey)
controllerMetrics, err := metricsGrabber.GrabFromControllerManager(ctx)
framework.ExpectNoError(err, "Error getting c-m metricValues: %v", err)
err = testutil.ValidateMetrics(testutil.Metrics(controllerMetrics), boundPVCKey, dimensions...)
framework.ExpectNoError(err, "Invalid metric in Controller Manager metrics: %q", boundPVCKey)
})
ginkgo.It("should create total pv count metrics for with plugin and volume mode labels after creating pv",
func(ctx context.Context) {

View File

@ -27,7 +27,6 @@ import (
types "k8s.io/apimachinery/pkg/types"
"k8s.io/client-go/util/retry"
"k8s.io/kubernetes/pkg/features"
"k8s.io/kubernetes/test/e2e/feature"
"k8s.io/kubernetes/test/e2e/framework"
"k8s.io/kubernetes/test/e2e/storage/utils"
admissionapi "k8s.io/pod-security-admission/api"
@ -36,7 +35,7 @@ import (
"github.com/onsi/gomega"
)
var _ = utils.SIGDescribe("VolumeAttributesClass", feature.VolumeAttributesClass, framework.WithFeatureGate(features.VolumeAttributesClass), func() {
var _ = utils.SIGDescribe("VolumeAttributesClass", framework.WithFeatureGate(features.VolumeAttributesClass), func() {
f := framework.NewDefaultFramework("csi-volumeattributesclass")
f.NamespacePodSecurityLevel = admissionapi.LevelBaseline