Skip to content

Commit

Permalink
Merge pull request #1470 from ta924/main
Browse files Browse the repository at this point in the history
Avoid running traffic increase hooks when waiting for promotion or promoting
  • Loading branch information
stefanprodan committed Aug 14, 2023
2 parents 45038cb + ca6867a commit 2944581
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/controller/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,10 @@ func (c *Controller) advanceCanary(name string, namespace string) {
// strategy: Canary progressive traffic increase
if c.nextStepWeight(cd, canaryWeight) > 0 {
// run hook only if traffic is not mirrored
if !mirrored {
if !mirrored &&
(cd.Status.Phase != flaggerv1.CanaryPhasePromoting &&
cd.Status.Phase != flaggerv1.CanaryPhaseWaitingPromotion &&
cd.Status.Phase != flaggerv1.CanaryPhaseFinalising) {
if promote := c.runConfirmTrafficIncreaseHooks(cd); !promote {
return
}
Expand Down

0 comments on commit 2944581

Please sign in to comment.