From 72bb9042dea954cfb0165356c03e3814c3c32c28 Mon Sep 17 00:00:00 2001 From: Brian Mendoza Date: Mon, 12 Aug 2024 10:11:57 -0400 Subject: [PATCH] fix: Default BGP peering for worker nodes --- cloud/linode/cilium_loadbalancers.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/cloud/linode/cilium_loadbalancers.go b/cloud/linode/cilium_loadbalancers.go index ab839685..49d97f9e 100644 --- a/cloud/linode/cilium_loadbalancers.go +++ b/cloud/linode/cilium_loadbalancers.go @@ -442,9 +442,16 @@ func (l *loadbalancers) ensureCiliumBGPPeeringPolicy(ctx context.Context) error // otherwise create it var nodeSelector slimv1.LabelSelector - // If no BGPNodeSelector is specified, select all nodes by default. + // If no BGPNodeSelector is specified, select all worker nodes. if Options.BGPNodeSelector == "" { - nodeSelector = slimv1.LabelSelector{} + nodeSelector = slimv1.LabelSelector{ + MatchExpressions: []slimv1.LabelSelectorRequirement{ + { + Key: "node-role.kubernetes.io/control-plane", + Operator: slimv1.LabelSelectorOpDoesNotExist, + }, + }, + } } else { kv := strings.Split(Options.BGPNodeSelector, "=") if len(kv) != 2 {