Merge pull request #96552 from pandaamanda/klog_fmt
use klog.Info and klog.Warning when had no format Kubernetes-commit: 8bf42039e62d001f5d0331753bd99790b70d51eb
This commit is contained in:
commit
cbff8a83d7
|
|
@ -692,19 +692,19 @@
|
|||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api",
|
||||
"Rev": "cb95709d38de"
|
||||
"Rev": "c873f2e8ab25"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery",
|
||||
"Rev": "53a9c91c2218"
|
||||
"Rev": "0e9f9cff521d"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/client-go",
|
||||
"Rev": "623741e9c1d5"
|
||||
"Rev": "fc034b4b7616"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/component-base",
|
||||
"Rev": "e05af43f81e2"
|
||||
"Rev": "6b412b2ef0d8"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/gengo",
|
||||
|
|
|
|||
16
go.mod
16
go.mod
|
|
@ -41,10 +41,10 @@ require (
|
|||
gopkg.in/natefinch/lumberjack.v2 v2.0.0
|
||||
gopkg.in/square/go-jose.v2 v2.2.2
|
||||
gopkg.in/yaml.v2 v2.2.8
|
||||
k8s.io/api v0.0.0-20210113165900-cb95709d38de
|
||||
k8s.io/apimachinery v0.0.0-20210114005653-53a9c91c2218
|
||||
k8s.io/client-go v0.0.0-20210112050101-623741e9c1d5
|
||||
k8s.io/component-base v0.0.0-20201217090229-e05af43f81e2
|
||||
k8s.io/api v0.0.0-20210115125903-c873f2e8ab25
|
||||
k8s.io/apimachinery v0.0.0-20210116045657-0e9f9cff521d
|
||||
k8s.io/client-go v0.0.0-20210116050105-fc034b4b7616
|
||||
k8s.io/component-base v0.0.0-20210115210250-6b412b2ef0d8
|
||||
k8s.io/klog/v2 v2.4.0
|
||||
k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd
|
||||
k8s.io/utils v0.0.0-20201110183641-67b214c5f920
|
||||
|
|
@ -54,8 +54,8 @@ require (
|
|||
)
|
||||
|
||||
replace (
|
||||
k8s.io/api => k8s.io/api v0.0.0-20210113165900-cb95709d38de
|
||||
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20210114005653-53a9c91c2218
|
||||
k8s.io/client-go => k8s.io/client-go v0.0.0-20210112050101-623741e9c1d5
|
||||
k8s.io/component-base => k8s.io/component-base v0.0.0-20201217090229-e05af43f81e2
|
||||
k8s.io/api => k8s.io/api v0.0.0-20210115125903-c873f2e8ab25
|
||||
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20210116045657-0e9f9cff521d
|
||||
k8s.io/client-go => k8s.io/client-go v0.0.0-20210116050105-fc034b4b7616
|
||||
k8s.io/component-base => k8s.io/component-base v0.0.0-20210115210250-6b412b2ef0d8
|
||||
)
|
||||
|
|
|
|||
8
go.sum
8
go.sum
|
|
@ -599,10 +599,10 @@ honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWh
|
|||
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
|
||||
honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
||||
k8s.io/api v0.0.0-20210113165900-cb95709d38de/go.mod h1:28LbpXLUR/7RuFt+l/ys7ns8AutY5D43HU3bq2+CJQ4=
|
||||
k8s.io/apimachinery v0.0.0-20210114005653-53a9c91c2218/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU=
|
||||
k8s.io/client-go v0.0.0-20210112050101-623741e9c1d5/go.mod h1:A+8YeKeA6UyKSBUSUFFZ9Mzc+Kb7ETfGvFHLZ31zNhM=
|
||||
k8s.io/component-base v0.0.0-20201217090229-e05af43f81e2/go.mod h1:gIi+MRY/IzqtOlI456xyiW/eLgJnlivhxgZIlG3ueCQ=
|
||||
k8s.io/api v0.0.0-20210115125903-c873f2e8ab25/go.mod h1:xpUvIW3IJYnKO2yMuT9r4zCZI1ppqiuEejNFI9eoqWo=
|
||||
k8s.io/apimachinery v0.0.0-20210116045657-0e9f9cff521d/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU=
|
||||
k8s.io/client-go v0.0.0-20210116050105-fc034b4b7616/go.mod h1:qDBXGK92HVL2+FvTDOm7TRYoY6Sy4YlexduPTe93d6U=
|
||||
k8s.io/component-base v0.0.0-20210115210250-6b412b2ef0d8/go.mod h1:ioM27aGQfNSdCppNxxKUoGHTWWEMcLSdPF2fyoTvGnU=
|
||||
k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
|
||||
k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE=
|
||||
k8s.io/klog/v2 v2.4.0 h1:7+X0fUguPyrKEC4WjH8iGDg3laWgMo5tMnRTIGTTxGQ=
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ import (
|
|||
// is invoked to serve the request.
|
||||
func WithAuthentication(handler http.Handler, auth authenticator.Request, failed http.Handler, apiAuds authenticator.Audiences) http.Handler {
|
||||
if auth == nil {
|
||||
klog.Warningf("Authentication is disabled")
|
||||
klog.Warning("Authentication is disabled")
|
||||
return handler
|
||||
}
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ const (
|
|||
// WithAuthorizationCheck passes all authorized requests on to handler, and returns a forbidden error otherwise.
|
||||
func WithAuthorization(handler http.Handler, a authorizer.Authorizer, s runtime.NegotiatedSerializer) http.Handler {
|
||||
if a == nil {
|
||||
klog.Warningf("Authorization is disabled")
|
||||
klog.Warning("Authorization is disabled")
|
||||
return handler
|
||||
}
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
|
||||
|
|
|
|||
|
|
@ -334,8 +334,8 @@ func (s *DelegatingAuthenticationOptions) ApplyTo(authenticationInfo *server.Aut
|
|||
if err != nil {
|
||||
if s.TolerateInClusterLookupFailure {
|
||||
klog.Warningf("Error looking up in-cluster authentication configuration: %v", err)
|
||||
klog.Warningf("Continuing without authentication configuration. This may treat all requests as anonymous.")
|
||||
klog.Warningf("To require authentication configuration lookup to succeed, set --authentication-tolerate-lookup-failure=false")
|
||||
klog.Warning("Continuing without authentication configuration. This may treat all requests as anonymous.")
|
||||
klog.Warning("To require authentication configuration lookup to succeed, set --authentication-tolerate-lookup-failure=false")
|
||||
} else {
|
||||
return fmt.Errorf("unable to load configmap based request-header-client-ca-file: %v", err)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -173,7 +173,7 @@ func (s *DelegatingAuthorizationOptions) toAuthorizer(client kubernetes.Interfac
|
|||
}
|
||||
|
||||
if client == nil {
|
||||
klog.Warningf("No authorization-kubeconfig provided, so SubjectAccessReview of authorization tokens won't work.")
|
||||
klog.Warning("No authorization-kubeconfig provided, so SubjectAccessReview of authorization tokens won't work.")
|
||||
} else {
|
||||
cfg := authorizerfactory.DelegatingAuthorizerConfig{
|
||||
SubjectAccessReviewClient: client.AuthorizationV1().SubjectAccessReviews(),
|
||||
|
|
|
|||
Loading…
Reference in New Issue