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

Leader Election doesn't properly report OnError #1593

Closed
andradf opened this issue Nov 6, 2024 · 0 comments · Fixed by #1594
Closed

Leader Election doesn't properly report OnError #1593

andradf opened this issue Nov 6, 2024 · 0 comments · Fixed by #1594
Assignees

Comments

@andradf
Copy link

andradf commented Nov 6, 2024

Describe the bug
Leader election should report any errors in trying to acquire a lock on a lease, not only when the response code is NotFound. A specific case where an error should be reported would be when the service account doesn't have permissions to create/update a lease.

Kubernetes C# SDK Client Version
15.0.1

Dotnet Runtime Version
net8

To Reproduce
Use the LeaderElector class in a pod running without permissions on coordination.k8s.io/leases.

Expected behavior
One would expect RunUntilLeadershipLostAsync to trigger an OnError invocation when the k8s api returns 403.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants