Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 wrap service account not found error #1477

Closed
wants to merge 42 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
664a51f
changes to derice minimum service account
rashmi43 Sep 9, 2024
75c5f7c
remove headers
rashmi43 Sep 9, 2024
24d93f1
add details about registry+v1 support
rashmi43 Sep 10, 2024
fdf7e9d
render yml correctly
rashmi43 Sep 10, 2024
ba9193d
Merge branch 'operator-framework:main' into main
rashmi43 Oct 8, 2024
4067d8c
Merge branch 'operator-framework:main' into main
rashmi43 Oct 10, 2024
a6b2ebc
Merge branch 'operator-framework:main' into main
rashmi43 Oct 16, 2024
e87203a
Merge branch 'operator-framework:main' into main
rashmi43 Nov 18, 2024
157cce0
sa not found
rashmi43 Nov 18, 2024
eabd252
Merge branch 'operator-framework:main' into sa-err-msg
rashmi43 Nov 18, 2024
6062677
Delete docs/drafts/derive-serviceaccount.md
rashmi43 Nov 18, 2024
738a59c
add custom sa not found
rashmi43 Nov 18, 2024
6ed7b58
remove unused imports
rashmi43 Nov 18, 2024
5d5d2de
Update tokengetter.go
rashmi43 Nov 18, 2024
815115e
Update tokengetter.go
rashmi43 Nov 18, 2024
49549f2
update error message string
rashmi43 Nov 19, 2024
aa4f6e9
pass sa name to error message
rashmi43 Nov 19, 2024
1bbb34a
Update tokengetter.go
rashmi43 Nov 19, 2024
5196201
wrap error message
rashmi43 Nov 19, 2024
e8e76c6
Update internal/authentication/tokengetter.go
rashmi43 Nov 20, 2024
3ef45b6
Update tokengetter.go
rashmi43 Nov 20, 2024
1334b69
Update clusterextension_controller.go
rashmi43 Nov 20, 2024
83e188c
add unit test cases
rashmi43 Nov 26, 2024
683db58
updates testcases
rashmi43 Nov 26, 2024
7893d90
reverting this change
rashmi43 Nov 26, 2024
bad6695
review comment
rashmi43 Nov 26, 2024
9c0df21
update error msg
rashmi43 Dec 17, 2024
5df5a1a
review comments incorporated
rashmi43 Dec 17, 2024
7b23746
Merge branch 'main' into sa-err-msg
rashmi43 Jan 25, 2025
452703d
review comments
rashmi43 Jan 25, 2025
100c39e
review comments
rashmi43 Jan 25, 2025
668e370
add unwrap function
rashmi43 Jan 27, 2025
f6e5d66
add import in the right section
rashmi43 Jan 27, 2025
91bd298
review comment about error message with namespace
rashmi43 Jan 29, 2025
03187f4
Update internal/controllers/clusterextension_controller.go
rashmi43 Jan 31, 2025
ae8094d
update test with sa condition error
rashmi43 Jan 31, 2025
b103f5d
add mock applier
rashmi43 Jan 31, 2025
3c21bba
add e2e test
rashmi43 Jan 31, 2025
ddf9c64
add nil checks in e2e testcase
rashmi43 Feb 3, 2025
40bd6ba
Merge branch 'operator-framework:main' into sa-err-msg
rashmi43 Feb 4, 2025
04f81cb
remove e2e add unit
rashmi43 Feb 4, 2025
53494ca
remove nil checks
rashmi43 Feb 4, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
pass sa name to error message
Signed-off-by: rashmi_kh <[email protected]>
rashmi43 committed Nov 19, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit aa4f6e9537d0ef0a7b3e9bdcd8651d4ea6056ce5
6 changes: 3 additions & 3 deletions internal/authentication/tokengetter.go
Original file line number Diff line number Diff line change
@@ -21,11 +21,11 @@ type TokenGetter struct {
}

type SANotFoundError struct {
rashmi43 marked this conversation as resolved.
Show resolved Hide resolved
Msg string
ServiceAccountName string
}

func (e *SANotFoundError) Error(serviceAccountName string) string {
return fmt.Sprintf(" Unable to authenticate with Kubernetes cluster using ServiceAccount \"%s\": ServiceAccount \"%s\" not found.", serviceAccountName, serviceAccountName)
func (e *SANotFoundError) Error() string {
return fmt.Sprintf(" Unable to authenticate with Kubernetes cluster using ServiceAccount \"%s\": ServiceAccount \"%s\" not found.", e.ServiceAccountName, e.ServiceAccountName)
}

type TokenGetterOption func(*TokenGetter)