Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArtifactReconciler ¶ added in v0.8.1
type ArtifactReconciler struct {
client.Client
Scheme *runtime.Scheme
Version string
KitImage string
Recorder events.EventRecorder
}
ArtifactReconciler reconciles an Artifact object. It ensures that the underlying PVC and Job resources match the desired state defined in the Artifact CR.
The controller is intentionally kept thin: it orchestrates the reconciliation flow, while the actual resource construction and status derivation logic reside in internal/artifact/.
func (*ArtifactReconciler) Reconcile ¶ added in v0.8.1
Reconcile is the main loop for the controller. It implements level-triggered reconciliation: Fetch -> Reconcile Resources -> Status Update.
Deletion is handled entirely by Kubernetes garbage collection: all child resources are created with OwnerReferences pointing to the Artifact, so they are automatically cascade-deleted when the Artifact is removed. No finalizer is needed.
func (*ArtifactReconciler) SetupWithManager ¶ added in v0.8.1
func (r *ArtifactReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager registers the controller with the Manager and defines watches.
Watch configuration:
- Artifact: with GenerationChangedPredicate to skip status-only updates
- Owned Jobs: status changes automatically trigger re-reconciliation via OwnerReference mapping