Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SimpleAppReconciler ¶
type SimpleAppReconciler struct {
client.Client
Scheme *runtime.Scheme
Version string
Recorder events.EventRecorder
}
SimpleAppReconciler reconciles a SimpleApp object. It ensures that the underlying Deployment, optional Service, and optional PersistentVolumeClaim match the desired state defined in the SimpleApp CR.
The controller is intentionally kept thin: it orchestrates the reconciliation flow, while the actual resource synchronization logic resides in internal/simpleapp/.
func (*SimpleAppReconciler) Reconcile ¶
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 SimpleApp, so they are automatically cascade-deleted when the SimpleApp is removed. No finalizer is needed.
func (*SimpleAppReconciler) SetupWithManager ¶
func (r *SimpleAppReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager registers the controller with the Manager and defines watches.