Merge pull request #8613 from tariq1890/if-optimise

optimise if condition in service ready logic
This commit is contained in:
Matthew Fisher 2020-08-20 14:42:45 -07:00 committed by GitHub
commit 0941e3e345
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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