Just like the official kubernetes client[1], does fabric8io kubernetes-client could support leader election? It is a very useful feature.
@wangyang0918 : Thanks for pointing this out. I think we can consider supporting this feature. I'm not familiar with this. Could you please elaborate what use cases it is designed to solve?
I think this also is a utility in client-go https://github.com/kubernetes/client-go/blob/master/tools/leaderelection/leaderelection.go
@rohanKanojia Thanks for your quick response.
I am from Flink community and focused on running Flink on kubernetes recently. I choose fabric8io/kubernetes-client sdk, because it used more widely than the official client. Unfortunately, it does not support leader election. In Flink, also other big data framework, we have internal high availability implementation. Multiple masters will participate in the election and the leader publish the address information to config map. All the workers retrieve the master information and connect to the master.
So if the kubernetes-client could provide the ability of leader election, it will be very useful for us.
@wangyang0918 : Thanks for your feedback. I think it makes sense for us to support it.
@rohanKanojia Glad to hear that. It is my pleasure to help with the new feature test once you have an implementation.
... It is my pleasure to help with the new feature test once you have an implementation.
@wangyang0918 we've just open a PR with an implementation #1955
Kubernetes Client 4.8.0 containing a LeaderElection implementation was released 3 days ago.
I'm closing this issue as the initial request is fulfilled.
If there is any problem or some feature missing from our implementation (e.g. an additional lock implementation), please open a new issue.
Most helpful comment
@wangyang0918 : Thanks for your feedback. I think it makes sense for us to support it.