mirror of
https://github.com/coredns/coredns.git
synced 2025-10-28 08:44:17 -04:00
exclude unready endpoints from endpointslices (#4580)
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
This commit is contained in:
@@ -127,6 +127,9 @@ func EndpointSliceToEndpoints(obj meta.Object) (meta.Object, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for _, end := range ends.Endpoints {
|
for _, end := range ends.Endpoints {
|
||||||
|
if end.Conditions.Ready == nil || !*end.Conditions.Ready {
|
||||||
|
continue
|
||||||
|
}
|
||||||
for _, a := range end.Addresses {
|
for _, a := range end.Addresses {
|
||||||
ea := EndpointAddress{IP: a}
|
ea := EndpointAddress{IP: a}
|
||||||
if end.Hostname != nil {
|
if end.Hostname != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user