flock-agent: GC orphaned allocations; retry birdc on socket-not-ready (#5)
flock / release (push) Successful in 1m7s
flock / release (push) Successful in 1m7s
flock-agent: GC orphaned allocations; retry birdc on socket-not-ready
This commit was merged in pull request #5.
This commit is contained in:
@@ -172,6 +172,16 @@ func (r *AnycastReconciler) renderBird(desired map[string]anycastTarget) {
|
||||
if a.State != StateCommitted {
|
||||
continue
|
||||
}
|
||||
// Defense-in-depth: skip IPs for pods that are no longer on this
|
||||
// node. The startup and periodic GC clean the store, but this guard
|
||||
// prevents advertising a stale route in the window before GC runs
|
||||
// and on any reconcile pass for IPs that outlast a GC tick.
|
||||
if r.Pods != nil {
|
||||
pod, ok := r.Pods.Get(a.Namespace, a.PodName)
|
||||
if !ok || (a.OwnerUID != "" && string(pod.UID) != a.OwnerUID) {
|
||||
continue
|
||||
}
|
||||
}
|
||||
if ip := net.ParseIP(a.IP6); ip != nil && !ipInAny(ip, nodeV6) {
|
||||
add(ip)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user