additionalMetadata changes never reach the PDB or the Services
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 25/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- go, kubernetes
- Ambito
- infrastructure
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Go
- Stelle
- 154
- Fork
- 31
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di cozystack/etcd-operator
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
cozystack/etcd-operator#385 ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
cozystack/etcd-operator#383 ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
cozystack/etcd-operator#381 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
cozystack/etcd-operator#374 · 1 commento ·
-
Adoption deletes the legacy cluster-state ConfigMap but leaves Pods referencing it, and neither self-heal path detects the resultForse già presa @androndo l’ha presa 46 giorni fa. Apertabug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
cozystack/etcd-operator#373 ·
Tutte le issue di cozystack/etcd-operator
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Correct local module testing instructions for Go sample contributorsForse già presa @slievrly l’ha presa oggi. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
-
internal/core: cleanAttachmentName splits a rune at the 255-byte cap and stores invalid UTF-8Forse già presa @pacwestnobody l’ha presa oggi. Apertago good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
Podiom/Podiom#427 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
TestLaunchGolden spends about 98 seconds on fake-agent exit delays under -raceForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
factory:subtask
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
I maintainer di solito rispondono entro 1 giorno