Skip to content

feat: Add support for use-regex annotation#307

Merged
k8s-ci-robot merged 3 commits intokubernetes-sigs:mainfrom
chakravardhan:feature/use-regex
Feb 5, 2026
Merged

feat: Add support for use-regex annotation#307
k8s-ci-robot merged 3 commits intokubernetes-sigs:mainfrom
chakravardhan:feature/use-regex

Conversation

@chakravardhan
Copy link
Copy Markdown
Contributor

What type of PR is this?
/kind feature

What this PR does / why we need it:

This PR implements support for the nginx.ingress.kubernetes.io/use-regex annotation, enabling Regex Path Matching in the generated Gateway API resources.

Key Changes

  • Annotation: Added use-regex support.
  • Mapping: Maps paths to HTTPRoute.spec.rules[].matches[].path.type: RegularExpression when the annotation is set to "true".
  • Infrastructure: Added implementationSpecificPathMatch handler to allow ImplementationSpecific paths to pass through the common conversion layer before being upgraded to RegularExpression.

Verification

  • Unit Tests: Added regex_test.go covering positive (regex) and negative (prefix default) cases.

Which issue(s) this PR fixes:

Does this PR introduce a user-facing change?:


@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Jan 20, 2026
@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla Bot commented Jan 20, 2026

CLA Signed

The committers listed above are authorized under a signed CLA.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Jan 20, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Hi @chakravardhan. Thanks for your PR.

I'm waiting for a kubernetes-sigs 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 needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jan 20, 2026
Comment thread pkg/i2gw/providers/ingressnginx/converter.go
Comment thread pkg/i2gw/providers/ingressnginx/regex.go Outdated
Comment thread pkg/i2gw/providers/ingressnginx/regex.go Outdated
Copy link
Copy Markdown
Contributor

@Stevenjin8 Stevenjin8 left a comment

Choose a reason for hiding this comment

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

Some minor nits, but pretty much LGTM. One thing that we need to keep in mind is that ingress nginx supports referencing capture groups in other annotations, but I don't think we should deal with that in gateway api

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 23, 2026
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 27, 2026
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Jan 27, 2026
@Stevenjin8

This comment was marked as outdated.

@Stevenjin8
Copy link
Copy Markdown
Contributor

/approve

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 3, 2026
@Stevenjin8
Copy link
Copy Markdown
Contributor

/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. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 4, 2026
@bexxmodd
Copy link
Copy Markdown

bexxmodd commented Feb 5, 2026

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 5, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bexxmodd, chakravardhan, kkk777-7, Stevenjin8

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

@k8s-ci-robot k8s-ci-robot merged commit b843bc0 into kubernetes-sigs:main Feb 5, 2026
5 checks passed
rajashish pushed a commit to rajashish/ingress2gateway1 that referenced this pull request Feb 21, 2026
* feat: Add support for use-regex annotation

* Address review comments

* style: fix gofmt in regex_test.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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/feature Categorizes issue or PR as related to a new feature. 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. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants