Log webhook request error

Kubernetes-commit: 55c66f79a6ab71fd2eaa5574bb13a2632236e640
This commit is contained in:
Jordan Liggitt 2018-04-17 11:25:26 -04:00 committed by Kubernetes Publisher
parent 3d55a9b806
commit be5dc4d760
1 changed files with 4 additions and 0 deletions

View File

@ -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