Skip to content

Commit

Permalink
bgpv1: ExternalIP advertisement with BGP Control Plane
Browse files Browse the repository at this point in the history
Fixes: #29990

Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
  • Loading branch information
chaunceyjiang committed Mar 8, 2024
1 parent 7e4ad4a commit 8ce7fa4
Show file tree
Hide file tree
Showing 7 changed files with 1,090 additions and 4 deletions.
11 changes: 11 additions & 0 deletions pkg/bgpv1/manager/reconciler/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,17 @@ func (r *ServiceReconciler) svcDesiredRoutes(newc *v2alpha1api.CiliumBGPVirtualR
}
desiredRoutes = append(desiredRoutes, netip.PrefixFrom(addr, addr.BitLen()))
}
case v2alpha1api.BGPExternalIPAddr:
for _, extIP := range svc.Spec.ExternalIPs {
if extIP == "" {
continue
}
addr, err := netip.ParseAddr(extIP)
if err != nil {
continue
}
desiredRoutes = append(desiredRoutes, netip.PrefixFrom(addr, addr.BitLen()))
}
}
}

Expand Down

0 comments on commit 8ce7fa4

Please sign in to comment.