optimise if condition in service ready logic

Signed-off-by: Tariq Ibrahim <tariq181290@gmail.com>
pull/8227/head
Tariq Ibrahim 5 years ago committed by Vlad Fratila
parent 460eae7648
commit 977a18f3bd

@ -188,8 +188,8 @@ func (w *waiter) serviceReady(s *corev1.Service) bool {
return true return true
} }
// Make sure the service is not explicitly set to "None" before checking the IP // Ensure that the service cluster IP is not empty
if s.Spec.ClusterIP != corev1.ClusterIPNone && s.Spec.ClusterIP == "" { if s.Spec.ClusterIP == "" {
w.log("Service does not have cluster IP address: %s/%s", s.GetNamespace(), s.GetName()) w.log("Service does not have cluster IP address: %s/%s", s.GetNamespace(), s.GetName())
return false return false
} }

Loading…
Cancel
Save