-
Notifications
You must be signed in to change notification settings - Fork 305
Description
Describe the feature
When using the LeaderElector class to carry out the election pattern amongst pods, you can choose the ILock implementation. LeaseLock.cs uses the client to perform CRUD operations against a Lease resource. However all HTTP operation errors are swallowed, making debugging difficult.
A way of catching these errors should be exposed.
Is your feature related to a problem?
When I deployed my pod using the kubernetes client, I forgot to give my service account suitable permissions. I gave it get, create, patch and delete but not update. Took me a long time to figure out why it was not working, because there is no observability in the code.
Describe the requested feature
Add OnError event hook to LeaseLock, which fires when HTTP operation errors happen.
Describe alternatives you've considered
Stepping through the code rather than observing behaviour by logs or traces.
Additional Context
N/A