-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
We are currently investigating announcing kubernetes service ips via calico-node (replacing metallb).
An issue we are encountering is that calico announces the full service range (e.g. bgpconfigurations.spec.serviceLoadBalancerIPs) for externalTrafficPolicy: Cluster services to the peers.
This conflicts with the anycast failover mechanism between datacenters we are using as routes of failed services are not withdrawn.
Would it be possible to add a configuration to calico that changes the behavior to only announce /32 routes based on existing service.status.LoadBalancer.Ingress.ip within the configured bgpconfiguration.serviceLoadBalancerIPs (and externalip equivalents) if any ready endpoints for externalTrafficPolicy Cluster service exists.
For example:
kind: BGPConfiguration
spec:
singleIPAnnouncement: true
serviceLoadBalancerIPs:
- cidr: 192.168.1.0/24
Would then instead of only announcing the single /24 route, would instead only announce multiple /32 routes per ready service.
The implementation appears to be rather simple as the core logic basically already exists for externalTrafficPolicy: Local services:
https://github.com/projectcalico/calico/blob/master/confd/pkg/backends/calico/routes.go#L485