mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 09:22:44 +00:00
Log webhook request error
This commit is contained in:
parent
dfd6f581b5
commit
55c66f79a6
@ -26,6 +26,7 @@ go_library(
|
|||||||
srcs = ["webhook.go"],
|
srcs = ["webhook.go"],
|
||||||
importpath = "k8s.io/apiserver/plugin/pkg/authenticator/token/webhook",
|
importpath = "k8s.io/apiserver/plugin/pkg/authenticator/token/webhook",
|
||||||
deps = [
|
deps = [
|
||||||
|
"//vendor/github.com/golang/glog:go_default_library",
|
||||||
"//vendor/k8s.io/api/authentication/v1beta1:go_default_library",
|
"//vendor/k8s.io/api/authentication/v1beta1:go_default_library",
|
||||||
"//vendor/k8s.io/apimachinery/pkg/apimachinery/registered:go_default_library",
|
"//vendor/k8s.io/apimachinery/pkg/apimachinery/registered:go_default_library",
|
||||||
"//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
|
"//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
|
||||||
|
@ -21,6 +21,8 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/golang/glog"
|
||||||
|
|
||||||
authentication "k8s.io/api/authentication/v1beta1"
|
authentication "k8s.io/api/authentication/v1beta1"
|
||||||
"k8s.io/apimachinery/pkg/apimachinery/registered"
|
"k8s.io/apimachinery/pkg/apimachinery/registered"
|
||||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
@ -84,6 +86,8 @@ func (w *WebhookTokenAuthenticator) AuthenticateToken(token string) (user.Info,
|
|||||||
return err
|
return err
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
// An error here indicates bad configuration or an outage. Log for debugging.
|
||||||
|
glog.Errorf("Failed to make webhook authenticator request: %v", err)
|
||||||
return nil, false, err
|
return nil, false, err
|
||||||
}
|
}
|
||||||
r.Status = result.Status
|
r.Status = result.Status
|
||||||
|
Loading…
Reference in New Issue
Block a user