controller

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplicationReconciler

type ApplicationReconciler struct {
	client.Client
	Scheme   *runtime.Scheme
	Version  string
	Recorder events.EventRecorder
}

ApplicationReconciler reconciles an Application object. It ensures that the underlying Deployment, optional Service, and optional PersistentVolumeClaim match the desired state defined in the Application CR.

The controller is intentionally kept thin: it orchestrates the reconciliation flow, while the actual resource synchronization logic resides in internal/application/.

func (*ApplicationReconciler) Reconcile

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

Reconcile is the main loop for the controller. It implements level-triggered reconciliation: Fetch -> Sync Resources -> Status Update.

Deletion is handled entirely by Kubernetes garbage collection: all child resources are created with OwnerReferences pointing to the Application, so they are automatically cascade-deleted when the Application is removed. No finalizer is needed.

func (*ApplicationReconciler) SetupWithManager

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

SetupWithManager registers the controller with the Manager and defines watches.

Jump to

Keyboard shortcuts

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