Skip to content

Commit

Permalink
controller: wait for canary deployment to be ready before removing fi…
Browse files Browse the repository at this point in the history
…nalizers

Fix the waiting logic to actually wait for the canary deployment to be
ready before continuing with the rest of the finalization logic.
Previously, the canary deployment was not being checked for a ready
status due to the the absence of the `Steps` field in the specified
backoff.

Signed-off-by: Sanskar Jaiswal <[email protected]>
  • Loading branch information
aryan9600 committed Nov 17, 2023
1 parent 8c078e8 commit 63ec848
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/controller/finalizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,10 @@ func (c *Controller) finalize(old interface{}) error {
// Ensure that targetRef has met a ready state
c.logger.Infof("Checking if canary is ready %s.%s", canary.Name, canary.Namespace)
backoff := wait.Backoff{
Duration: time.Second,
Duration: time.Second * 3,
Factor: 2,
Cap: canary.GetAnalysisInterval(),
Steps: 4,
}
retry.OnError(backoff, func(err error) bool {
return err.Error() == "retriable error"
Expand Down

0 comments on commit 63ec848

Please sign in to comment.