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 d6bba85351
commit 4aef45c177
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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