optimise if condition in service ready logic

Signed-off-by: Tariq Ibrahim <tariq181290@gmail.com>
This commit is contained in:
Tariq Ibrahim 2020-08-18 21:58:21 -07:00
parent d6708667da
commit b07b2589fb
No known key found for this signature in database
GPG key ID: DFC94E4A008B908A

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
}