Skip to content

Commit 2e53900

Browse files
authored
Merge pull request #909 from FelipeYepez/l4-mixed-protocol-condition-fix
Populate lastTransitionTime for LoadBalancerPortsError
2 parents b8b819d + 9a48408 commit 2e53900

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

providers/gce/gce_loadbalancer.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ func (g *Cloud) EnsureLoadBalancer(ctx context.Context, clusterName string, svc
159159
WithType(v1.LoadBalancerPortsError).
160160
WithStatus(metav1.ConditionTrue).
161161
WithReason(v1.LoadBalancerPortsErrorReason).
162+
WithLastTransitionTime(metav1.Now()).
162163
WithMessage("LoadBalancer with multiple protocols are not supported"))
163164
svcApply := corev1apply.Service(svc.Name, svc.Namespace).WithStatus(svcApplyStatus)
164165
if _, errApply := g.client.CoreV1().Services(svc.Namespace).ApplyStatus(ctx, svcApply, metav1.ApplyOptions{FieldManager: "gce-cloud-controller", Force: true}); errApply != nil {
@@ -239,6 +240,7 @@ func (g *Cloud) UpdateLoadBalancer(ctx context.Context, clusterName string, svc
239240
WithType(v1.LoadBalancerPortsError).
240241
WithStatus(metav1.ConditionTrue).
241242
WithReason(v1.LoadBalancerPortsErrorReason).
243+
WithLastTransitionTime(metav1.Now()).
242244
WithMessage("LoadBalancer with multiple protocols are not supported"))
243245
svcApply := corev1apply.Service(svc.Name, svc.Namespace).WithStatus(svcApplyStatus)
244246
if _, errApply := g.client.CoreV1().Services(svc.Namespace).ApplyStatus(ctx, svcApply, metav1.ApplyOptions{FieldManager: "gce-cloud-controller", Force: true}); errApply != nil {

0 commit comments

Comments
 (0)