mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-10-15 03:29:39 +00:00
Remove pkg/api/legacyscheme from cmd/controller-manager
This commit is contained in:
@@ -27,21 +27,21 @@ import (
|
||||
"k8s.io/apiserver/pkg/server/healthz"
|
||||
"k8s.io/apiserver/pkg/server/mux"
|
||||
"k8s.io/apiserver/pkg/server/routes"
|
||||
"k8s.io/client-go/kubernetes/scheme"
|
||||
componentbaseconfig "k8s.io/component-base/config"
|
||||
"k8s.io/component-base/configz"
|
||||
"k8s.io/component-base/metrics/legacyregistry"
|
||||
_ "k8s.io/component-base/metrics/prometheus/workqueue" // for workqueue metric registration
|
||||
"k8s.io/kubernetes/pkg/api/legacyscheme"
|
||||
)
|
||||
|
||||
// BuildHandlerChain builds a handler chain with a base handler and CompletedConfig.
|
||||
func BuildHandlerChain(apiHandler http.Handler, authorizationInfo *apiserver.AuthorizationInfo, authenticationInfo *apiserver.AuthenticationInfo) http.Handler {
|
||||
requestInfoResolver := &apirequest.RequestInfoFactory{}
|
||||
failedHandler := genericapifilters.Unauthorized(legacyscheme.Codecs)
|
||||
failedHandler := genericapifilters.Unauthorized(scheme.Codecs)
|
||||
|
||||
handler := apiHandler
|
||||
if authorizationInfo != nil {
|
||||
handler = genericapifilters.WithAuthorization(apiHandler, authorizationInfo.Authorizer, legacyscheme.Codecs)
|
||||
handler = genericapifilters.WithAuthorization(apiHandler, authorizationInfo.Authorizer, scheme.Codecs)
|
||||
}
|
||||
if authenticationInfo != nil {
|
||||
handler = genericapifilters.WithAuthentication(handler, authenticationInfo.Authenticator, failedHandler, nil)
|
||||
|
Reference in New Issue
Block a user