-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Status: Add support for multiple Node IP addresses. #14049
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
Conversation
✅ Deploy Preview for kubernetes-ingress-nginx canceled.
|
Welcome @agusdallalba! |
Hi @agusdallalba. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
bbc1686
to
74d4629
Compare
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.
/retitle Status: Add support for multiple Node IP addresses.
/triage accepted
/kind feature
/priority backlog
/lgtm
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: agusdallalba, Gacko The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What this PR does / why we need it:
The
--update-status
functionality is extremely useful in "stretched", bare metal, and minimalistic k8s deployments, because it lets us do simple DNS load balancing in conjunction with external_dns or k8s_gateway with no single points of failure.What updateStatus does is set
ingress.status.loadBalancer.ingress.ip[]
to the address of every node that's running the ingress-nginx controller.However, in dual stack clusters (or any clusters where nodes have more than 1 IP address) updateStatus picks only the first address of each node. So we end up with a single-stack Ingress even though the node is reachable on both IPv4 and IPv6 addresses.
This PR addresses this limitation and makes the controller publish every appropriate address of the node to the Ingress status.
I took care to preserve the previous behaviour where:
--report-node-internal-ip-address
is true, only internal addresses are pushed to the Ingress status.--report-node-internal-ip-address
is false, only external addresses are pushed to the Ingress status, unless,--report-node-internal-ip-address
is false, and the node has 0 external addresses, internal addresses are picked instead.Types of changes
How Has This Been Tested?
I added more tests, ran
make test
,make build
,make image
, and pushed to a cluster to try it out and confirm that it works as I expect it to.Checklist: