nodetaint

package
v0.0.0-...-c46dd35 Latest Latest
Warning

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

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

Documentation

Overview

Package nodetaint holds the controller's node-taint guard: a leader-elected reconciler that RE-ARMS the aether startup taint (aetherlabels.TaintAgentNotReady) on a node whose agent pod is missing or not-Ready past a grace period, so a node that rebooted (kubelet never re-applies register-with-taints, gap G1) or whose agent crashed (gap G2) stops scheduling workload pods until an agent is serving again. It NEVER removes the taint — the per-node agent (agent/internal/node) owns removal, gated on its CNI socket. See issue #569 / proposal 033.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Guard

type Guard struct {
	Client client.Client
	// AgentNamespace is the namespace the agent DaemonSet runs in (aether-system).
	AgentNamespace string
	Log            *slog.Logger
	// contains filtered or unexported fields
}

Guard re-arms the startup taint on nodes without a Ready agent pod. It watches Nodes and the agent DaemonSet's pods (in AgentNamespace). It is leader-elected (one writer mesh-wide) and never removes the taint.

func (*Guard) NeedLeaderElection

func (g *Guard) NeedLeaderElection() bool

NeedLeaderElection makes the guard run only on the elected controller — the taint is a single-writer, mesh-wide decision.

func (*Guard) Reconcile

func (g *Guard) Reconcile(ctx context.Context, req reconcile.Request) (reconcile.Result, error)

Reconcile re-arms the taint on a node that has had no Ready agent pod for the grace period. When a Ready agent pod exists it clears the debounce (and never touches the taint — removal is the agent's job).

func (*Guard) SetupWithManager

func (g *Guard) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager registers the guard: it reconciles Nodes and maps every agent-pod change back to that pod's node, so a pod going NotReady / being deleted re-triggers the node's evaluation.

Jump to

Keyboard shortcuts

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