-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
cmd: Disable local node routes when endpoint routes are enabled #28324
cmd: Disable local node routes when endpoint routes are enabled #28324
Conversation
/test |
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.
Helm related changes lgttm ✔️
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.
Thank you for the detailed PR description. The doc changes you included look great, but there is one extra place that I believe still needs an update- similar to the multi-pool IPAM docs:
cilium/Documentation/network/concepts/routing.rst
Lines 288 to 299 in bb6decf
Configuration | |
------------- | |
The following configuration options must be set to run the datapath on GKE: | |
* ``gke.enabled: true``: Enables the Google Kubernetes Engine (GKE) datapath. | |
Setting this to ``true`` will enable the following options: | |
* ``ipam: kubernetes``: Enable :ref:`k8s_hostscope` IPAM | |
* ``routing-mode: native``: Enable native routing mode | |
* ``enable-endpoint-routes: true``: Enable per-endpoint routing on the node | |
* ``enable-local-node-route: false``: Disable installation of the local node route |
Can you please update this page and then re-request a review from me?
@learnitall I've updated the highlighted section as follows: diff --git a/Documentation/network/concepts/routing.rst b/Documentation/network/concepts/routing.rst
index 002407eaa24d..1e912248d477 100644
--- a/Documentation/network/concepts/routing.rst
+++ b/Documentation/network/concepts/routing.rst
@@ -296,7 +296,7 @@ The following configuration options must be set to run the datapath on GKE:
* ``ipam: kubernetes``: Enable :ref:`k8s_hostscope` IPAM
* ``routing-mode: native``: Enable native routing mode
* ``enable-endpoint-routes: true``: Enable per-endpoint routing on the node
- * ``enable-local-node-route: false``: Disable installation of the local node route
+ (automatically disables the local node route).
* ``ipv4-native-routing-cidr: x.x.x.x/y``: Set the CIDR in which native routing
is supported. |
7455cbb
to
579dcd4
Compare
The command-line description of `enable-endpoint-routes` states: "Use per endpoint routes instead of routing via cilium_host". This description however has not been true: Even with per-endpoint routes enabled, Cilium would still install the local node route unless explicitly disabled. Not only is the local node route (which installs a single route based on the local pod CIDR) redundant to per-endpoint routes (which installs a route per endpoint), it also does not work on IPAM modes that do not have a local pod CIDR, such as ENI or Azure. On Azure, GKE, and in the MultiPool CI, we already disabled the local node route explicitly when enabling per-endpoint routes, but in many other cases (ENI, as well as most of our CI (see github/actions/cilium-config)) we forgot to disable local node routes explicitly when per-endpoint routes are enabled. Therefore, this commit improves UX by automatically disabling the local node route if per-endpoint routes are enabled. This approach was discussed at the Cilium Community meeting on June 7, 2023. As an alternative to this change, we could also introduce a new tri-mode flag (i.e. "per-endpoint routes", "local node route", "none"), but such a change might introduce unnecessary churn if we decide to remove the local node routes further down the road. Signed-off-by: Sebastian Wicki <sebastian@isovalent.com>
579dcd4
to
da9758f
Compare
The command-line description of
enable-endpoint-routes
states: "Use per endpoint routes instead of routing via cilium_host". This description however has not been true: Even with per-endpoint routes enabled, Cilium would still install the local node route (i.e. "routing via cilium_host") unless explicitly disabled.Not only is the local node route (which installs a single route based on the local pod CIDR) redundant to per-endpoint routes (which installs a route per endpoint), it also does not work on IPAM modes that do not have a local pod CIDR, such as ENI or Azure.
On Azure, GKE, and in the MultiPool CI, we already disabled the local node route explicitly when enabling per-endpoint routes, but in many other cases (ENI, as well as most of our CI (see
github/actions/cilium-config)) we forgot to disable local node routes explicitly when per-endpoint routes are enabled. Therefore, this commit improves UX by automatically disabling the local node route if per-endpoint routes are enabled. This approach was discussed at the Cilium Community meeting on June 7, 2023.
As an alternative to this change, we could also introduce a new tri-mode flag (i.e. "per-endpoint routes", "local node route", "none"), but such a change might introduce unnecessary churn if we decide to remove the local node routes further down the road.