node

package
v0.0.0-...-ac943e3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 23, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package node provides node-level operations for the agent — notably removing the aether startup taint once the agent's CNI is serving, so workload pods can schedule onto the node (the Cilium-style cold-start gate; see issue #261).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TaintRemover

type TaintRemover struct {
	Client     client.Client
	NodeName   string
	SocketPath string
	Log        *slog.Logger
}

TaintRemover is a controller-runtime reconciler that removes the aether startup taint (aetherlabels.TaintAgentNotReady) from this agent's OWN node whenever the taint is present AND the CNI server is serving — signalled by its Unix socket existing, which means a pod's CNI ADD can now be handled. Workload pods don't tolerate the taint, so they wait until this runs.

Unlike the original one-shot remover, it reconciles: the controller's node-taint guard can (re-)apply the taint to a running node after a reboot or an agent outage (issue #569, gaps G1/G2), and this remover drops it again once CNI is serving. Best-effort: it never fails agent startup.

func (*TaintRemover) NeedLeaderElection

func (r *TaintRemover) NeedLeaderElection() bool

NeedLeaderElection runs on every agent (the taint is per-node), not just the leader.

func (*TaintRemover) Reconcile

func (r *TaintRemover) Reconcile(ctx context.Context, req reconcile.Request) (reconcile.Result, error)

Reconcile removes the startup taint from this agent's node when it is present and the CNI socket is serving. When the taint is present but CNI isn't up yet, it requeues (the reconciler can't watch a Unix socket) rather than blocking a worker. Best-effort: a patch failure is retried by controller-runtime, never surfaced as a startup failure.

func (*TaintRemover) SetupWithManager

func (r *TaintRemover) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager registers the remover to watch ONLY this agent's own Node object (filtered by node name), so every agent reconciles its own node and no other. A change that (re-)adds the taint re-triggers removal.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL