Skip to content

Commit

Permalink
template: Explicitly set webhook retry backoff defaults
Browse files Browse the repository at this point in the history
pkg/cmd/infra/router/template.go:

kubernetes/kubernetes#95705 added the
requirement for specifying the `WebhookRetryBackoff` field in
authentication/authorizer DelegatingAuthenticatorConfig{} struct used for metrics
authentication. This commit explicitly sets the field to the previous
implicitly used defaults, available in "k8s.io/apiserver/pkg/server/options".
This commit is purely for compatability with kubernetes apiserver 1.20 and
does not change behavior.
  • Loading branch information
sgreene570 committed Dec 14, 2020
1 parent db8f615 commit 13b0455
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/cmd/infra/router/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import (
"k8s.io/apiserver/pkg/authorization/authorizer"
"k8s.io/apiserver/pkg/authorization/authorizerfactory"
"k8s.io/apiserver/pkg/server/healthz"
"k8s.io/apiserver/pkg/server/options"
authenticationclient "k8s.io/client-go/kubernetes/typed/authentication/v1"
authorizationclient "k8s.io/client-go/kubernetes/typed/authorization/v1"

Expand Down Expand Up @@ -524,6 +525,7 @@ func (o *TemplateRouterOptions) Run(stopCh <-chan struct{}) error {
SubjectAccessReviewClient: client.SubjectAccessReviews(),
AllowCacheTTL: 2 * time.Minute,
DenyCacheTTL: 5 * time.Second,
WebhookRetryBackoff: options.DefaultAuthWebhookRetryBackoff(),
}.New()
if err != nil {
return err
Expand All @@ -536,6 +538,7 @@ func (o *TemplateRouterOptions) Run(stopCh <-chan struct{}) error {
Anonymous: true,
TokenAccessReviewClient: tokenClient.TokenReviews(),
CacheTTL: 10 * time.Second,
WebhookRetryBackoff: options.DefaultAuthWebhookRetryBackoff(),
}.New()
if err != nil {
return err
Expand Down

0 comments on commit 13b0455

Please sign in to comment.