Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProjectionReconciler ¶
type ProjectionReconciler struct {
client.Client
Scheme *runtime.Scheme
DynamicClient dynamic.Interface
RESTMapper apimeta.RESTMapper
Recorder record.EventRecorder
// Controller is the underlying controller.Controller we built in
// SetupWithManager. We need it so Reconcile can register new source
// watches lazily as previously-unseen source GVKs show up. It is nil
// in unit tests that call Reconcile directly without SetupWithManager.
Controller controller.Controller
// Cache is the manager's cache, used as the source for dynamic watches.
// Also nil in direct-reconcile unit tests.
Cache cache.Cache
// contains filtered or unexported fields
}
ProjectionReconciler reconciles a Projection object.
func (*ProjectionReconciler) SetupWithManager ¶
func (r *ProjectionReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
Two things happen here that Reconcile relies on:
- A field indexer on Projection.spec indexes each CR by the canonical sourceKey of its source ref, so mapSource can list all projections referencing a changed source via a single cached List.
- We use .Build(r) (not .Complete(r)) to capture the controller.Controller so Reconcile can lazily register new source watches as previously-unseen GVKs appear. No up-front source watches — Reconcile adds them on demand.
Click to show internal directories.
Click to hide internal directories.