mirror of
https://github.com/kubernetes/kubernetes.git
synced 2026-07-08 09:21:31 -04:00
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> |
||
|---|---|---|
| .. | ||
| config | ||
| doc.go | ||
| endpoints_controller.go | ||
| endpoints_controller_test.go | ||
| endpoints_tracker.go | ||
| endpoints_tracker_test.go | ||
| OWNERS | ||