kubernetes based discovery druid extension to run Druid on K8S without Zookeeper#10544
kubernetes based discovery druid extension to run Druid on K8S without Zookeeper#10544himanshug merged 18 commits intoapache:masterfrom
Conversation
1f9acec to
e782498
Compare
|
This PR is no longer WIP. Build is passing, there is good amount of test coverage and I have also tested it successfully on small test clusters running on kubernetes without a zookeeper cluster at all. This PR is ready to be merged. While I am sure caveats would pop up when this gets used in long running large clusters, this is a good starting point to be released as an experimental feature in next Druid release and noted as such in the docs introduced. sidenote: |
nishantmonu51
left a comment
There was a problem hiding this comment.
LGTM, 👍
minor nit: would be great if we can also add @nullable annotations
|
|
||
| public DiscoveryDruidNodeList( | ||
| String resourceVersion, | ||
| Map<String, DiscoveryDruidNode> druidNodes |
…t Zookeeper (apache#10544) * honor zk enablement config in more places in druid code * kubernetes based discovery module * fix spotbugs check * fix intellij checks error * fix doc link to kubernetes.md from extension * make spellchecker happy * update license.yaml * fix dependency check errors * update extension coverage * UTs for BaseNodeRoleWatcher * fix forbidden-api check * update k8s module coverage ignores * add Bouncy Castle License being same as MIT License for license checking purposes * further update licenses.yaml * label/annotation pre-existence assumption * address review comment
…t Zookeeper (apache#10544) * honor zk enablement config in more places in druid code * kubernetes based discovery module * fix spotbugs check * fix intellij checks error * fix doc link to kubernetes.md from extension * make spellchecker happy * update license.yaml * fix dependency check errors * update extension coverage * UTs for BaseNodeRoleWatcher * fix forbidden-api check * update k8s module coverage ignores * add Bouncy Castle License being same as MIT License for license checking purposes * further update licenses.yaml * label/annotation pre-existence assumption * address review comment
|
@himanshug @gianm Do we know of any big production clusters using this feature? how does the migration from zk to k8s based discovery work without downtime? |
Fixes #9053
Description
Please read #9053 first and maybe https://groups.google.com/g/druid-development/c/tWnwPyL0Vk4/m/2uLwqgQiAAAJ?pli=1 for more background on HTTP based segment and task management that were introduced before.
This patch has been tested to successfully run a small Druid Test cluster with K8S and without Zookeeper.
Most of the code introduced here goes in a new extension. At a high level, it introduces a new Druid Kubernetes Extension that implements 3 druid discovery and leader election related interfaces... "DruidNodeDiscoveryProvider", "DruidLeaderSelector", "DruidNodeAnnouncer" and provides necessary plumbing to use those when configured.
Internally, it uses https://github.com/kubernetes-client/java for all the kubernetes interactions and https://github.com/kubernetes-client/java/tree/master/extended/src/main/java/io/kubernetes/client/extended/leaderelection for the leader election.
See
kubernetes.mdfor how to use it. It can support multiple Druid clusters running on same K8S cluster [in same namespace].This PR has:
Note: This patch also adds "Bouncy Castle License" being same as "MIT License" for license checking purposes in
distribution/bin/check-licenses.py. See http://www.bouncycastle.org/licence.html