ingress-nginx
ingress-nginx copied to clipboard
Fix admission webhook host/path overlap detection not working for multiple rules
What this PR does / why we need it:
The checkOverlap function should check all rules of a new ingress object to make sure it doesn't overlap with any existing ingress objects. This function would exit early before if the first rule passes validation even if it should check all rules. This PR fixes the function to check all rules for overlap before accepting the object.
Types of changes
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] CVE Report (Scanner found CVE and adding report)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Documentation only
Which issue/s this PR fixes
fixes #13161
How Has This Been Tested?
Manually built an image and deployed locally, and the repro case in #13161 now fails validation as expected. Also, the new e2e test passed github CI.
Checklist:
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [x] I've read the CONTRIBUTION guide
- [x] I have added unit and/or e2e tests to cover my changes.
- [x] All new and existing tests passed.
Hi @rkevin-arch. 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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test label.
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-sigs/prow repository.
Deploy Preview for kubernetes-ingress-nginx canceled.
| Name | Link |
|---|---|
| Latest commit | 180011e0c87c85be12aae823ca25b864cbd6a065 |
| Latest deploy log | https://app.netlify.com/sites/kubernetes-ingress-nginx/deploys/67f1f2d962908d00081c1442 |
/kind bug /priority backlog /triage accepted /ok-to-test
Hi! It seems like this PR has been accepted (via the labels) over a month ago, and there has been patch releases made in the meantime without this PR being merged. Is there anything I can do to get this merged? Thanks!
This is stale, but we won't close it automatically, just bear in mind the maintainers may be busy with other tasks and will reach your issue ASAP. If you have any question or request to prioritize this, please reach #ingress-nginx-dev on Kubernetes Slack.
The lifecycle/frozen label can not be applied to PRs.
This bot removes lifecycle/frozen from PRs because:
- Commenting
/lifecycle frozenon a PR has not worked since March 2021 - PRs that remain open for >150 days are unlikely to be easily rebased
You can:
- Rebase this PR and attempt to get it merged
- Close this PR with
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/remove-lifecycle frozen
/cherry-pick release-1.13
@Gacko: once the present PR merges, I will cherry-pick it on top of release-1.13 in a new PR and assign it to you.
In response to this:
/cherry-pick release-1.13
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-sigs/prow repository.
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: Gacko, rkevin-arch
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~OWNERS~~ [Gacko]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
/cherry-pick release-1.14
@Gacko: once the present PR merges, I will cherry-pick it on top of release-1.14 in a new PR and assign it to you.
In response to this:
/cherry-pick release-1.14
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-sigs/prow repository.
@Gacko: new pull request created: #14131
In response to this:
/cherry-pick release-1.13
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-sigs/prow repository.
@Gacko: new pull request created: #14132
In response to this:
/cherry-pick release-1.14
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-sigs/prow repository.