From 9af6ade54d3bf3fc19370bdc5e5229aac3d2a27b Mon Sep 17 00:00:00 2001 From: stefanprodan Date: Mon, 25 Nov 2019 23:48:22 +0200 Subject: [PATCH] Skip primary check on skip analysis --- pkg/canary/deployment.go | 2 +- pkg/controller/scheduler.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/canary/deployment.go b/pkg/canary/deployment.go index f098dc9d..75341ab4 100644 --- a/pkg/canary/deployment.go +++ b/pkg/canary/deployment.go @@ -40,7 +40,7 @@ func (c *DeploymentController) Initialize(cd *flaggerv1.Canary, skipLivenessChec } if cd.Status.Phase == "" || cd.Status.Phase == flaggerv1.CanaryPhaseInitializing { - if !skipLivenessChecks { + if !skipLivenessChecks && !cd.Spec.SkipAnalysis { _, readyErr := c.IsPrimaryReady(cd) if readyErr != nil { return "", ports, readyErr diff --git a/pkg/controller/scheduler.go b/pkg/controller/scheduler.go index 489d166c..f8b8ae8f 100644 --- a/pkg/controller/scheduler.go +++ b/pkg/controller/scheduler.go @@ -152,7 +152,7 @@ func (c *Controller) advanceCanary(name string, namespace string, skipLivenessCh } // check primary deployment status - if !skipLivenessChecks { + if !skipLivenessChecks && !cd.Spec.SkipAnalysis { if _, err := canaryController.IsPrimaryReady(cd); err != nil { c.recordEventWarningf(cd, "%v", err) return