mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-10-25 18:09:10 +00:00
Automatic merge from submit-queue (batch tested with PRs 49869, 47987, 50211, 50804, 50583) Make endpoints controller update based on semantic equality Fixes #50828 Split from https://github.com/kubernetes/kubernetes/pull/45294 for separate review Currently, endpoints objects containing no subsets are decoded by the go client as subsets:[] (when requested individually) or as subsets:null (when requested in a list of endpoints). Because the endpoints controller is fed via a lister/watcher, it gets the `subsets:null` version fed to it. The subsets computation then returns an empty slice, which fails reflect.DeepEqual, which triggers a write attempt. This PR makes the comparison use semantic.DeepEqual to avoid spurious writes. https://github.com/kubernetes/kubernetes/pull/45294 would remove the inconsistency between lists and individual gets.