Merge pull request #57513 from deads2k/admission-19-config

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

add eventratelimit config to scheme

Fixes https://github.com/kubernetes/kubernetes/issues/57030

Because the config types are decoded, their types have to be registered in the scheme used for admission config decoding.  Looks like we missed one.

@kubernetes/sig-api-machinery-bugs 
/assign jennybuckley
This commit is contained in:
Kubernetes Submit Queue 2017-12-22 19:12:19 -08:00 committed by GitHub
commit 1f182ae147
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,6 +23,7 @@ import (
"k8s.io/client-go/util/flowcontrol"
api "k8s.io/kubernetes/pkg/apis/core"
eventratelimitapi "k8s.io/kubernetes/plugin/pkg/admission/eventratelimit/apis/eventratelimit"
eventratelimitapiv1alpha1 "k8s.io/kubernetes/plugin/pkg/admission/eventratelimit/apis/eventratelimit/v1alpha1"
"k8s.io/kubernetes/plugin/pkg/admission/eventratelimit/apis/eventratelimit/validation"
)
@ -43,6 +44,10 @@ func Register(plugins *admission.Plugins) {
}
return newEventRateLimit(configuration, realClock{})
})
// add our config types
eventratelimitapi.AddToScheme(plugins.ConfigScheme)
eventratelimitapiv1alpha1.AddToScheme(plugins.ConfigScheme)
}
// Plugin implements an admission controller that can enforce event rate limits