Skip to content

Commit 98f8dee

Browse files
committed
Fix condition check
1 parent 5fb3906 commit 98f8dee

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

pkg/deployment/reconcile/plan_builder_gateway.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,16 +91,12 @@ func (r *Reconciler) createGatewayConfigConditionPlan(ctx context.Context, _ k8s
9191

9292
if cok {
9393
if c, ok := status.Conditions.Get(api.ConditionTypeGatewayConfig); !ok || c.Status == core.ConditionFalse || c.Hash != checksum {
94-
if c, ok := status.Conditions.Get(api.ConditionTypeGatewayConfig); !ok || c.Status == core.ConditionTrue || c.Hash != "" {
95-
plan = append(plan, sharedReconcile.UpdateConditionActionV2("Gateway Config UpToDate", api.ConditionTypeGatewayConfig, true, "Gateway Config Propagated", "Gateway Config Propagated", checksum))
96-
}
94+
plan = append(plan, sharedReconcile.UpdateConditionActionV2("Gateway Config UpToDate", api.ConditionTypeGatewayConfig, true, "Gateway Config Propagated", "Gateway Config Propagated", checksum))
9795
return plan
9896
}
9997
} else {
10098
if c, ok := status.Conditions.Get(api.ConditionTypeGatewayConfig); !ok || c.Status == core.ConditionTrue || c.Hash != checksum {
101-
if c, ok := status.Conditions.Get(api.ConditionTypeGatewayConfig); !ok || c.Status == core.ConditionTrue || c.Hash != "" {
102-
plan = append(plan, sharedReconcile.UpdateConditionActionV2("Gateway Config Not UpToDate", api.ConditionTypeGatewayConfig, false, "Gateway Config Not Propagated", "Gateway Config Not Propagated", checksum))
103-
}
99+
plan = append(plan, sharedReconcile.UpdateConditionActionV2("Gateway Config Not UpToDate", api.ConditionTypeGatewayConfig, false, "Gateway Config Not Propagated", "Gateway Config Not Propagated", checksum))
104100
return plan
105101
}
106102
}

0 commit comments

Comments
 (0)