Skip to content

Commit dd988b9

Browse files
author
Aaron Suarez
authored
Redirect /metrics and /healthz to root in staging (#153)
* Redirect /metrics and /healthz to root in staging * Put the /* behind the explicit routes
1 parent 540edb3 commit dd988b9

File tree

1 file changed

+9
-0
lines changed
  • kubernetes/operationcode_python_backend/overlays/staging

1 file changed

+9
-0
lines changed

kubernetes/operationcode_python_backend/overlays/staging/ingress.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ metadata:
1010
alb.ingress.kubernetes.io/scheme: internet-facing
1111
alb.ingress.kubernetes.io/ssl-policy: ELBSecurityPolicy-TLS-1-2-2017-01
1212
alb.ingress.kubernetes.io/actions.ssl-redirect: '{"Type": "redirect", "RedirectConfig": { "Protocol": "HTTPS", "Port": "443", "StatusCode": "HTTP_301"}}'
13+
alb.ingress.kubernetes.io/actions.redirect-to-root: '{"Type":"redirect","RedirectConfig":{"Host":"resources.staging.operationcode.org","Path":"/","Port":"443","Protocol":"HTTPS","StatusCode":"HTTP_302"}}'
1314
labels:
1415
app: back-end
1516
spec:
@@ -40,6 +41,14 @@ spec:
4041
- host: resources-staging.k8s.operationcode.org
4142
http:
4243
paths:
44+
- path: /metrics
45+
backend:
46+
serviceName: redirect-to-root
47+
servicePort: use-annotation
48+
- path: /healthz
49+
backend:
50+
serviceName: redirect-to-root
51+
servicePort: use-annotation
4352
- path: /*
4453
backend:
4554
serviceName: resources-api-service

0 commit comments

Comments
 (0)