diff --git a/roles/network_plugin/cilium/defaults/main.yml b/roles/network_plugin/cilium/defaults/main.yml index 270fffee0..bdf7a346a 100755 --- a/roles/network_plugin/cilium/defaults/main.yml +++ b/roles/network_plugin/cilium/defaults/main.yml @@ -40,3 +40,12 @@ cilium_enable_legacy_services: false # Deploy cilium even if kube_network_plugin is not cilium. # This enables to deploy cilium alongside another CNI to replace kube-proxy. cilium_deploy_additionally: false + +# Auto direct nodes routes can be used to advertise pods routes in your cluster +# without any tunelling (with `cilium_tunnel_mode` sets to `disabled`). +# This works only if you have a L2 connectivity between all your nodes. +# You wil also have to specify the variable `cilium_native_routing_cidr` to +# make this work. Please refer to the cilium documentation for more +# information about this kind of setups. +cilium_auto_direct_node_routes: false +cilium_native_routing_cidr: "" diff --git a/roles/network_plugin/cilium/templates/cilium-config.yml.j2 b/roles/network_plugin/cilium/templates/cilium-config.yml.j2 index 1b4811d3d..462ee6d25 100644 --- a/roles/network_plugin/cilium/templates/cilium-config.yml.j2 +++ b/roles/network_plugin/cilium/templates/cilium-config.yml.j2 @@ -142,3 +142,6 @@ data: enable-legacy-services: "{{cilium_enable_legacy_services}}" kube-proxy-replacement: "{{ cilium_kube_proxy_replacement }}" + + native-routing-cidr: "{{ cilium_native_routing_cidr }}" + auto-direct-node-routes: "{{ cilium_auto_direct_node_routes }}"