Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,7 @@ import (
"github.com/openshift/library-go/pkg/operator/events"
)

var defaultGroupVersionsByFeatureGate = map[configv1.FeatureGateName][]groupVersionByOpenshiftVersion{
"MutatingAdmissionPolicy": {
// Both v1alpha1 and v1beta1 versions must be served pre-GA because e2e tests exercise both APIs.
// A GA OpenShift release could inadvertently serve these versions if MutatingAdmissionPolicy
// gets added to the default featureSet in openshift/api as part of transitioning from
// (feature off, v1beta1 off) to (feature on, v1 on).
// To prevent that, version ranges below include min and max bounds.
// TODO: Update version ranges when rebasing to k8s v1.36+
// - If v1 resources are available in 1.36: remove all MutatingAdmissionPolicy references
// - If no v1 resources: bump ranges to "<1.37.0" and reassess in next rebase
// See api/discovery/apis__admissionregistration.k8s.io__v1.json in the kubernetes repo to easily determine.
{KubeVersionRange: semver.MustParseRange(">=1.33.0 <1.36.0"), GroupVersion: schema.GroupVersion{Group: "admissionregistration.k8s.io", Version: "v1alpha1"}},
{KubeVersionRange: semver.MustParseRange(">=1.34.0 <1.36.0"), GroupVersion: schema.GroupVersion{Group: "admissionregistration.k8s.io", Version: "v1beta1"}},
},
}
var defaultGroupVersionsByFeatureGate = map[configv1.FeatureGateName][]groupVersionByOpenshiftVersion{}

type groupVersionByOpenshiftVersion struct {
schema.GroupVersion
Expand Down