Support namespace caches for authorized local Secrets

オープン
#195 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
go
領域
api, backend

調査の方向性

Read the local manager setup in cmd/api-syncagent/main.go and the local and related-resource clients in internal/controller/sync/controller.go. Start by tracing how Secret informers are created and how namespace permissions are managed; the issue also points to Issue 113 for namespace deletion context. Done means namespace-scoped Secret caches cover primary and related Secret operations, include the state namespace, keep cluster-scoped resources separate, and handle startup, shutdown, and an empty namespace set safely.

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

説明

Feature Description

The local manager has no namespace limit for its cache.
A Secret informer therefore needs cluster-wide list and watch permissions.
Namespace RoleBindings cannot grant those operations across all namespaces.
An event predicate filters objects after the API request. It cannot narrow the request scope.

To reproduce
  1. Configure a published resource with a local Secret or a related Secret.
  2. Grant Secret access only in sample-space and the agent state namespace.
  3. Start the agent with its required permissions for other resource types.
  4. Observe the Secret informer request scope.
Actual behavior

The informer requests Secrets across all namespaces. Namespace RoleBindings cannot authorize the request.

Expected behavior

An explicit namespace set limits the Secret informer to authorized namespaces.

Proposed Solution

Support namespace caches for local Secrets.
Keep cluster-scoped resources separate. Include the fixed state namespace.
Create each namespace permission before its informer starts.
Define how the informer stops before namespace permissions disappear.
An empty namespace set must not create an all-namespace informer.
Cover primary and related Secret reads, writes, patches, and deletion.

Alternative Solutions

Cluster-wide Secret permissions permit the current cache. They exceed the required namespace access.
The agent namespace flag controls its own namespace. It does not define the tenant namespace set.

Want to contribute?

No implementation commitment accompanies this request.

Additional Context

Source check: 2026-10-30, default branch main, commit 7d8db2c9ce67562bcb23968ea651fd4f2fa52a01.

Local manager setup.
Local manager client.
Related-resource local client.

Issue 113 concerns namespace deletion after unbind.
It does not add namespace caches. No current live test or patch accompanies this request.

主要言語
Go
スター
25
フォーク
32
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

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

kcp-dev/api-syncagent のほかの issue

kcp-dev/api-syncagent の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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