-
Notifications
You must be signed in to change notification settings - Fork 43.1k
kube-proxy only looks at Addresses[0] in EndpointSlice #106267
Copy link
Copy link
Closed
Labels
kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.needs-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.Indicates an issue or PR lacks a `triage/foo` label and requires one.priority/important-longtermImportant over the long term, but may not be staffed and/or may need multiple releases to complete.Important over the long term, but may not be staffed and/or may need multiple releases to complete.sig/networkCategorizes an issue or PR as relevant to SIG Network.Categorizes an issue or PR as relevant to SIG Network.
Metadata
Metadata
Labels
kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.needs-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.Indicates an issue or PR lacks a `triage/foo` label and requires one.priority/important-longtermImportant over the long term, but may not be staffed and/or may need multiple releases to complete.Important over the long term, but may not be staffed and/or may need multiple releases to complete.sig/networkCategorizes an issue or PR as relevant to SIG Network.Categorizes an issue or PR as relevant to SIG Network.
What happened?
An
EndpointSlicecan contain up to 1000Endpoints, which can each contain up to 100Addresses. Or at least, that's what the docs say, but actually, kube-proxy (or more specifically,pkg/proxy/endpointslicecache.go) only looks at the first Address in each Endpoint:(This is compatible with how
EndpointSliceControllerworks, since it would only generate multi-Address Endpoints if a pod had multiplePodIPsof the same address family, which is not allowed. But it's not compatible with manually-generated EndpointSlices.)What did you expect to happen?
Either all
Addressesare used, or else the docs state that onlyAddresses[0]is used and the field is an array solely for historical reasons.