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 authored and YutaroHayakawa committed Mar 13, 2024
1 parent 687e4f8 commit 54c01e2
Show file tree
Hide file tree
Showing 8 changed files with 1,091 additions and 5 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 54c01e2

Please sign in to comment.