-
Notifications
You must be signed in to change notification settings - Fork 19
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
add route to local table for non loopback devices #138
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Lukas Hoehl <[email protected]>
Signed-off-by: Lukas Hoehl <[email protected]>
Signed-off-by: Lukas Hoehl <[email protected]>
@hown3d Thank you for your contribution. |
Thank you @hown3d for your contribution. Before I can start building your PR, a member of the organization must set the required label(s) {'reviewed/ok-to-test'}. Once started, you can check the build status in the PR checks section below. |
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 is it required to add the routes? It seems like the same is working without routes in node-local-dns where a device nodelocaldns
is created with a specific IP address. Please explain.
Additionally The kernel does a lookup in the local route table when a packet with a IP enters to see if a route for the address exists. There is a difference how the lookup works by scope:
Since the |
Why do we use host scope instead of universe scope if it makes our life more complicated?
I am not sure I can follow. How do |
What this PR does / why we need it:
When introducing the management of network interfaces with #128, using another interface than
lo
in g/g currently results in connectivity issues.Reason is that loopback devices automatically add routes for IP addresses assigned to it to the local routing table.
This PR creates the needed routes in the local table to ensure routing of the apiserver IP works.
Route is only added when not using the
lo
interface.Special notes for your reviewer:
The constants used from the golang.org/x/sys/unix package are only visible when GOOS is linux.
For more information see rtnetlink manpage