File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -173,16 +173,14 @@ type Options struct {
173173// recommend the `Reconcile` function return `reconcile.Result{RequeueAfter: t}`,
174174// instead of `reconcile.Result{}`.
175175//
176- // SyncPeriod will trigger update events with the old object being equal to the new
177- // object, except when the cache was out of sync.
178- // If you filter update events like this:
179- // Controller.Watch(
180- // &source.Kind{Type: v1.MyCustomKind},
181- // &handler.EnqueueRequestForObject{},
182- // predicate.Or(predicate.GenerationChangedPredicate{},
183- // predicate.LabelChangedPredicate{}))
184- // then the SyncPeriod will not trigger a Reconcile call, because the update event
185- // will be ignored by the predicate.
176+ // SyncPeriod will locally trigger an artificial Update event with the same
177+ // object in both ObjectOld and ObjectNew for everything that is in the
178+ // cache.
179+ //
180+ // Predicates or Handlers that expect ObjectOld and ObjectNew to be different
181+ // (such as GenerationChangedPredicate) will filter out this event, preventing
182+ // it from triggering a reconciliation.
183+ // SyncPeriod does not sync between the local cache and the server.
186184SyncPeriod * time.Duration
187185
188186// ReaderFailOnMissingInformer configures the cache to return a ErrResourceNotCached error when a user
You can’t perform that action at this time.
0 commit comments