Skip to content

Commit

Permalink
fix: Default BGP peering for worker nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Mendoza committed Aug 12, 2024
1 parent 7bc2eea commit 72bb904
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions cloud/linode/cilium_loadbalancers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 72bb904

Please sign in to comment.