DRA: bump API v1alpha2 -> v1alpha3
This is in preparation for revamping the resource.k8s.io completely. Because there will be no support for transitioning from v1alpha2 to v1alpha3, the roundtrip test data for that API in 1.29 and 1.30 gets removed. Repeating the version in the import name of the API packages is not really required. It was done for a while to support simpler grepping for usage of alpha APIs, but there are better ways for that now. So during this transition, "resourceapi" gets used instead of "resourcev1alpha3" and the version gets dropped from informer and lister imports. The advantage is that the next bump to v1beta1 will affect fewer source code lines. Only source code where the version really matters (like API registration) retains the versioned import.
This commit is contained in:
@@ -33,7 +33,7 @@ import (
|
||||
"k8s.io/apiserver/pkg/authorization/authorizer"
|
||||
utilfeature "k8s.io/apiserver/pkg/util/feature"
|
||||
versionedinformers "k8s.io/client-go/informers"
|
||||
resourcev1alpha2informers "k8s.io/client-go/informers/resource/v1alpha2"
|
||||
resourceinformers "k8s.io/client-go/informers/resource/v1alpha3"
|
||||
"k8s.io/kubernetes/pkg/auth/authorizer/abac"
|
||||
"k8s.io/kubernetes/pkg/auth/nodeidentifier"
|
||||
"k8s.io/kubernetes/pkg/features"
|
||||
@@ -93,9 +93,9 @@ func (config Config) New(ctx context.Context, serverID string) (authorizer.Autho
|
||||
// Keep cases in sync with constant list in k8s.io/kubernetes/pkg/kubeapiserver/authorizer/modes/modes.go.
|
||||
switch configuredAuthorizer.Type {
|
||||
case authzconfig.AuthorizerType(modes.ModeNode):
|
||||
var slices resourcev1alpha2informers.ResourceSliceInformer
|
||||
var slices resourceinformers.ResourceSliceInformer
|
||||
if utilfeature.DefaultFeatureGate.Enabled(features.DynamicResourceAllocation) {
|
||||
slices = config.VersionedInformerFactory.Resource().V1alpha2().ResourceSlices()
|
||||
slices = config.VersionedInformerFactory.Resource().V1alpha3().ResourceSlices()
|
||||
}
|
||||
node.RegisterMetrics()
|
||||
graph := node.NewGraph()
|
||||
|
||||
Reference in New Issue
Block a user