From 374438a3d631e98b34db4433d972fb4a221c0505 Mon Sep 17 00:00:00 2001
From: MatthieuFin <matthieu2717@gmail.com>
Date: Thu, 19 Jan 2023 00:42:34 +0100
Subject: [PATCH] feat(calico): add possibility to enable calico floatingIPs
 feature (#9680)

Add a variable `calico_felix_floatingIPs` which permit to enable calico feature `floatingIPs`
(disabled per default).

Signed-off-by: MatthieuFin <matthieu2717@gmail.com>

 #9679
---
 roles/network_plugin/calico/defaults/main.yml | 4 ++++
 roles/network_plugin/calico/tasks/install.yml | 3 ++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/roles/network_plugin/calico/defaults/main.yml b/roles/network_plugin/calico/defaults/main.yml
index f1066e6f6..c6e1813ca 100644
--- a/roles/network_plugin/calico/defaults/main.yml
+++ b/roles/network_plugin/calico/defaults/main.yml
@@ -51,6 +51,10 @@ calico_bpf_log_level: ""
 # Valid option for service mode: Tunnel (default), DSR=Direct Server Return
 calico_bpf_service_mode: Tunnel
 
+# Calico floatingIPs support
+# Valid option for floatingIPs: Disabled (default), Enabled
+calico_felix_floating_ips: Disabled
+
 # Limits for apps
 calico_node_memory_limit: 500M
 calico_node_cpu_limit: 300m
diff --git a/roles/network_plugin/calico/tasks/install.yml b/roles/network_plugin/calico/tasks/install.yml
index d55c910ac..158b62a9a 100644
--- a/roles/network_plugin/calico/tasks/install.yml
+++ b/roles/network_plugin/calico/tasks/install.yml
@@ -188,7 +188,8 @@
               "wireguardEnabled": {{ calico_wireguard_enabled | bool }},
               "logSeverityScreen": "{{ calico_felix_log_severity_screen }}",
               "vxlanEnabled": {{ calico_vxlan_mode != 'Never' }},
-              "featureDetectOverride": "{{ calico_feature_detect_override }}"
+              "featureDetectOverride": "{{ calico_feature_detect_override }}",
+              "floatingIPs": "{{ calico_felix_floating_ips }}"
             }
           }
 
-- 
GitLab