mirror of
https://github.com/fluxcd/flagger.git
synced 2026-04-15 06:57:34 +00:00
controller: wait for canary deployment to be ready before removing finalizers
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 <jaiswalsanskar078@gmail.com>
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user