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.
This commit is contained in:
Vincent Ambo 2019-12-20 16:07:40 +00:00
parent 9653bdcf69
commit 2512ea4256
2 changed files with 11 additions and 2 deletions

View file

@ -70,4 +70,5 @@ spec:
app: cgit app: cgit
ports: ports:
- protocol: TCP - protocol: TCP
port: 8080 port: 2448 # cgit
targetPort: 8080

View file

@ -6,7 +6,7 @@ kind: Ingress
metadata: metadata:
name: https-ingress name: https-ingress
annotations: 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: spec:
# Default traffic is routed to the blog, in case people go to # Default traffic is routed to the blog, in case people go to
# peculiar hostnames. # peculiar hostnames.
@ -14,6 +14,14 @@ spec:
serviceName: tazblog serviceName: tazblog
servicePort: 8000 servicePort: 8000
rules: 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 # Route oslo.pub to the nginx instance which serves redirects
- host: oslo.pub - host: oslo.pub
http: http: