e2e apimachinery: use feature gate

Using the feature gate has the advantage that the stability tag gets added
automatically and no changes are needed when graduating it. Once it reaches GA,
the tag needs to be removed together with the feature gate.

In fact, the current `[ALPHA]` is already wrong: the feature has already
graduated to beta...
This commit is contained in:
Patrick Ohly 2023-07-05 15:40:54 +02:00
parent dc8b57d8a7
commit a25b87d84a

View File

@ -31,12 +31,13 @@ import (
apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/apiserver/pkg/features"
clientset "k8s.io/client-go/kubernetes"
"k8s.io/kubernetes/test/e2e/framework"
admissionapi "k8s.io/pod-security-admission/api"
)
var _ = SIGDescribe("ValidatingAdmissionPolicy [Privileged:ClusterAdmin][Alpha][Feature:ValidatingAdmissionPolicy]", func() {
var _ = SIGDescribe("ValidatingAdmissionPolicy [Privileged:ClusterAdmin]", framework.WithFeatureGate(features.ValidatingAdmissionPolicy), func() {
f := framework.NewDefaultFramework("validating-admission-policy")
f.NamespacePodSecurityLevel = admissionapi.LevelBaseline