Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ListOwnedBy ¶ added in v0.22.0
func ListOwnedBy(ctx context.Context, client ctrlclient.Client, list ctrlclient.ObjectList, nn types.NamespacedName, ownerType metav1.TypeMeta) error
List all the objects owned by the given object type.
This allows us to use owner-based indexing in tests without incurring the overhead of caching.
See discussion here: https://github.com/tilt-dev/tilt/issues/4719
Types ¶
type Indexer ¶
type Indexer struct {
// contains filtered or unexported fields
}
Helper struct to help reconcilers determine when to start their objects when a dependency triggers.
func (*Indexer) AddKeyFunc ¶ added in v0.23.0
AddKeyFunc registers a new indexer function.
In practice, all KeyFunc indexer functions should be added before or during controller initialization to avoid missed updates.
func (*Indexer) Enqueue ¶
Given an update of a watched object, return the names of objects watching it that we need to reconcile.
func (*Indexer) EnqueueKey ¶
Enqueue() when we don't have the full object, only the name and kind.
func (*Indexer) OnReconcile ¶
func (m *Indexer) OnReconcile(name types.NamespacedName, obj client.Object)
Register the watched object for the given primary object.
type Key ¶
type Key struct { Name types.NamespacedName GVK schema.GroupVersionKind }
A key to help index objects we watch.
type Requeuer ¶ added in v0.23.5
type Requeuer struct {
// contains filtered or unexported fields
}
Small helper class for triggering a Reconcile() from a goroutine.
func NewRequeuer ¶ added in v0.23.5
func NewRequeuer() *Requeuer
func (*Requeuer) Add ¶ added in v0.23.5
func (s *Requeuer) Add(nn types.NamespacedName)