-
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
Fix mirror-target values without path separator and port #9889
Fix mirror-target values without path separator and port #9889
Conversation
This issue is currently awaiting triage. If Ingress contributors determines this is a relevant issue, they will accept it by applying the The Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Hi @ubergesundheit. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@ubergesundheit from what you describe, it appears to be a bug. If so, I think this should be taken care of asap. Some thoughts below
|
Also the tests are failing but that can be addressed once there is relevant data posted here |
Thank you for your comments, I've created bug report #9898 which contains instructions on how to reproduce. I think sending requests does not make sense in this case because this is about reconciliation of Ingress resources and does not change how requests are handeled by the internal nginx instance. |
Thanks for creating the issue as now there is content for readers. Help out any way you can to reduce the time to be spent by a developer/maintainer to get proof of the problem and the fix. The problem seems straight forward because of the missing slash character. Its just that a clear trail of live object snapshots |
Signed-off-by: Gerald Pape <[email protected]>
Signed-off-by: Gerald Pape <[email protected]>
Signed-off-by: Gerald Pape <[email protected]>
f11edf2
to
024cead
Compare
/approve It seems to be a bug indeed, I was checking this code today! Thanks for catching this. Please fix the e2e test ASAP, it should pass properly, so take a look if there is a flaw on the logic of the implementation or the test :) |
/hold |
Thank you for approving. Just pushed a commit to fix the test :) |
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.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cpanato, rikatz, ubergesundheit 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 |
/hold cancel |
What this PR does / why we need it:
Bug report in #9898
Ingress resources with annotation
nginx.ingress.kubernetes.io/mirror-target
and a value likehttp://my-host.org:8080$request_uri
(note there is no/
between the port and the $) cause ingress-nginx pods to crash (Tested withv1.3.1
but relevant code portions did not change since then).Parsing the url using golangs
url.Parse
would fail because of a missing/
separator. This caused theHost
portion of the mirror config to be set to an empty string which then would make the internal nginx instance unhappy. (emergency exit).This PR changes
Types of changes
How Has This Been Tested?
Tests have been added.
Checklist:
Does my pull request need a release note?
Any user-visible or operator-visible change qualifies for a release note. This could be a:
No release notes are required for changes to the following:
For more tips on writing good release notes, check out the Release Notes Handbook