diff --git a/roles/network_plugin/cilium/defaults/main.yml b/roles/network_plugin/cilium/defaults/main.yml index 270fffee0441075fb2690d42c38c1a48aa6b4d27..bdf7a346af898f31fd32d1885a42c29afd256438 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 1b4811d3dcf2199435485e442ca361af68d7eb3b..462ee6d256fc4ca87ccb3341cfb7dbe2e75cbf37 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 }}"