Skip to content
This repository was archived by the owner on Mar 24, 2026. It is now read-only.

Controller: Fix host/path overlap detection for multiple rules. - #13162

Merged
k8s-ci-robot merged 1 commit into
kubernetes:mainfrom
rkevin-arch:rkevin-fix-checkoverlap-early-return
Nov 6, 2025
Merged

k8s-ci-robot merged 1 commit into
kubernetes:mainfrom
rkevin-arch:rkevin-fix-checkoverlap-early-return

Conversation

@rkevin-arch

@rkevin-arch rkevin-arch commented Apr 6, 2025 •

Copy link
Copy Markdown
Contributor

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

  • 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.
  • I've read the CONTRIBUTION guide
  • I have added unit and/or e2e tests to cover my changes.
  • All new and existing tests passed.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. needs-priority labels Apr 6, 2025
@k8s-ci-robot

Copy link
Copy Markdown
Contributor

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.

Details

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.

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Apr 6, 2025
@netlify

netlify Bot commented Apr 6, 2025 •

Copy link
Copy Markdown

✅ Deploy Preview for kubernetes-ingress-nginx canceled.

Name Link
🔨 Latest commit 180011e
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-ingress-nginx/deploys/67f1f2d962908d00081c1442

@strongjz

strongjz commented May 8, 2025

Copy link
Copy Markdown
Member

/kind bug
/priority backlog
/triage accepted
/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. kind/bug Categorizes issue or PR as related to a bug. priority/backlog Higher priority than priority/awaiting-more-evidence. triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-priority labels May 8, 2025
@strongjz strongjz added this to the release-1.12 milestone May 8, 2025
@k8s-ci-robot k8s-ci-robot removed the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label May 8, 2025
@rkevin-arch

Copy link
Copy Markdown
Contributor Author

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!

@github-actions

github-actions Bot commented Sep 1, 2025

Copy link
Copy Markdown

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.

@github-actions github-actions Bot added the lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. label Sep 1, 2025
@k8s-triage-robot

Copy link
Copy Markdown

The lifecycle/frozen label can not be applied to PRs.

This bot removes lifecycle/frozen from PRs because:

  • Commenting /lifecycle frozen on 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

@k8s-ci-robot k8s-ci-robot removed the lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. label Sep 1, 2025
@strongjz
strongjz removed their request for review September 4, 2025 18:50

@Gacko Gacko left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/retitle Controller: Fix host/path overlap detection for multiple rules.
/triage accepted
/kind bug
/priority backlog
/lgtm

@k8s-ci-robot k8s-ci-robot changed the title Fix admission webhook host/path overlap detection not working for multiple rules Controller: Fix host/path overlap detection for multiple rules. Nov 6, 2025
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 6, 2025
@Gacko

Gacko commented Nov 6, 2025

Copy link
Copy Markdown
Member

/cherry-pick release-1.13

@k8s-infra-cherrypick-robot

Copy link
Copy Markdown
Contributor

@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.

Details

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.

@k8s-ci-robot

Copy link
Copy Markdown
Contributor

[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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@Gacko

Gacko commented Nov 6, 2025

Copy link
Copy Markdown
Member

/cherry-pick release-1.14

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 6, 2025
@k8s-infra-cherrypick-robot

Copy link
Copy Markdown
Contributor

@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.

Details

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.

@k8s-ci-robot
k8s-ci-robot merged commit 6393cdd into kubernetes:main Nov 6, 2025
@k8s-infra-cherrypick-robot

Copy link
Copy Markdown
Contributor

@Gacko: new pull request created: #14131

Details

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.

@k8s-infra-cherrypick-robot

Copy link
Copy Markdown
Contributor

@Gacko: new pull request created: #14132

Details

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. priority/backlog Higher priority than priority/awaiting-more-evidence. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Admission webhook did not detect host/path overlap with multiple ingress rules

6 participants