Implement JBL: A single Kubernetes ingress for many Jonline servers on the same cluster
JonLatane opened this issue · comments
The major expense for Jonline right now is adding new Kubernetes (K8s) Ingresses for each domain. Each of jonline.io
, bullcity.social
and oakcitysocial
has its own external IP. It should be possible to use an external ingress that requires the host
header ahead of TCP operations, and let all 3 share a single load balancer.
Ideally, we could deploy a single Ingress that could forward.
-
One approach would be to make some kind of ingress that can work across namespaces.
- Looks like this works:
https://stackoverflow.com/a/64575791
- Looks like this works:
-
Otherwise, we need to start with a single-namespace ingress.
- Once that's done, we could update the deploy scripts to allow deploying multiple
jonline-minio
,jonline-postgres
, andjonline
jobs to the same namespace (ie with names likejonline-minio-default
,jonline-minio-bullcitysocial
, jonline-postgres- - When updating deploy scripts, the new parameters should be:
NAMESPACE
: This should stay in place, as-is! Though, note that the ultimate goal is to havejonline.io
,bullcity.social
andoakcitysocial
.DEPLOY_TAG
: Defaults todefault
.
- Once that's done, we could update the deploy scripts to allow deploying multiple
So far, the Jonline Balancer of Loads (JBL) has been added to Jonline. It has the beginnings of what it needs to read server configuration from a Kubernetes ConfigMap. From there, it will load TLS certs from Kubernetes Secrets in the configured Namespaces from the ConfigMap, and map traffic to the jonline
services in the Namespaces based on the TCP Host header.
It still needs to be setup to actually work though.