-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
default route is wrong #52
Comments
Currently, the controller doesn't include the default server, which catches all HTTP/HTTPS requests with a host header that doesn't match any of the Ingress hosts. Thx for pointing that out. We'll add it. |
@jacek-marchwicki apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: default-ingress
annotations:
nginx.org/default-server: "true"
spec:
tls:
- secretName: default-secret
backend:
serviceName: default-service
servicePort: 80 Note that we don't define any Ingress rules, just a default backend without a hostname. The This way you can create a custom service that returns 404s or other things if you want. Let me know your thoughts. |
@pleshakov pretty hacky but if it works it's good quick fix ;) Thank you! |
@jacek-marchwicki |
Ideally, this feature should be a part of a bigger feature (the default server) that solves nginx#52. For now, we add the "-health-status" parameter to the controller. If it is present, the default server listening on port 80 with the health check location "/nginx-health" gets added to the main nginx configuration. Closes nginx#90
in this example:
https://cofee.minikube/
givescoffee-rc-XYZ
(correct)https://cafe.minikube/coffee
givescoffee-rc-XYZ
(correct)https://cafe.minikube/tea
givestea-rc-XYZ
(correct)https://wrong.minikube/
givescoffee-rc-XYZ
(WRONG) it should return 404The text was updated successfully, but these errors were encountered: