-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
do not require --default-backend-service #3126
do not require --default-backend-service #3126
Conversation
This approach lgtm |
The original reason for the default backend was related to the limitation of providing a default route when no valid servers were found. |
I understand this is |
@jonpulsifer pass the tests |
@@ -584,6 +584,17 @@ http { | |||
|
|||
{{ end }} | |||
|
|||
# backend for when default-backend-service is not configured or it does not have endpoints | |||
server { | |||
listen {{ $all.ListenPorts.Default }} default_server {{ if $all.Cfg.ReusePort }}reuseport{{ end }} backlog={{ $all.BacklogSize }}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I kind of repurposed this $all.ListenPorts.Default
, I don't see it being used anywhere else.
The PR is ready now. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aledbf, ElvinEfendi The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Hello! I'm not very familiar with Ingress-nginx yet, but shouldn't you build a new Docker image for Ingress-nginx to use with the mandatory.yaml file? My Ingress-nginx pod won't launch because it's missing a default backend now that the deployment file has been changed. Since the Ingress-nginx code has been changed, I would expect that same deployment file not to be using the same Docker image as before. Please tell me if I'm missing anything here =) |
@Rude-Monkey apologies for this. The deployment files should be updated after the release. |
Thanks @aledbf ! No problem at all. =D |
In fact, default-backend-service is not required. See kubernetes/ingress-nginx#3126 Signed-off-by: zhanglei <[email protected]>
In fact, default-backend-service is not required. See kubernetes/ingress-nginx#3126 Signed-off-by: zhanglei <[email protected]>
It's not needed since nginx 0.20.0. See the following pull-requests for context: * kubernetes/ingress-nginx#3126 * kubernetes/ingress-nginx#3156
It's not needed since nginx 0.20.0. See the following pull-requests for context: * kubernetes/ingress-nginx#3126 * kubernetes/ingress-nginx#3156
In fact, default-backend-service is not required. See kubernetes/ingress-nginx#3126 Signed-off-by: zhanglei <[email protected]>
In fact, default-backend-service is not required. See kubernetes/ingress-nginx#3126 Signed-off-by: zhanglei <[email protected]> Signed-off-by: Roland Gritzer <[email protected]>
In fact, default-backend-service is not required. See kubernetes/ingress-nginx#3126 Signed-off-by: zhanglei <[email protected]>
In fact, default-backend-service is not required. See kubernetes/ingress-nginx#3126 Signed-off-by: zhanglei <[email protected]>
In fact, default-backend-service is not required. See kubernetes/ingress-nginx#3126 Signed-off-by: zhanglei <[email protected]>
In fact, default-backend-service is not required. See kubernetes/ingress-nginx#3126 Signed-off-by: zhanglei <[email protected]>
What this PR does / why we need it:
At this time the PR is mainly to foster discussion around the necessity ofdefault-backend-service
.The idea is not everyone requires custom default backend and it should not be ingress-nginx's concern to provide a sophisticated default backend. What I'm suggesting in this PR is to make
default-backend-service
optional. When it is not given then ingress-nginx returns 404 directly from Nginx. When configured then the existing behaviour is held.Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged): fixes #Special notes for your reviewer: