fix trafficIncrease calls when using confirmPromotion

Signed-off-by: ta924@yahoo.com <ta924@yahoo.com>
This commit is contained in:
ta924@yahoo.com
2023-08-03 11:16:25 -05:00
parent eee3607ab7
commit ca6867a6b1
+4 -1
View File
@@ -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
}