Skip to content

feat: Harden fabric-router DaemonSet defaults - #274

Merged
privateip merged 2 commits into
mainfrom
feat/fabric-router-operational-hardening
Aug 3, 2026
Merged

feat: Harden fabric-router DaemonSet defaults#274
privateip merged 2 commits into
mainfrom
feat/fabric-router-operational-hardening

Conversation

@privateip

@privateip privateip commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Summary

The canonical fabric-router DaemonSet baseline had no liveness/startup probes, no resource requests/limits, no graceful shutdown hook, and no rolling update strategy — gaps that would otherwise cost every consumer (prod, staging, containerlab) real operational safety once they adopt this baseline.

  • updateStrategy.rollingUpdate.maxUnavailable: 1 so rollouts don't take down the underlay fleet-wide at once.
  • A preStop hook and resource requests/limits sized for FRR's actual footprint at this scale (small peer/route count, not a full-table edge router).
  • A liveness check using per-daemon vtysh -d <daemon> -c "show version" calls instead of pidof zebra bgpd — verified against FRR's source that a pidof-style or vtysh -c "show daemons" check can't reliably detect a single dead daemon, since it only needs one named process alive (or, for show daemons, silently omits unreachable daemons without affecting the exit code).
  • A startupProbe so a slow config load (peer groups, route-maps, prefix-lists) isn't killed by liveness before it's up.
  • priorityClassName: system-node-critical and dnsPolicy: ClusterFirstWithHostNet

privateip and others added 2 commits August 2, 2026 20:03
Adds livenessProbe (pidof zebra/bgpd), resource requests/limits, a
preStop hook for graceful FRR shutdown, and rollingUpdate strategy —
all standard, environment-agnostic defaults for an FRR DaemonSet so
every consumer (prod, staging, containerlab) gets them without needing
a per-environment patch.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Research against Calico/MetalLB/Cilium's production FRR/BGP DaemonSets
surfaced several gaps versus real-world practice:

- pidof zebra bgpd only proves the processes are resident, not that
  they're responsive, and passes as long as any one of the named
  processes is alive. Replace with per-daemon vtysh checks
  (`vtysh -d <daemon> -c "show version"`) — verified via FRR source
  that `vtysh -c "show daemons"` silently omits unreachable daemons
  from its exit code, so it wouldn't have caught a dead bgpd either.
- Add a startupProbe so a slow config load (peer groups, route-maps,
  prefix-lists) doesn't get killed by liveness before it's up.
- Add priorityClassName: system-node-critical, matching calico-node
  and cilium-agent, so the speaker isn't evicted under node pressure.
- Add dnsPolicy: ClusterFirstWithHostNet, required alongside
  hostNetwork: true and missing before now.
- Bump cpu request 50m -> 100m to absorb BFD/convergence bursts.

terminationGracePeriodSeconds is intentionally left untouched:
calico-node and MetalLB's speaker both ship low values (0s and 2s)
rather than stretching it to match BGP hold-timers, relying on BFD
for fast peer-side failure detection instead of a k8s-side graceful
drain.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@privateip
privateip requested a review from a team as a code owner August 3, 2026 00:19
@privateip
privateip merged commit a4a26cd into main Aug 3, 2026
9 checks passed
@privateip
privateip deleted the feat/fabric-router-operational-hardening branch August 3, 2026 01:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants