kubernetes/pkg/controller/endpoint
Rahul c106d15f1f
fix(endpoint): avoid panic on services with empty IPFamilies
Accessing svc.Spec.IPFamilies[0] without a bounds check panics when a
service reaches the controller with an empty IPFamilies field. This can
happen via watch events: the apiserver's defaultOnRead decorator populates
IPFamilies on GET/LIST but not on watch (cachingObject wrapping bypasses
the type assertion).

Restore the inference logic removed in #130101: fall back to ClusterIP
for headful services and pod IP for headless services.

Signed-off-by: Rahul <rahulbabu95@gmail.com>
2026-05-21 13:36:04 -07:00
..
config remove import doc comments 2024-12-02 16:59:34 +01:00
doc.go remove import doc comments 2024-12-02 16:59:34 +01:00
endpoints_controller.go fix(endpoint): avoid panic on services with empty IPFamilies 2026-05-21 13:36:04 -07:00
endpoints_controller_test.go fix(endpoint): avoid panic on services with empty IPFamilies 2026-05-21 13:36:04 -07:00
endpoints_tracker.go Fix endpoints status out-of-sync when the pod state changes rapidly 2024-07-01 21:56:36 +08:00
endpoints_tracker_test.go Fix endpoints status out-of-sync when the pod state changes rapidly 2024-07-01 21:56:36 +08:00
OWNERS update sig-network reviewers/approvers on controller manager 2022-09-19 10:34:39 +02:00