Basically title, if this option is set the cache may not be in sync, resulting in empty LIST results for example.
The problem is that the check if its synced happens in ic.GetInformers but we never call that if this option is set:
|
if ic.readerFailOnMissingInformer { |
|
cache, started, ok := ic.Informers.Peek(gvk, obj) |
|
if !ok { |
|
return false, nil, &ErrResourceNotCached{GVK: gvk} |
|
} |
|
return started, cache, nil |
|
} |
The started boolean we check on only checks if the cache was started, but not if it was actually synced.
Basically title, if this option is set the cache may not be in sync, resulting in empty LIST results for example.
The problem is that the check if its synced happens in
ic.GetInformersbut we never call that if this option is set:controller-runtime/pkg/cache/informer_cache.go
Lines 182 to 188 in aebc15d
The
startedboolean we check on only checks if the cache was started, but not if it was actually synced.