operator

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2026 License: Apache-2.0 Imports: 36 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package operator reconciles CDCPipeline CRs into a coordinator StatefulSet: one coordinator per pipeline, owning the workers it creates. The operator stops reconciling once status.terminated is set — the job stays dead until a human clears it. Deletion always takes precedence over termination so a finished pipeline can be removed.

Package operator is the Kubernetes operator: it reconciles CDCPipeline CRs into the coordinator workload (its StatefulSet, Service, ConfigMap and RBAC) and validates spec mutations at admission.

Naming: the reconciler type is CoordinatorReconciler for the workload it manages — the coordinator — not for itself. The reconciler IS the operator.

Index

Constants

View Source
const DefaultFieldManager = "urutau-operator"

DefaultFieldManager is the Server-Side Apply field owner used when a CoordinatorReconciler does not set FieldManager. A deployment can override it (e.g. to run two controllers that manage the same objects).

Variables

This section is empty.

Functions

This section is empty.

Types

type CoordinatorReconciler

type CoordinatorReconciler struct {
	client.Client
	Image    string
	Recorder record.EventRecorder
	// FieldManager is the Server-Side Apply field owner for the objects this
	// controller applies. Empty means DefaultFieldManager. Set it when another
	// controller also manages these objects, so their field ownership does not
	// collide.
	FieldManager string
	// KEDAPrometheusAddress is the Prometheus server the KEDA ScaledObjects
	// query for the coordinator's per-table backlog gauge. Empty disables KEDA
	// autoscaling entirely: no ScaledObject is rendered, and worker replicas
	// stay at spec.workers.number (issue #298).
	KEDAPrometheusAddress string
	// KEDAThreshold is the per-replica backlog target (outstanding batches)
	// handed to the ScaledObject trigger. Empty means defaultKEDAThreshold.
	KEDAThreshold string
}

CoordinatorReconciler is the OPERATOR's reconciler for the CDCPipeline CR: the process that owns and applies the coordinator workload. The name describes WHAT it manages — the coordinator StatefulSet/Service/ConfigMap it creates, updates and deletes — not what it is. Every coordinator* helper (coordinatorName, coordinatorStatefulSet, …) follows the same convention: they name the object the operator provisions.

func (*CoordinatorReconciler) Reconcile

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

Reconcile reconciles a CDCPipeline: it ensures the coordinator workload reflects the spec, respects the terminal state, and cleans up on delete.

func (*CoordinatorReconciler) SetupWebhookWithManager

func (r *CoordinatorReconciler) SetupWebhookWithManager(mgr ctrl.Manager) error

SetupWebhookWithManager registers the validating webhook.

func (*CoordinatorReconciler) SetupWithManager

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

SetupWithManager wires the reconciler into the manager.

Jump to

Keyboard shortcuts

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