Replace with
Kubernetes-commit: 1a598798fca6f15f4e883368666e7d4d3565fcc6
This commit is contained in:
parent
9efd239b45
commit
4e2d5a4ec5
|
|
@ -137,7 +137,7 @@ func (w *WebhookTokenAuthenticator) AuthenticateToken(ctx context.Context, token
|
||||||
|
|
||||||
start := time.Now()
|
start := time.Now()
|
||||||
result, statusCode, tokenReviewErr = w.tokenReview.Create(ctx, r, metav1.CreateOptions{})
|
result, statusCode, tokenReviewErr = w.tokenReview.Create(ctx, r, metav1.CreateOptions{})
|
||||||
latency := time.Now().Sub(start)
|
latency := time.Since(start)
|
||||||
|
|
||||||
if statusCode != 0 {
|
if statusCode != 0 {
|
||||||
w.metrics.RecordRequestTotal(ctx, strconv.Itoa(statusCode))
|
w.metrics.RecordRequestTotal(ctx, strconv.Itoa(statusCode))
|
||||||
|
|
|
||||||
|
|
@ -206,7 +206,7 @@ func (w *WebhookAuthorizer) Authorize(ctx context.Context, attr authorizer.Attri
|
||||||
|
|
||||||
start := time.Now()
|
start := time.Now()
|
||||||
result, statusCode, sarErr = w.subjectAccessReview.Create(ctx, r, metav1.CreateOptions{})
|
result, statusCode, sarErr = w.subjectAccessReview.Create(ctx, r, metav1.CreateOptions{})
|
||||||
latency := time.Now().Sub(start)
|
latency := time.Since(start)
|
||||||
|
|
||||||
if statusCode != 0 {
|
if statusCode != 0 {
|
||||||
w.metrics.RecordRequestTotal(ctx, strconv.Itoa(statusCode))
|
w.metrics.RecordRequestTotal(ctx, strconv.Itoa(statusCode))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue