-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
POC: Setting upstream vhost for nginx. #719
Conversation
Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please follow instructions at https://github.com/kubernetes/kubernetes/wiki/CLA-FAQ to sign the CLA. It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.
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/test-infra repository. I understand the commands that are listed here. |
Stuck in getting the CLA signed due to LF CLA issues. But in the mean time I would appreciate the review of the work/direction. |
@mtanski apologies for the delay. This feature makes sense in many scenarios. |
@aledbf I'm going to be away for a week; so I'll make those changes when I'm back and solicit feedback then. |
Have signed the CLA (org & employee). This was delayed due to some LF internal issue that prevented my org for being able to sign the CLA. |
Finally had a chance to get back to this. I have rebased this against master (for ez merging) and added the missing annotation implementation file. |
@aledbf any chance to get this into upstream? |
@mtanski please rebase |
In the current k8 ingress there's no way to control "Host" header sent to upstream server; it's always the configured vhost. It's desirable to support custom Host header when proxying for a number of cases. One such case is forwarding to an Service that points to an external host that expect a host paramater (like AWS S3 buckets). There's a number of others. By default nginx set Host to the upstreams domain name (and not the one passed in) like K8 always forces. This provided an escape hatch to this behavior.
@aledbf here ya go |
/lgtm |
@mtanski thanks! |
@mtanski Can we just update the docs with this new directive? Thanks!!! |
@rikatz Yes. I will send a PR this week; most likely in the 2nd half. |
In the current k8 ingress there's no way to control "Host" header sent to upstream server; it's always the configured vhost.
It's desirable to support custom Host header when proxying for a number of cases. One such case is forwarding to an Service that points to an external host that expect a host paramater (like AWS S3 buckets). There's a number of others.
By default nginx set Host to the upstreams domain name (and not the one passed in) like K8 always forces. This provided an escape hatch to this behavior.
This is a proof of concept PR for review, feedback. I can incorporate all of that; I just need to make sure I'm going down the right path.