Skip to content

Commit

Permalink
Merge pull request #225 from Fish-pro/fix-svc-status
Browse files Browse the repository at this point in the history
fix: the service status of the loadbalancer type is incorrectly calculated
  • Loading branch information
k8s-ci-robot authored Jul 23, 2022
2 parents c8e2959 + 21dfd2a commit 8ce143e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controllers/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ func serviceStatus(u *unstructured.Unstructured) (string, error) {
stype := service.Spec.Type

if stype == corev1.ServiceTypeClusterIP || stype == corev1.ServiceTypeNodePort || stype == corev1.ServiceTypeExternalName ||
stype == corev1.ServiceTypeLoadBalancer && isEmpty(service.Spec.ClusterIP) &&
stype == corev1.ServiceTypeLoadBalancer && !isEmpty(service.Spec.ClusterIP) &&
len(service.Status.LoadBalancer.Ingress) > 0 && !hasEmptyIngressIP(service.Status.LoadBalancer.Ingress) {
return StatusReady, nil
}
Expand Down

0 comments on commit 8ce143e

Please sign in to comment.