A Kubernetes-enabled ensemble provider for Apache Curator.
Add the dependency:
<dependencies>
<dependency>
<groupId>io.github.jmkeyes</groupId>
<artifactId>curator-kubernetes-ensemble-provider</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>
Now register the KubernetesEnsembleProvider
with Curator:
CuratorFramework client = CuratorFrameworkFactory.builder()
.ensembleProvider(new KubernetesEnsembleProvider("zookeeper:2812"))
.retryPolicy(new BoundedExponentialBackoffRetry(10, 30000, 100))
.ensembleTracker(true)
.build();
Now Curator will track the members of the Zookeeper ensemble dynamically.
- Clone this repository.
- Create your branch:
git checkout -b feature/branch
- Commit your changes:
git commit -am "I am developer."
- Push your changes:
git push origin feature/branch
- Create a PR of your branch against the
master
branch.