When in IndexField to return keys or not #2915
-
I was searching on explanation on how to index fields using the cache since I had an issue where I create an object, in the next reconcile loop was not finding it and I was thinking that cache could be the reason. In the book there is one main reference to that here :
But I was wondering why if the ConfigMap is empty nothing is returned, what is the difference between doing that and simply always returning |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
HI @antonincms, If you still needing helping with this one, could you please clarifies your question:
|
Beta Was this translation helpful? Give feedback.
-
I am closing this one as answered |
Beta Was this translation helpful? Give feedback.
Hi @antonincms,
The purpose of indexing in the cache is to allow quick lookups based on certain fields' values. An indexed field will have a mapping from values of that field to the objects that have those values.
Considering your two scenarios:
Returning nil when ConfigMap is empty: