You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Documenting the behavior is a good idea, PR is welcome. A separate method isn't needed since callers can do go RunOrDie if they want async behavior. The PR would need to be made to the https://github.com/kubernetes/kubernetes/ repo which is the canonical location for this code.
Hi, I was wondering if there is any particular reason of
RunOrDie
being a blocking function. I see that it blocks atclient-go/tools/leaderelection/leaderelection.go
Line 222 in 3623386
LeaderElector
will block in the leader election loop.I found that k8s autoscaler leverage this blocking thing at https://github.com/kubernetes/autoscaler/blob/a63c7abbe47773be4eec49b13210a3cd9c4a719f/cluster-autoscaler/main.go#L421 and maybe changing this functionality may be a bad idea however how about introducing a sibling of
RunOrDie
calledRunOrDieAsync
which will be non-blocking? Otherwise I think the blocking fact should be documented to avoid confusion in the future by people using this library. Happy to provide a PR in any case.The text was updated successfully, but these errors were encountered: