Skip to content

Commit 1dd476c

Browse files
committed
after-bump fixes
1 parent d4fdf02 commit 1dd476c

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

http.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ func (s *Server) ServeHTTPS() {
8282
if err != nil {
8383
log.Fatalf("FATAL: loading tls config (%s, %s) failed - %s", s.Opts.TLSCertFile, s.Opts.TLSKeyFile, err)
8484
}
85-
go servingCertProvider.Run(1, context.TODO().Done())
85+
go servingCertProvider.Run(context.Background(), 1)
8686

8787
config.GetCertificate = func(_ *tls.ClientHelloInfo) (*tls.Certificate, error) {
8888
// this disregards information from ClientHello but we're not doing SNI anyway

providers/openshift/authentication.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import (
1212
"k8s.io/apiserver/pkg/authentication/authenticatorfactory"
1313
"k8s.io/apiserver/pkg/authentication/request/headerrequest"
1414
"k8s.io/apiserver/pkg/server/dynamiccertificates"
15+
serveroptions "k8s.io/apiserver/pkg/server/options"
1516
authenticationclient "k8s.io/client-go/kubernetes/typed/authentication/v1"
1617
)
1718

@@ -156,6 +157,7 @@ func (s *DelegatingAuthenticationOptions) ToAuthenticationConfig() (authenticato
156157
ret := authenticatorfactory.DelegatingAuthenticatorConfig{
157158
Anonymous: true,
158159
TokenAccessReviewClient: tokenClient,
160+
WebhookRetryBackoff: serveroptions.DefaultAuthWebhookRetryBackoff(),
159161
CacheTTL: s.CacheTTL,
160162
ClientCertificateCAContentProvider: clientCAProvider,
161163
RequestHeaderConfig: requestHeaderConfig,
@@ -188,7 +190,7 @@ func deserializeStrings(in string) ([]string, error) {
188190
return ret, nil
189191
}
190192

191-
func (s *DelegatingAuthenticationOptions) newTokenAccessReview() (authenticationclient.TokenReviewInterface, error) {
193+
func (s *DelegatingAuthenticationOptions) newTokenAccessReview() (authenticationclient.AuthenticationV1Interface, error) {
192194
clientConfig, err := GetClientConfig(s.RemoteKubeConfigFile)
193195
if err != nil {
194196
return nil, err
@@ -198,5 +200,5 @@ func (s *DelegatingAuthenticationOptions) newTokenAccessReview() (authentication
198200
return nil, err
199201
}
200202

201-
return client.TokenReviews(), nil
203+
return client, nil
202204
}

providers/openshift/authorization.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"time"
88

99
"k8s.io/apiserver/pkg/authorization/authorizerfactory"
10+
serveroptions "k8s.io/apiserver/pkg/server/options"
1011
authorizationclient "k8s.io/client-go/kubernetes/typed/authorization/v1"
1112
)
1213

@@ -62,11 +63,12 @@ func (s *DelegatingAuthorizationOptions) ToAuthorizationConfig() (authorizerfact
6263
SubjectAccessReviewClient: sarClient,
6364
AllowCacheTTL: s.AllowCacheTTL,
6465
DenyCacheTTL: s.DenyCacheTTL,
66+
WebhookRetryBackoff: serveroptions.DefaultAuthWebhookRetryBackoff(),
6567
}
6668
return ret, nil
6769
}
6870

69-
func (s *DelegatingAuthorizationOptions) newSubjectAccessReview() (authorizationclient.SubjectAccessReviewInterface, error) {
71+
func (s *DelegatingAuthorizationOptions) newSubjectAccessReview() (authorizationclient.AuthorizationV1Interface, error) {
7072
clientConfig, err := GetClientConfig(s.RemoteKubeConfigFile)
7173
if err != nil {
7274
return nil, err
@@ -77,5 +79,5 @@ func (s *DelegatingAuthorizationOptions) newSubjectAccessReview() (authorization
7779
return nil, err
7880
}
7981

80-
return client.SubjectAccessReviews(), nil
82+
return client, nil
8183
}

providers/openshift/provider.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ func (p *OpenShiftProvider) Complete(data *providers.ProviderData, reviewURL *ur
364364
// check whether we have access to perform authentication review
365365
if authenticator.TokenAccessReviewClient != nil {
366366
wait.PollImmediate(2*time.Second, 10*time.Second, func() (bool, error) {
367-
_, err := authenticator.TokenAccessReviewClient.Create(context.TODO(),
367+
_, err := authenticator.TokenAccessReviewClient.TokenReviews().Create(context.TODO(),
368368
&authenticationv1.TokenReview{
369369
Spec: authenticationv1.TokenReviewSpec{
370370
Token: "TEST",
@@ -386,7 +386,7 @@ func (p *OpenShiftProvider) Complete(data *providers.ProviderData, reviewURL *ur
386386
// check whether we have access to perform authentication review
387387
if authorizer.SubjectAccessReviewClient != nil {
388388
wait.PollImmediate(2*time.Second, 10*time.Second, func() (bool, error) {
389-
_, err := authorizer.SubjectAccessReviewClient.Create(context.TODO(),
389+
_, err := authorizer.SubjectAccessReviewClient.SubjectAccessReviews().Create(context.TODO(),
390390
&authorizationv1.SubjectAccessReview{
391391
Spec: authorizationv1.SubjectAccessReviewSpec{
392392
User: "TEST",

0 commit comments

Comments
 (0)