JonLatane / jonline

Dumfederated gRPC social network implemented in Rust/Tonic/Diesel with both Flutter and React (web+native) frontends. 🐕💩EZ to deploy to your k8s cluster.

Home Page:https://jonline.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

  • 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, and jonline jobs to the same namespace (ie with names like jonline-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 have jonline.io, bullcity.social and oakcitysocial.
      • DEPLOY_TAG: Defaults to default.

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.