quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.8k stars 2.68k forks source link

Consider writing cluster singleton implementation for Kubernetes #564

Open emmanuelbernard opened 5 years ago

emmanuelbernard commented 5 years ago

Quoting Ioannis Kanellos

Kuberenetes resources have a revision number, which changes each time the resource is modified. Also, its possible to have an operation target a specific resource version (causing the operation fail, if that number has advanced). This make it quite simple to implement a lock mechanism on top of any kubernetes resource. And we have at least two cases where this is used to implement things like "leader election":

1) in camel-kubernetes 2) in spring-cloud-kubernetes

So, that would require some coding, but its nothing we've never done before.

We could use that for some cron tasks as well as cluster unique tasks like schema generation or data load

shawkins commented 1 year ago

Can this be closed in favor of using the leader election from the fabric8 kubernetes client?