additionalMetadata changes never reach the PDB or the Services
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- go, kubernetes
- Lĩnh vực
- infrastructure
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Go
- Star
- 154
- Fork
- 31
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của cozystack/etcd-operator
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
cozystack/etcd-operator#385 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
cozystack/etcd-operator#383 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
cozystack/etcd-operator#381 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
cozystack/etcd-operator#374 · 1 bình luận ·
-
Adoption deletes the legacy cluster-state ConfigMap but leaves Pods referencing it, and neither self-heal path detects the resultCó thể đã có người làm @androndo đã nhận 46 ngày trước. Đang mởbug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
cozystack/etcd-operator#373 ·
Tất cả issue của cozystack/etcd-operator
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Correct local module testing instructions for Go sample contributorsCó thể đã có người làm @slievrly đã nhận hôm nay. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
-
internal/core: cleanAttachmentName splits a rune at the 255-byte cap and stores invalid UTF-8Có thể đã có người làm @pacwestnobody đã nhận hôm nay. Đang mởgo good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Podiom/Podiom#427 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
TestLaunchGolden spends about 98 seconds on fake-agent exit delays under -raceCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
factory:subtask
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100
Maintainer thường phản hồi trong vòng 1 ngày