From d577629b5b2c767a6031f90fe1303f8811a8b870 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Mon, 2 Sep 2019 20:16:49 +0100 Subject: fix(k8s): Add nginx route for load-balancer health checks --- infra/kubernetes/https-lb/ingress.yaml | 5 +++-- infra/kubernetes/nginx/nginx.conf | 7 +++++++ infra/kubernetes/nginx/nginx.yaml | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) (limited to 'infra/kubernetes') diff --git a/infra/kubernetes/https-lb/ingress.yaml b/infra/kubernetes/https-lb/ingress.yaml index 03fa2cec0738..f1d9fa4270b0 100644 --- a/infra/kubernetes/https-lb/ingress.yaml +++ b/infra/kubernetes/https-lb/ingress.yaml @@ -18,6 +18,7 @@ spec: - host: oslo.pub http: paths: - - backend: + - path: / + backend: serviceName: nginx - servicePort: 80 + servicePort: 6756 diff --git a/infra/kubernetes/nginx/nginx.conf b/infra/kubernetes/nginx/nginx.conf index cdc228b494b0..5a008a0b953f 100644 --- a/infra/kubernetes/nginx/nginx.conf +++ b/infra/kubernetes/nginx/nginx.conf @@ -25,6 +25,13 @@ http { sendfile on; keepalive_timeout 65; + server { + listen 80 default_server; + location / { + return 200 "ok"; + } + } + server { listen 80; server_name oslo.pub; diff --git a/infra/kubernetes/nginx/nginx.yaml b/infra/kubernetes/nginx/nginx.yaml index c107ab68764a..366beb458cc4 100644 --- a/infra/kubernetes/nginx/nginx.yaml +++ b/infra/kubernetes/nginx/nginx.yaml @@ -51,5 +51,5 @@ spec: app: nginx ports: - protocol: TCP - port: 80 + port: 6756 targetPort: 80 -- cgit 1.4.1