Skip to content

Commit

Permalink
block reconcile
Browse files Browse the repository at this point in the history
Signed-off-by: Zach Aller <zachaller@users.noreply.github.com>
  • Loading branch information
zachaller committed Jun 12, 2024
1 parent a6f3e92 commit ea31043
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions rollout/trafficrouting.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,12 @@ func (c *rolloutContext) reconcileTrafficRouting() error {
c.recorder.Warnf(c.rollout, record.EventOptions{EventReason: conditions.WeightVerifyErrorReason}, conditions.WeightVerifyErrorMessage, err)
return nil // return nil instead of error since we want to continue with normal reconciliation
}
// At the end of the rollout we need to verify the weight is correct, and return an error if not because we don't want the rest of the
// reconcile process to continue. We don't need to do this if we are in the middle of the rollout because the rest of the reconcile
// process won't scale down the old replicasets yet due to being in the middle of some steps.
if weightVerified != nil && *weightVerified == false && desiredWeight == weightutil.MaxTrafficWeight(c.rollout) && len(c.rollout.Spec.Strategy.Canary.Steps) >= int(*c.rollout.Status.CurrentStepIndex) {
return fmt.Errorf("end of rollout, desired weight %d not yet verified", desiredWeight)

Check warning on line 281 in rollout/trafficrouting.go

View check run for this annotation

Codecov / codecov/patch

rollout/trafficrouting.go#L281

Added line #L281 was not covered by tests
}

var indexString string
if index != nil {
Expand Down

0 comments on commit ea31043

Please sign in to comment.