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

オープン
#3,607 コメント 2 件 リアクション 1 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@sbueringer がすでに取り組んでいます。

2026年10月12日 から。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
go

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
Go
スター
3k
フォーク
1.3k
平均マージ
1日 7時間
マージ済み PR(30日)
48

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

kubernetes-sigs/controller-runtime のほかの issue

kubernetes-sigs/controller-runtime の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。