additionalMetadata changes never reach the PDB or the Services
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 25/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- go, kubernetes
調査の方向性
Start in controllers/etcdcluster_controller.go: reconcilePDB (around line 1548, with the early return near lines 1574-1580) and ensureService (around line 1851) apply additionalMetadata only in their IsNotFound branches. The README.md line near 26 describes the field's wording. Done means either metadata changes reach the PDB and both Services on update, without overwriting annotations injected by webhooks, or the README wording is corrected. The maintainers have not yet decided which, so confirm the approach in the issue before coding.
索引モデルが issue の本文から書いたものです。
説明
spec.additionalMetadata merges user labels/annotations onto every object the operator creates. For the per-member objects (member Pods, data PVCs, EtcdMember CRs) that happens on each object's creation, so an edit lands naturally as members are replaced. For the cluster-scoped objects it never lands: the PDB and both Services are created once and live for the cluster's whole lifetime, and applyAdditionalMetadata is only called in their IsNotFound branches.
controllers/etcdcluster_controller.go:1548—reconcilePDBapplies the metadata only when creating the PDB. The update path below it comparesminAvailable/maxUnavailableand returns early when they match (controllers/etcdcluster_controller.go:1574-1580), so labels and annotations are never revisited.controllers/etcdcluster_controller.go:1851—ensureServicehas the same shape: metadata on create, and the drift reconcile below it covers spec fields only.
Effect: adding or changing a key under spec.additionalMetadata on a running cluster applies to member Pods as they roll, but never to that cluster's PDB or its <cluster> / <cluster>-client Services. The objects stay inconsistent with each other indefinitely, and the only way to converge them is to delete the object and let the operator recreate it. That is easy to hit with the common case of adding a cost-allocation or ownership label to an existing cluster.
README.md:26 describes the field as "All three apply on object creation and are latched like the rest of the spec", which is literally accurate but reads as "applies to objects created from now on" rather than "never applies to these three objects". Either the behaviour or the wording should change.
Worth settling as part of the fix: whether this metadata should be reconciled on update at all. ensureService already documents that admission webhooks routinely inject annotations onto Services and that the operator deliberately does not fight them, so a blind overwrite of the whole annotation map would be a regression. Merging only the keys that spec.additionalMetadata currently declares, and removing only the ones it previously declared, would preserve that property — which implies tracking the previously-applied key set somewhere.
- 主要言語
- Go
- スター
- 154
- フォーク
- 31
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
cozystack/etcd-operator のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
cozystack/etcd-operator#385 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
cozystack/etcd-operator#383 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
cozystack/etcd-operator#381 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
cozystack/etcd-operator#374 · コメント 1 件 ·
-
Adoption deletes the legacy cluster-state ConfigMap but leaves Pods referencing it, and neither self-heal path detects the result対応中かも @androndo が 46 日前に担当しました。 オープンbug
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
cozystack/etcd-operator#373 ·
cozystack/etcd-operator の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
Correct local module testing instructions for Go sample contributors対応中かも @slievrly が今日担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
-
internal/core: cleanAttachmentName splits a rune at the 255-byte cap and stores invalid UTF-8対応中かも @pacwestnobody が今日担当しました。 オープンgo good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
Podiom/Podiom#427 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
TestLaunchGolden spends about 98 seconds on fake-agent exit delays under -race対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
factory:subtask
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
メンテナーはふだん 1 日以内に返信