From 3d19e744f0351fec719ffc587bb1ede4d20fc848 Mon Sep 17 00:00:00 2001
From: MatthieuFin <matthieu2717@gmail.com>
Date: Mon, 22 Apr 2024 04:35:34 +0200
Subject: [PATCH] feat(calico): add support filters on bgppeers per node
 definition (#11079)

Signed-off-by: MatthieuFin <matthieu2717@gmail.com>
---
 roles/network_plugin/calico/tasks/peer_with_router.yml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/roles/network_plugin/calico/tasks/peer_with_router.yml b/roles/network_plugin/calico/tasks/peer_with_router.yml
index a29ca36dd..6a7789894 100644
--- a/roles/network_plugin/calico/tasks/peer_with_router.yml
+++ b/roles/network_plugin/calico/tasks/peer_with_router.yml
@@ -64,6 +64,9 @@
         "asNumber": "{{ item.as }}",
         "node": "{{ inventory_hostname }}",
         "peerIP": "{{ item.router_id }}",
+        {% if calico_version is version('v3.26.0', '>=') and (item.filters | default([]) | length > 0) %}
+        "filters": {{ item.filters }},
+        {% endif %}
         "sourceAddress": "{{ item.sourceaddress | default('UseNodeIP') }}"
       }}
   register: output
-- 
GitLab