From 41c63d03cbb83ceffde3c87903069131cca660d9 Mon Sep 17 00:00:00 2001 From: Alvaro Aleman Date: Tue, 25 Jun 2024 21:55:42 -0400 Subject: [PATCH] :book: Document that indexes can be added after Informer was started The comment is outdated, support for it was added in Kube 1.30, ref https://github.com/kubernetes/kubernetes/pull/117046 --- pkg/cache/cache.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/cache/cache.go b/pkg/cache/cache.go index 612dcca8b3..706f9c6cdd 100644 --- a/pkg/cache/cache.go +++ b/pkg/cache/cache.go @@ -117,8 +117,8 @@ type Informer interface { // This function is guaranteed to be idempotent and thread-safe. RemoveEventHandler(handle toolscache.ResourceEventHandlerRegistration) error - // AddIndexers adds indexers to this store. If this is called after there is already data - // in the store, the results are undefined. + // AddIndexers adds indexers to this store. It is valid to add indexers + // after an informer was started. AddIndexers(indexers toolscache.Indexers) error // HasSynced return true if the informers underlying store has synced.