Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WorkspaceReconciler ¶
type WorkspaceReconciler struct {
client.Client
Scheme *runtime.Scheme
Version string
Recorder events.EventRecorder
// NewHarborClient defaults to harbor.NewClient when unset; tests substitute a
// fake so reconciliation can run without a Harbor server.
NewHarborClient func(baseURL, username, password string) harbor.Client
}
WorkspaceReconciler reconciles a Workspace object.
The controller is intentionally thin: it orchestrates the reconciliation flow, while the resource synchronization logic lives in internal/workspace/.
func (*WorkspaceReconciler) Reconcile ¶
Reconcile runs the level-triggered flow: Fetch -> Domain Sync -> Status Update.
Member-to-label synchronization is handled by the mutating webhook (WorkspaceCustomDefaulter), so labels are consistent before the object reaches etcd.
Deletion needs no finalizer: every child resource carries an OwnerReference to the Workspace, so Kubernetes garbage collection cascades.
func (*WorkspaceReconciler) SetupWithManager ¶
func (r *WorkspaceReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager registers the controller with the Manager and defines watches.