Skip to content

Commit

Permalink
Fix verify
Browse files Browse the repository at this point in the history
Signed-off-by: clyang82 <[email protected]>
  • Loading branch information
clyang82 committed Mar 4, 2024
1 parent ca27880 commit 8d654fb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pkg/controllers/bootstrap/crds.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func WaitFOROCMCRDsReady(ctx context.Context, crdClient apiextensionsclient.Inte

return true, nil
}); err != nil {
klog.Errorf("ocm crds are not ready, %w", err)
klog.Errorf("ocm crds are not ready, %v", err)
return false
}

Expand Down
4 changes: 2 additions & 2 deletions pkg/controllers/bootstrap/hub.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func BuildKubeSystemResources(ctx context.Context, config server.Config, kubeCli

return true, nil
}); err != nil {
klog.Errorf("failed to prepare clusterroles': %w", err)
klog.Errorf("failed to prepare clusterroles': %v", err)
}

// prepare clusterrolebindings
Expand Down Expand Up @@ -158,7 +158,7 @@ func BuildKubeSystemResources(ctx context.Context, config server.Config, kubeCli

return true, nil
}); err != nil {
klog.Errorf("failed to prepare clusterrolebindings: %w", err)
klog.Errorf("failed to prepare clusterrolebindings: %v", err)
}

return nil
Expand Down
6 changes: 3 additions & 3 deletions pkg/servers/options/authentication.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ import (
kubeauthenticator "k8s.io/kubernetes/pkg/kubeapiserver/authenticator"
authzmodes "k8s.io/kubernetes/pkg/kubeapiserver/authorizer/modes"
"k8s.io/kubernetes/plugin/pkg/auth/authenticator/token/bootstrap"
"k8s.io/utils/pointer"
"k8s.io/utils/ptr"
)

const (
Expand Down Expand Up @@ -454,15 +454,15 @@ func (o *BuiltInAuthenticationOptions) ToAuthenticationConfig() (kubeauthenticat
},
ClaimMappings: apiserver.ClaimMappings{
Username: apiserver.PrefixedClaimOrExpression{
Prefix: pointer.String(usernamePrefix),
Prefix: ptr.To(usernamePrefix),
Claim: o.OIDC.UsernameClaim,
},
},
}

if len(o.OIDC.GroupsClaim) > 0 {
jwtAuthenticator.ClaimMappings.Groups = apiserver.PrefixedClaimOrExpression{
Prefix: pointer.String(o.OIDC.GroupsPrefix),
Prefix: ptr.To(o.OIDC.GroupsPrefix),
Claim: o.OIDC.GroupsClaim,
}
}
Expand Down

0 comments on commit 8d654fb

Please sign in to comment.