fix kubeapiserver proxy rejects all dryRun requests (#2240)

This commit is contained in:
zryfish
2020-06-22 14:24:59 +08:00
committed by GitHub
parent 60444ba945
commit 5caee71b25
3 changed files with 31 additions and 12 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)
handler = filters.WithRequestInfo(handler, requestInfoResolver, s.Config.MultiClusterOptions.Enable)
s.Server.Handler = handler
}