Skip to content

Commit 3ef45b6

Browse files
authored
Update tokengetter.go
1 parent e8e76c6 commit 3ef45b6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/authentication/tokengetter.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ type ServiceAccountNotFoundError struct {
2424
ServiceAccountName string
2525
}
2626

27-
func (e *SANotFoundError) Error() string {
27+
func (e *ServiceAccountNotFoundError) Error() string {
2828
return fmt.Sprintf(" Unable to authenticate with Kubernetes cluster using ServiceAccount \"%s\": ServiceAccount \"%s\" not found.", e.ServiceAccountName, e.ServiceAccountName)
2929
}
3030

@@ -95,7 +95,7 @@ func (t *TokenGetter) getToken(ctx context.Context, key types.NamespacedName) (*
9595
Spec: authenticationv1.TokenRequestSpec{ExpirationSeconds: ptr.To(int64(t.expirationDuration / time.Second))},
9696
}, metav1.CreateOptions{})
9797
if err != nil {
98-
saErr := &SANotFoundError{key.Name}
98+
saErr := &ServiceAccountNotFoundError{key.Name}
9999
return nil, saErr
100100
}
101101
return &req.Status, nil

0 commit comments

Comments
 (0)