controller: Don't panic when ready condition in a endpointslice is missing

This commit is contained in:
Toon Schoenmakers 2023-01-28 23:04:55 +01:00
parent 5628f765fe
commit 0dab706f93

View file

@ -128,7 +128,7 @@ func getEndpointsFromSlices(s *corev1.Service, port *corev1.ServicePort, proto c
}
for _, ep := range eps.Endpoints {
if !(*ep.Conditions.Ready) {
if (ep.Conditions.Ready != nil) && !(*ep.Conditions.Ready) {
continue
}
epHasZone := false