mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-26 21:17:23 +00:00
Merge pull request #62734 from liggitt/log-malformed-webhook
Automatic merge from submit-queue (batch tested with PRs 62378, 62734). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Log webhook request error Fixed https://github.com/kubernetes/kubernetes/issues/26606 ```release-note NONE ```
This commit is contained in:
commit
96746166d9
@ -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