networking: gateway in network configuration does not set default route #862
Comments
@eyakubovich should we move this to cni? |
The defined gateway should be the gateway on the 192.168.2.0/24 route, not default. However that doesn't work as well. Moving this to CNI. |
@steveej My previous comment doesn't make much sense. However the behavior is as designed:
On the other hand, if "gateway" was specified, "gw" can be dropped:
Why the complexity? It helps to look at what IPAM plugin returns: "ip", "gateway", and "routes". The main plugin uses "gateway" for things like setting an IP on the bridge (turning it into a gateway), if requested. And it will also use that value if "gw" is missing on the route. In case of "host-local", I will admit that it is confusing but it does allow for many use cases. |
@steveej @eyakubovich what's the solution here, better documentation? |
any news on this? |
This topic is still undecided in CNI. The tendency goes towards a new IPAM boolean attribute named similar to "gatewayIsDefault". IPAM would then generate the default route and pass it along. |
In general the behavior remains as is, but the bridge plugin received a new 'isDefaultGateway' attribute for convenience. |
I'm running a pod having the following network defined:
I would expect the defined gateway to be the default gateway on that interface, but that is not the case.
What would be the pros and cons of doing so?
The text was updated successfully, but these errors were encountered: