agent: maintain NetworkUnavailable=False on owned nodes
Build flock Image / build (push) Has been cancelled
Build flock Image / build (push) Has been cancelled
When Calico shuts down on a flock-labeled node, calico-node sets NetworkUnavailable=True with reason CalicoIsDown. Nothing replaces it, so kubelet's NodeController applies node.kubernetes.io/network- unavailable:NoSchedule and new pods can't land. flock-agent now patches Status.Conditions every 60s with NetworkUnavailable=False (reason=FlockReady). RBAC: nodes/status patch. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -53,6 +53,12 @@ func (s *Server) configureRuntime(ctx context.Context) error {
|
||||
return fmt.Errorf("pod informer: %w", err)
|
||||
}
|
||||
|
||||
// Keep NetworkUnavailable=False so the node.kubernetes.io/network-
|
||||
// unavailable taint never gets re-applied. Calico's calico-node sets
|
||||
// it on shutdown; without an owner replacing it, kubelet's controller
|
||||
// taints the node and blocks scheduling.
|
||||
go keepNetworkAvailable(ctx, s.restCfg, s.Node, s.Logger)
|
||||
|
||||
bird := &BirdManager{
|
||||
NodeName: s.Node,
|
||||
ConfigPath: "/etc/flock/bird/bird.conf",
|
||||
|
||||
Reference in New Issue
Block a user