Skip to content

Commit 4a609c7

Browse files
authored
Merge pull request #182 from minrk/deprecate-consul
deprecate consul due to unhealthy API clients
2 parents 687fa0a + ad93f27 commit 4a609c7

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

docs/source/consul.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Using TraefikConsulProxy
22

3+
```{warning}
4+
While it works today (2023), there does not appear to be a maintained Python client for the consul API.
5+
As such, using jupyterhub-traefik-proxy with consul is deprecated in jupyterhub-traefik-proxy 1.0.
6+
You can use etcd instead to achieve the same functionality (and slightly better performance).
7+
```
8+
39
[Consul](https://www.consul.io/)
410
is a distributed key-value store.
511
This and TraefikEtcdProxy is the choice to use when using jupyterhub-traefik-proxy

jupyterhub_traefik_proxy/consul.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,12 @@ def _default_client(self):
9494
kwargs.update({"token": self.consul_password})
9595
return consul.aio.Consul(**kwargs)
9696

97+
def __init__(self, **kwargs):
98+
super().__init__(**kwargs)
99+
self.log.warning(
100+
"Using traefik with consul is deprecated in jupyterhub-traefik-proxy 1.0 due to lack of support for the python-consul2 API client. Use etcd instead."
101+
)
102+
97103
def _define_kv_specific_static_config(self):
98104
provider_config = {
99105
"consul": {

0 commit comments

Comments
 (0)