k8s: Fix the loadbalancer and nginx-apt
The healthchecks for nginx-apt were erroneously returning 301 errors to
the CDN and loadbalancer so apt wasn't serving. nginx is pedantic about
URIs. Additionally, this fixes the load balancer configs to use only one
set of annotations and values for SSL certificates, allowing it to sync
and come back up.
Change-Id: Iefd3ceb0c442169b83b91e1bb9e84e8b80ce469a
diff --git a/k8s/ingress.yaml b/k8s/ingress.yaml
index 2e1c4dc..91a855c 100644
--- a/k8s/ingress.yaml
+++ b/k8s/ingress.yaml
@@ -20,6 +20,11 @@
metadata:
name: nginx-apt-backend
spec:
+ healthCheck:
+ checkIntervalSec: 15
+ port: 80
+ type: HTTP
+ requestPath: /apt/
cdn:
enabled: true
cachePolicy:
@@ -49,15 +54,13 @@
metadata:
name: mendel-linux-ingress
annotations:
+ kubernetes.io/ingress.class: "gce"
kubernetes.io/ingress.global-static-ip-name: mendel-linux-ip
- ingress.kubernetes.io/ssl-cert: mendel-linux-org
networking.gke.io/managed-certificates: mendel-linux-org
spec:
backend:
serviceName: jenkins-mendel-linux
servicePort: 8080
- tls:
- - secretName: mendel-linux-ssl-cert
rules:
- host: mendel-linux.org
http:
diff --git a/k8s/nginx-apt.yaml b/k8s/nginx-apt.yaml
index 8d0c028..b6b6ffe 100644
--- a/k8s/nginx-apt.yaml
+++ b/k8s/nginx-apt.yaml
@@ -52,7 +52,7 @@
name: http
readinessProbe:
httpGet:
- path: /apt
+ path: /apt/
port: http
failureThreshold: 1
periodSeconds: 10