From f3b444ab4939eaceec8404f168e3875ad380d5dc Mon Sep 17 00:00:00 2001 From: stefanprodan Date: Fri, 15 May 2020 15:45:32 +0300 Subject: [PATCH] Add promotion step weight to Canary CRD --- artifacts/flagger/crd.yaml | 5 ++++- charts/flagger/crds/crd.yaml | 5 ++++- kustomize/base/flagger/crd.yaml | 5 ++++- pkg/apis/flagger/v1beta1/canary.go | 6 +++++- 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/artifacts/flagger/crd.yaml b/artifacts/flagger/crd.yaml index 68cabd96..d17a3589 100644 --- a/artifacts/flagger/crd.yaml +++ b/artifacts/flagger/crd.yaml @@ -562,7 +562,10 @@ spec: description: Max traffic percentage routed to canary type: number stepWeight: - description: Incremental traffic percentage step + description: Incremental traffic percentage step for the analysis phase + type: number + stepWeightPromotion: + description: Incremental traffic percentage step for the promotion phase type: number mirror: description: Mirror traffic to canary diff --git a/charts/flagger/crds/crd.yaml b/charts/flagger/crds/crd.yaml index 68cabd96..d17a3589 100644 --- a/charts/flagger/crds/crd.yaml +++ b/charts/flagger/crds/crd.yaml @@ -562,7 +562,10 @@ spec: description: Max traffic percentage routed to canary type: number stepWeight: - description: Incremental traffic percentage step + description: Incremental traffic percentage step for the analysis phase + type: number + stepWeightPromotion: + description: Incremental traffic percentage step for the promotion phase type: number mirror: description: Mirror traffic to canary diff --git a/kustomize/base/flagger/crd.yaml b/kustomize/base/flagger/crd.yaml index 68cabd96..d17a3589 100644 --- a/kustomize/base/flagger/crd.yaml +++ b/kustomize/base/flagger/crd.yaml @@ -562,7 +562,10 @@ spec: description: Max traffic percentage routed to canary type: number stepWeight: - description: Incremental traffic percentage step + description: Incremental traffic percentage step for the analysis phase + type: number + stepWeightPromotion: + description: Incremental traffic percentage step for the promotion phase type: number mirror: description: Mirror traffic to canary diff --git a/pkg/apis/flagger/v1beta1/canary.go b/pkg/apis/flagger/v1beta1/canary.go index 6106d143..3451e796 100644 --- a/pkg/apis/flagger/v1beta1/canary.go +++ b/pkg/apis/flagger/v1beta1/canary.go @@ -203,10 +203,14 @@ type CanaryAnalysis struct { // +optional MaxWeight int `json:"maxWeight,omitempty"` - // Incremental traffic percentage step + // Incremental traffic percentage step for analysis phase // +optional StepWeight int `json:"stepWeight,omitempty"` + // Incremental traffic percentage step for promotion phase + // +optional + StepWeightPromotion int `json:"stepWeightPromotion,omitempty"` + // Max number of failed checks before the canary is terminated Threshold int `json:"threshold"`