exclude unready endpoints from endpointslices (#4580)

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
This commit is contained in:
Chris O'Haver 2021-04-27 12:29:32 -04:00 committed by GitHub
parent 236c6cee68
commit ef53f372ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -127,6 +127,9 @@ func EndpointSliceToEndpoints(obj meta.Object) (meta.Object, error) {
}
for _, end := range ends.Endpoints {
if end.Conditions.Ready == nil || !*end.Conditions.Ready {
continue
}
for _, a := range end.Addresses {
ea := EndpointAddress{IP: a}
if end.Hostname != nil {