File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ import (
43
43
)
44
44
45
45
var (
46
- defaultSyncPeriod = 10 * time .Hour
46
+ defaultSyncPeriod = 10 * time .Hour
47
47
)
48
48
49
49
// InformerGetOptions defines the behavior of how informers are retrieved.
@@ -172,6 +172,17 @@ type Options struct {
172
172
// is "done" with an object, and would otherwise not requeue it, i.e., we
173
173
// recommend the `Reconcile` function return `reconcile.Result{RequeueAfter: t}`,
174
174
// instead of `reconcile.Result{}`.
175
+ //
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.
175
186
SyncPeriod * time.Duration
176
187
177
188
// ReaderFailOnMissingInformer configures the cache to return a ErrResourceNotCached error when a user
You can’t perform that action at this time.
0 commit comments