-
Notifications
You must be signed in to change notification settings - Fork 144
Ingress NGINX - Support Redirect #299
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
Merged
k8s-ci-robot
merged 30 commits into
kubernetes-sigs:main
from
jgreeer:ingress-nginx/support-redirect
Feb 27, 2026
Merged
Changes from 17 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
363d20e
added temoporal and permanent redirect
jgreeer a969c7b
moved annotations to annotations.go
jgreeer d67662b
start of adding status codes
jgreeer 584206e
Merge branch 'main' into ingress-nginx/support-redirect
jgreeer 222d591
add more redirect annotations to file
jgreeer 08cc6f6
remove status codes and warn about those annotations
jgreeer 6edbfa0
parse URL and set for redirect
jgreeer 3e3c4d4
add warnings for proxy-redirect annotations
jgreeer 01fb5bf
Merge branch 'main' into ingress-nginx/support-redirect
jgreeer 712e81c
fix imports
jgreeer 26f8b91
Update pkg/i2gw/providers/ingressnginx/redirect.go
jgreeer 0fd3ffc
Update pkg/i2gw/providers/ingressnginx/annotations.go
jgreeer f9a7f93
give priority to temporal if both annotations are present
jgreeer e82e154
update copyright
jgreeer 6722897
change test for both annotations case
jgreeer dead24e
Merge branch 'main' into ingress-nginx/support-redirect
jgreeer 406cba4
added check for port number
jgreeer c75b765
Merge branch 'main' into ingress-nginx/support-redirect
jgreeer 00711fa
fixed backendrefs for redirect rule
jgreeer f385e0b
modify existing rule instead of creating a new one
jgreeer 3346624
replace full path as default
jgreeer a431c4e
fix tests
jgreeer 23bf2c9
lint
jgreeer 5e76879
iterate on all rules
jgreeer 3524eb4
accept default codes in permanent-redirect-code annotation
jgreeer 993ca43
Merge branch 'main' into ingress-nginx/support-redirect
jgreeer 77174ab
added intergation tests
jgreeer b55125f
get non canary ingress
jgreeer 1aad786
check if ingress is nil
jgreeer 5353829
add other status codes
jgreeer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Why are we ignoring this error? Let's append to errs.
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.
This did get me thinking... we could have named ports here right?
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.
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?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.
@jgreeer i just reread this and what I said makes no sense
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.
@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.