controller

package
v0.3.0 Latest Latest
Warning

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

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

Documentation

Overview

Package controller hosts the Wavefront reconciler: the control loop that wires detection (internal/gitpoll), discovery (internal/adapter), topology (internal/graph), the rolling-admission core (internal/engine) and the pin mechanism (internal/pin) into one stateless pass.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WavefrontReconciler

type WavefrontReconciler struct {
	client.Client
	Scheme    *runtime.Scheme
	Recorder  events.EventRecorder
	Adapter   adapter.Adapter
	Strategy  selection.Strategy
	Poller    *gitpoll.Poller
	PinWriter *pin.Writer
	Clock     func() time.Time
	Metrics   *metrics.Instruments
	// contains filtered or unexported fields
}

WavefrontReconciler reconciles a Wavefront object.

Every pass is a full recalculation: discovery, source resolution, graph derivation and admissibility are all derived from live cluster state plus the poller's observations, never from stored orchestration state. The only state status carries forward is edge-trigger ledgers, each diffed against the exact capped, sorted mirror it itself holds: the hold ledger (status.Held, against the pass's derived holds) and the shadow-admission ledger (status.Shadow, against this pass's admissions), never against the unbounded live-derived set, so a restart replays at most StatusListCap detections rather than an unbounded backlog.

func (*WavefrontReconciler) Reconcile

func (r *WavefrontReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile runs one full evaluation of the fleet and executes the admissions it derives.

There is no finalizer by design: deleting a Wavefront releases the fleet from management and leaves every pin exactly where it stands.

func (*WavefrontReconciler) SetupWithManager

func (r *WavefrontReconciler) SetupWithManager(mgr ctrl.Manager, pollEvents <-chan event.GenericEvent) error

SetupWithManager wires the controller into the manager. The Flux watches carry no GenerationChangedPredicate: gates are reachable through unlabelled objects and it is precisely their *status* changes that unblock a wavefront.

Jump to

Keyboard shortcuts

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