Skip to content

Commit 61f5865

Browse files
Return IP address for zero replicas (#521)
1 parent d90da6d commit 61f5865

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

controllers/yawol-cloud-controller/controlcontroller/loadbalancer_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ func (r *LoadBalancerReconciler) Reconcile(ctx context.Context, req ctrl.Request
5151
}
5252

5353
// update externalIP in service if lb has ready replicas
54-
if lb.Status.ExternalIP != nil && lb.Status.ReadyReplicas != nil && *lb.Status.ReadyReplicas > 0 {
54+
if lb.Status.ExternalIP != nil && (lb.Spec.Replicas == 0 || lb.Status.ReadyReplicas != nil && *lb.Status.ReadyReplicas > 0) {
5555
loadBalancerStatus := v1.LoadBalancerStatus{
5656
Ingress: []v1.LoadBalancerIngress{
5757
{

0 commit comments

Comments
 (0)