controller: Don't panic when ready condition in a endpointslice is missing (#9550)

This commit is contained in:
Toon Schoenmakers 2023-02-17 22:48:10 +01:00 committed by GitHub
parent fc95994736
commit e98fc3b3ea

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