fix kubeapiserver proxy rejects all dryRun requests (#2241)

This commit is contained in:
zryfish
2020-06-22 16:37:52 +08:00
committed by GitHub
parent 5caee71b25
commit 48081f91af
2 changed files with 19 additions and 21 deletions

View File

@@ -278,7 +278,7 @@ func (s *APIServer) buildHandlerChain(stopCh <-chan struct{}) {
basictoken.New(basic.NewBasicAuthenticator(im.NewOperator(s.KubernetesClient.KubeSphere(), s.InformerFactory))),
bearertoken.New(jwttoken.NewTokenAuthenticator(token.NewJwtTokenIssuer(token.DefaultIssuerName, s.Config.AuthenticationOptions, s.CacheClient))))
handler = filters.WithAuthentication(handler, authn)
handler = filters.WithRequestInfo(handler, requestInfoResolver, s.Config.MultiClusterOptions.Enable)
handler = filters.WithRequestInfo(handler, requestInfoResolver)
s.Server.Handler = handler
}