additionalMetadata changes never reach the PDB or the Services
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 25/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- Calme
- Stack technique
- go, kubernetes
- Domaine
- infrastructure
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- Go
- Étoiles
- 154
- Forks
- 31
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Préparer son environnement
- Fournit un Dockerfile ou un fichier Docker Compose
- Aucun modèle de pull request
- Aucun guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de cozystack/etcd-operator
-
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
cozystack/etcd-operator#385 ·
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 35/100
cozystack/etcd-operator#383 ·
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 15/100
cozystack/etcd-operator#381 ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
cozystack/etcd-operator#374 · 1 commentaire ·
-
Adoption deletes the legacy cluster-state ConfigMap but leaves Pods referencing it, and neither self-heal path detects the resultPeut-être pris @androndo l’a pris il y a 46 jours. Ouvertebug
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
cozystack/etcd-operator#373 ·
Toutes les issues de cozystack/etcd-operator
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
-
Correct local module testing instructions for Go sample contributorsPeut-être pris @slievrly l’a pris aujourd’hui. Ouverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 90/100
-
internal/core: cleanAttachmentName splits a rune at the 255-byte cap and stores invalid UTF-8Peut-être pris @pacwestnobody l’a pris aujourd’hui. Ouvertego good first issue help wanted
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
Podiom/Podiom#427 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
TestLaunchGolden spends about 98 seconds on fake-agent exit delays under -racePeut-être pris Une pull request liée à cette issue est ouverte ou déjà fusionnée. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
Les mainteneurs répondent en général sous 1 jour
-
factory:subtask
Difficulté 1/5 Moins d'une heure Accessibilité débutants 95/100
Les mainteneurs répondent en général sous 1 jour