From 43662582b823d6e87b5643b869563af1d138d2d2 Mon Sep 17 00:00:00 2001 From: stefanprodan Date: Fri, 28 Feb 2020 11:30:06 +0200 Subject: [PATCH] Replace spec.canaryAnalysis with spec.analysis in CRD - rename spec.canaryAnalysis to spec.analysis - required fields: spec.analysis.interval and spec.analysis.threshold --- artifacts/flagger/crd.yaml | 17 ++++++++++------- charts/flagger/crds/crd.yaml | 17 ++++++++++------- kustomize/base/flagger/crd.yaml | 17 ++++++++++------- 3 files changed, 30 insertions(+), 21 deletions(-) diff --git a/artifacts/flagger/crd.yaml b/artifacts/flagger/crd.yaml index 17fcc3f5..957b3f79 100644 --- a/artifacts/flagger/crd.yaml +++ b/artifacts/flagger/crd.yaml @@ -42,19 +42,19 @@ spec: priority: 1 - name: Interval type: string - JSONPath: .spec.canaryAnalysis.interval + JSONPath: .spec.analysis.interval priority: 1 - name: Mirror type: boolean - JSONPath: .spec.canaryAnalysis.mirror + JSONPath: .spec.analysis.mirror priority: 1 - name: StepWeight type: string - JSONPath: .spec.canaryAnalysis.stepWeight + JSONPath: .spec.analysis.stepWeight priority: 1 - name: MaxWeight type: string - JSONPath: .spec.canaryAnalysis.maxWeight + JSONPath: .spec.analysis.maxWeight priority: 1 - name: LastTransitionTime type: string @@ -66,7 +66,7 @@ spec: required: - targetRef - service - - canaryAnalysis + - analysis properties: provider: description: Traffic managent provider @@ -502,9 +502,12 @@ spec: skipAnalysis: description: Skip analysis and promote canary type: boolean - canaryAnalysis: + analysis: description: Canary analysis for this canary type: object + oneOf: + - required: ["interval", "threshold", "iterations"] + - required: ["interval", "threshold", "stepWeight"] properties: interval: description: Schedule interval for this canary @@ -523,7 +526,7 @@ spec: description: Incremental traffic percentage step type: number mirror: - description: Mirror traffic to canary before shifting + description: Mirror traffic to canary type: boolean match: description: A/B testing match conditions diff --git a/charts/flagger/crds/crd.yaml b/charts/flagger/crds/crd.yaml index 17fcc3f5..957b3f79 100644 --- a/charts/flagger/crds/crd.yaml +++ b/charts/flagger/crds/crd.yaml @@ -42,19 +42,19 @@ spec: priority: 1 - name: Interval type: string - JSONPath: .spec.canaryAnalysis.interval + JSONPath: .spec.analysis.interval priority: 1 - name: Mirror type: boolean - JSONPath: .spec.canaryAnalysis.mirror + JSONPath: .spec.analysis.mirror priority: 1 - name: StepWeight type: string - JSONPath: .spec.canaryAnalysis.stepWeight + JSONPath: .spec.analysis.stepWeight priority: 1 - name: MaxWeight type: string - JSONPath: .spec.canaryAnalysis.maxWeight + JSONPath: .spec.analysis.maxWeight priority: 1 - name: LastTransitionTime type: string @@ -66,7 +66,7 @@ spec: required: - targetRef - service - - canaryAnalysis + - analysis properties: provider: description: Traffic managent provider @@ -502,9 +502,12 @@ spec: skipAnalysis: description: Skip analysis and promote canary type: boolean - canaryAnalysis: + analysis: description: Canary analysis for this canary type: object + oneOf: + - required: ["interval", "threshold", "iterations"] + - required: ["interval", "threshold", "stepWeight"] properties: interval: description: Schedule interval for this canary @@ -523,7 +526,7 @@ spec: description: Incremental traffic percentage step type: number mirror: - description: Mirror traffic to canary before shifting + description: Mirror traffic to canary type: boolean match: description: A/B testing match conditions diff --git a/kustomize/base/flagger/crd.yaml b/kustomize/base/flagger/crd.yaml index 17fcc3f5..957b3f79 100644 --- a/kustomize/base/flagger/crd.yaml +++ b/kustomize/base/flagger/crd.yaml @@ -42,19 +42,19 @@ spec: priority: 1 - name: Interval type: string - JSONPath: .spec.canaryAnalysis.interval + JSONPath: .spec.analysis.interval priority: 1 - name: Mirror type: boolean - JSONPath: .spec.canaryAnalysis.mirror + JSONPath: .spec.analysis.mirror priority: 1 - name: StepWeight type: string - JSONPath: .spec.canaryAnalysis.stepWeight + JSONPath: .spec.analysis.stepWeight priority: 1 - name: MaxWeight type: string - JSONPath: .spec.canaryAnalysis.maxWeight + JSONPath: .spec.analysis.maxWeight priority: 1 - name: LastTransitionTime type: string @@ -66,7 +66,7 @@ spec: required: - targetRef - service - - canaryAnalysis + - analysis properties: provider: description: Traffic managent provider @@ -502,9 +502,12 @@ spec: skipAnalysis: description: Skip analysis and promote canary type: boolean - canaryAnalysis: + analysis: description: Canary analysis for this canary type: object + oneOf: + - required: ["interval", "threshold", "iterations"] + - required: ["interval", "threshold", "stepWeight"] properties: interval: description: Schedule interval for this canary @@ -523,7 +526,7 @@ spec: description: Incremental traffic percentage step type: number mirror: - description: Mirror traffic to canary before shifting + description: Mirror traffic to canary type: boolean match: description: A/B testing match conditions