Skip to content

Ingress NGINX - Support Redirect#299

Open
jgreeer wants to merge 17 commits intokubernetes-sigs:mainfrom
jgreeer:ingress-nginx/support-redirect
Open

Ingress NGINX - Support Redirect#299
jgreeer wants to merge 17 commits intokubernetes-sigs:mainfrom
jgreeer:ingress-nginx/support-redirect

Conversation

@jgreeer
Copy link

@jgreeer jgreeer commented Jan 9, 2026

What type of PR is this?

Fixes #268

Does this PR introduce a user-facing change?:

Add support for `nginx.ingress.kubernetes.io/permanent-redirect` and `nginx.ingress.kubernetes.io/temporal-redirect` + warnings for `nginx.ingress.kubernetes.io/proxy-redirect-from` and `nginx.ingress.kubernetes.io/proxy-redirect-to`

@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 9, 2026
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jan 9, 2026
@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jan 9, 2026
@k8s-ci-robot
Copy link
Contributor

Hi @jgreeer. 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 the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Jan 9, 2026
@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 13, 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 13, 2026
@jgreeer
Copy link
Author

jgreeer commented Jan 15, 2026

nginx.ingress.kubernetes.io/from-to-www-redirect, nginx.ingress.kubernetes.io/permanent-redirect-code, and nginx.ingress.kubernetes.io/temporal-redirect-code require 307/308 status code support, so they cannot be implemented until v1.5 release.

@jgreeer jgreeer marked this pull request as ready for review January 16, 2026 18:16
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 16, 2026
@k8s-ci-robot k8s-ci-robot requested a review from rikatz January 16, 2026 18:16
@Stevenjin8
Copy link
Contributor

tbh gwapi 1.5 is just around the corner. I think we can merge this as is. WDYT @mikemorris

@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
@jgreeer
Copy link
Author

jgreeer commented Jan 23, 2026

tbh gwapi 1.5 is just around the corner. I think we can merge this as is. WDYT @mikemorris

this doesn't have the 307/308 status codes, it emits warnings for them. so we can merge now and then make another PR later for the status code annotations.

@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 23, 2026
@Stevenjin8
Copy link
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 Jan 28, 2026
@Stevenjin8
Copy link
Contributor

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jgreeer, 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 added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 3, 2026

// Set port if present
if parsedURL.Port() != "" {
port, err := strconv.Atoi(parsedURL.Port())
Copy link

Choose a reason for hiding this comment

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

Why are we ignoring this error? Let's append to errs.

Copy link
Contributor

Choose a reason for hiding this comment

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

This did get me thinking... we could have named ports here right?

Copy link
Author

Choose a reason for hiding this comment

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

this does gets caught by url.Parse() before we reach this, but i added a check to be safe. also not sure what you mean steven?

Copy link
Contributor

Choose a reason for hiding this comment

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

@jgreeer i just reread this and what I said makes no sense

Copy link
Contributor

Choose a reason for hiding this comment

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

@jgreeer Atoi can only really fail if the port overflows int, which shouldn't be possible unless you are actively trying to mess up. This seems fine.

chakravardhan added a commit to chakravardhan/ingress2gateway that referenced this pull request Feb 6, 2026
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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Ingress NGINX] Support Redirect

4 participants