Provide a way to check the resourceVersion of a specific informer in multiNamespaceInformer

Aperta
#3,607 2 commenti 1 reazione 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@sbueringer ci sta già lavorando.

Dal 12/10/2026.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
go

Direzione di ricerca

Start by tracing GetInformerForKind and GetInformer through multiNamespaceInformer, then compare its behavior with SharedIndexInformer and getStore().LastStoreSyncResourceVersion(). Define a public way to retrieve the resourceVersion for the relevant underlying namespace store, and verify it against the Cluster API use case without relying on reflection.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

For a regular informer it's possible to check the RV in the following way:

  • GetInformerForKind / GetInformer returns an Informer
  • type cast the informer to SharedIndexInformer
  • call getStore().LastStoreSyncResourceVersion())

With a multiNamespaceCache it's not possible

  • GetInformerForKind / GetInformer returns an Informer (implemented by multiNamespaceInformer)
  • multiNamespaceInformer is neither a SharedIndexInformer nor has it any other way to retrieve the last resourceVersion from the right underlying store

I've hit this issue in Cluster API and for now the only possible workaround that I've found was to use reflection. xref: https://github.com/kubernetes-sigs/cluster-api/pull/14283

We'll probably look into this when we make the ReadYourWritesConsistency (https://github.com/kubernetes-sigs/controller-runtime/issues/3320) feature work with multiNamespaceCache/multiNamespaceInformer

Lingua principale
Go
Stelle
3k
Fork
1.3k
Merge medio
1g 7h
PR unite (30g)
48

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di kubernetes-sigs/controller-runtime

Tutte le issue di kubernetes-sigs/controller-runtime

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.