flock-agent: GC orphaned allocations; retry birdc on socket-not-ready (#5)
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:
ops
2026-08-17 04:24:13 +00:00
parent 197bc6f3b8
commit 31088ca8f2
5 changed files with 247 additions and 8 deletions
+10
View File
@@ -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)
}