From 2512ea42567f74348fc5bfafb1ea1eb4ebe705dd Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Fri, 20 Dec 2019 16:07:40 +0000 Subject: feat(infra/k8s): Add cgit to Ingress load balancer Apart from the fact that TLS certificate provisioning is very wonky, it seems to be working now. AFAICT the L7 LBs still don't support path rewriting, which means that this is likely not the final configuration and it will move behind nginx instead. --- infra/kubernetes/cgit/config.yaml | 3 ++- infra/kubernetes/https-lb/ingress.yaml | 10 +++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'infra') diff --git a/infra/kubernetes/cgit/config.yaml b/infra/kubernetes/cgit/config.yaml index f59a237aaa23..577a56650ad6 100644 --- a/infra/kubernetes/cgit/config.yaml +++ b/infra/kubernetes/cgit/config.yaml @@ -70,4 +70,5 @@ spec: app: cgit ports: - protocol: TCP - port: 8080 + port: 2448 # cgit + targetPort: 8080 diff --git a/infra/kubernetes/https-lb/ingress.yaml b/infra/kubernetes/https-lb/ingress.yaml index f1d9fa4270b0..0a3092da2001 100644 --- a/infra/kubernetes/https-lb/ingress.yaml +++ b/infra/kubernetes/https-lb/ingress.yaml @@ -6,7 +6,7 @@ kind: Ingress metadata: name: https-ingress annotations: - networking.gke.io/managed-certificates: tazj-in, www-tazj-in, oslo-pub + networking.gke.io/managed-certificates: tazj-in, git-tazj-in, www-tazj-in, oslo-pub spec: # Default traffic is routed to the blog, in case people go to # peculiar hostnames. @@ -14,6 +14,14 @@ spec: serviceName: tazblog servicePort: 8000 rules: + # Route git.tazj.in to the cgit pods + - host: git.tazj.in + http: + paths: + - path: / + backend: + serviceName: cgit + servicePort: 2448 # Route oslo.pub to the nginx instance which serves redirects - host: oslo.pub http: -- cgit 1.4.1