Templatize the kubernetes resources that dask-gateway generates
- Dominant language
- Python
- Stars
- 148
- Forks
- 93
- PR merge metrics
- No merged PRs in 30d
Description
For QHub we have moved away from using the dask-gateway helm chart to more tightly integrate dask-gateway with our traefik http/https/tcp proxy https://github.com/Quansight/qhub-terraform-modules/tree/main/modules/kubernetes/services/dask-gateway. This was mainly motivated when we found of that two traefik services in the same namespace in kubernetes do not play well with each other.
All that said the current issues we are facing is around decorating the `IngressRoute` and needing to add `tls: {"certManager": "default"}`. I would like to propose templatizing the [resource objects being created](https://github.com/dask/dask-gateway/blob/7d1659db8b2122d1a861ea820a459fd045fc3f02/dask-gateway-server/dask_gateway_server/backends/kubernetes/controller.py#L1192-L1295) via Traitlets.
For example
```python
INGRESS_ROUTE_TEMPLATE = {
"apiVersion": "traefik.containo.us/v1alpha1",
"kind": "IngressRoute",
"metadata": {
"labels": "PLACEHOLDER",
"annotations": "PLACEHOLDER",
"name": "PLACEHOLDER",
},
"spec": {
"entryPoints": "PLACEHOLDER",
"routes": [
{
"kind": "Rule",
"match": "PLACEHOLDER",
"services": [
{
"name": "PLACEHOLDER",
"namespace": "PLACEHOLDER",
"port": 8787,
}
],
"middlewares": "PLACEHOLDER",
}
],
},
}
```
Or possibly we should just make the `make_ingressroute` functions and similar overridable via traetlets callables. We need this functionality to expose the dask scheduler dashboard with `https`.
cc: @aktech
Contributor guide
Research direction
Start in dask-gateway-server/dask_gateway_server/backends/kubernetes/controller.py, at the resource-generation code around lines 1192-1295. Compare the proposed Traitlets templates with making make_ingressroute and similar functions overridable, then verify that generated resources can add the requested certManager TLS setting and expose the Dask scheduler dashboard over HTTPS.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kubernetes, python
- Domain
- infrastructure
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100