-
Notifications
You must be signed in to change notification settings - Fork 466
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
NetworkServiceController: Add hairpin-mode support #44
Conversation
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.
Excellent @bzub
Can you please ensure syncHairpinIptablesRules does not create any haripin chains by default. i.e) if if nsc.globalHairpin || svcInfo.hairpin condition not met, then return in beginning of the method before adding rueles.
Also, for node-port service type accesing the node service on which pod is running, can we add in the documentation its not supported.
@murali-reddy thanks for the review. I've added support for NodePort and ensured no rules would be created if no hairpin options are set. I added to my manual tests for NodePort and deleting rules on Service/options change. Everything should be resolved but check it over please. Once I get your LGTM I'll squash commits and merge. |
Great Work! LGTM. Please go ahead with the merge. |
Tested on my local cluster with quay.io/bzub/kube-router:hairpin-mode
Fixes #9
Test examples:
IPs:
iptables on nodes:
Log into both pods:
Run httpd server and access it via Service IP: