diff --git a/artifacts/flagger/crd.yaml b/artifacts/flagger/crd.yaml index c46128f6..3ae25fa8 100644 --- a/artifacts/flagger/crd.yaml +++ b/artifacts/flagger/crd.yaml @@ -529,7 +529,7 @@ spec: description: Mirror traffic to canary type: boolean mirrorWeight: - description: Weight of traffic to be mirrored when + description: Percentage of traffic to be mirrored type: number match: description: A/B testing match conditions diff --git a/charts/flagger/crds/crd.yaml b/charts/flagger/crds/crd.yaml index c46128f6..3ae25fa8 100644 --- a/charts/flagger/crds/crd.yaml +++ b/charts/flagger/crds/crd.yaml @@ -529,7 +529,7 @@ spec: description: Mirror traffic to canary type: boolean mirrorWeight: - description: Weight of traffic to be mirrored when + description: Percentage of traffic to be mirrored type: number match: description: A/B testing match conditions diff --git a/kustomize/base/flagger/crd.yaml b/kustomize/base/flagger/crd.yaml index c46128f6..3ae25fa8 100644 --- a/kustomize/base/flagger/crd.yaml +++ b/kustomize/base/flagger/crd.yaml @@ -529,7 +529,7 @@ spec: description: Mirror traffic to canary type: boolean mirrorWeight: - description: Weight of traffic to be mirrored when + description: Percentage of traffic to be mirrored type: number match: description: A/B testing match conditions diff --git a/pkg/canary/deployment_fixture_test.go b/pkg/canary/deployment_fixture_test.go index 486b3472..b2a0d6a6 100644 --- a/pkg/canary/deployment_fixture_test.go +++ b/pkg/canary/deployment_fixture_test.go @@ -207,7 +207,7 @@ func newDeploymentControllerTestCanary() *flaggerv1.Canary { Kind: "HorizontalPodAutoscaler", }, Service: flaggerv1.CanaryService{ Port: 9898, - }, CanaryAnalysis: &flaggerv1.CanaryAnalysis{ + }, Analysis: &flaggerv1.CanaryAnalysis{ Threshold: 10, StepWeight: 10, MaxWeight: 50, diff --git a/pkg/controller/scheduler_daemonset_fixture_test.go b/pkg/controller/scheduler_daemonset_fixture_test.go index 65570ac8..62b61667 100644 --- a/pkg/controller/scheduler_daemonset_fixture_test.go +++ b/pkg/controller/scheduler_daemonset_fixture_test.go @@ -249,7 +249,7 @@ func newDaemonSetTestCanary() *flaggerv1.Canary { Kind: "DaemonSet", }, Service: flaggerv1.CanaryService{ Port: 9898, - }, CanaryAnalysis: &flaggerv1.CanaryAnalysis{ + }, Analysis: &flaggerv1.CanaryAnalysis{ Threshold: 10, StepWeight: 10, MaxWeight: 50, @@ -288,7 +288,7 @@ func newDaemonSetTestCanary() *flaggerv1.Canary { func newDaemonSetTestCanaryMirror() *flaggerv1.Canary { cd := newDaemonSetTestCanary() - cd.Spec.CanaryAnalysis.Mirror = true + cd.Spec.Analysis.Mirror = true return cd } @@ -306,7 +306,7 @@ func newDaemonSetTestCanaryAB() *flaggerv1.Canary { Kind: "DaemonSet", }, Service: flaggerv1.CanaryService{ Port: 9898, - }, CanaryAnalysis: &flaggerv1.CanaryAnalysis{ + }, Analysis: &flaggerv1.CanaryAnalysis{ Threshold: 10, Iterations: 10, Match: []istiov1alpha3.HTTPMatchRequest{ diff --git a/pkg/controller/scheduler_daemonset_test.go b/pkg/controller/scheduler_daemonset_test.go index 4ed0ea33..3d650f45 100644 --- a/pkg/controller/scheduler_daemonset_test.go +++ b/pkg/controller/scheduler_daemonset_test.go @@ -55,7 +55,7 @@ func TestScheduler_DaemonSetRollback(t *testing.T) { require.NoError(t, err) cd := c.DeepCopy() - cd.Spec.CanaryAnalysis.Metrics = append(c.Spec.CanaryAnalysis.Metrics, flaggerv1.CanaryMetric{ + cd.Spec.Analysis.Metrics = append(c.Spec.Analysis.Metrics, flaggerv1.CanaryMetric{ Name: "fail", Interval: "1m", ThresholdRange: &flaggerv1.CanaryThresholdRange{ @@ -437,7 +437,7 @@ func TestScheduler_DaemonSetAlerts(t *testing.T) { defer ts.Close() canary := newDaemonSetTestCanary() - canary.Spec.CanaryAnalysis.Alerts = []flaggerv1.CanaryAlert{ + canary.Spec.Analysis.Alerts = []flaggerv1.CanaryAlert{ { Name: "slack-dev", Severity: "info", diff --git a/pkg/controller/scheduler_deployment_fixture_test.go b/pkg/controller/scheduler_deployment_fixture_test.go index be7c10dd..77f7f3a5 100644 --- a/pkg/controller/scheduler_deployment_fixture_test.go +++ b/pkg/controller/scheduler_deployment_fixture_test.go @@ -256,7 +256,7 @@ func newDeploymentTestCanary() *flaggerv1.Canary { Kind: "HorizontalPodAutoscaler", }, Service: flaggerv1.CanaryService{ Port: 9898, - }, CanaryAnalysis: &flaggerv1.CanaryAnalysis{ + }, Analysis: &flaggerv1.CanaryAnalysis{ Threshold: 10, StepWeight: 10, MaxWeight: 50, @@ -295,7 +295,7 @@ func newDeploymentTestCanary() *flaggerv1.Canary { func newDeploymentTestCanaryMirror() *flaggerv1.Canary { cd := newDeploymentTestCanary() - cd.Spec.CanaryAnalysis.Mirror = true + cd.Spec.Analysis.Mirror = true return cd } @@ -318,7 +318,7 @@ func newDeploymentTestCanaryAB() *flaggerv1.Canary { Kind: "HorizontalPodAutoscaler", }, Service: flaggerv1.CanaryService{ Port: 9898, - }, CanaryAnalysis: &flaggerv1.CanaryAnalysis{ + }, Analysis: &flaggerv1.CanaryAnalysis{ Threshold: 10, Iterations: 10, Match: []istiov1alpha3.HTTPMatchRequest{ diff --git a/pkg/controller/scheduler_deployment_test.go b/pkg/controller/scheduler_deployment_test.go index d518956e..b65b6447 100644 --- a/pkg/controller/scheduler_deployment_test.go +++ b/pkg/controller/scheduler_deployment_test.go @@ -55,7 +55,7 @@ func TestScheduler_DeploymentRollback(t *testing.T) { c, err := mocks.flaggerClient.FlaggerV1beta1().Canaries("default").Get("podinfo", metav1.GetOptions{}) require.NoError(t, err) cd := c.DeepCopy() - cd.Spec.CanaryAnalysis.Metrics = append(c.Spec.CanaryAnalysis.Metrics, flaggerv1.CanaryMetric{ + cd.Spec.Analysis.Metrics = append(c.Spec.Analysis.Metrics, flaggerv1.CanaryMetric{ Name: "fail", Interval: "1m", ThresholdRange: &flaggerv1.CanaryThresholdRange{ @@ -519,7 +519,7 @@ func TestScheduler_DeploymentAlerts(t *testing.T) { defer ts.Close() canary := newDeploymentTestCanary() - canary.Spec.CanaryAnalysis.Alerts = []flaggerv1.CanaryAlert{ + canary.Spec.Analysis.Alerts = []flaggerv1.CanaryAlert{ { Name: "slack-dev", Severity: "info", diff --git a/pkg/controller/scheduler_svc_test.go b/pkg/controller/scheduler_svc_test.go index e552906b..d1214adb 100644 --- a/pkg/controller/scheduler_svc_test.go +++ b/pkg/controller/scheduler_svc_test.go @@ -98,7 +98,7 @@ func newTestServiceCanary() *flaggerv1.Canary { Service: flaggerv1.CanaryService{ Port: 9898, }, - CanaryAnalysis: &flaggerv1.CanaryAnalysis{ + Analysis: &flaggerv1.CanaryAnalysis{ Threshold: 10, StepWeight: 10, MaxWeight: 50, diff --git a/pkg/router/contour_test.go b/pkg/router/contour_test.go index 064073c1..2c0c6c6b 100644 --- a/pkg/router/contour_test.go +++ b/pkg/router/contour_test.go @@ -57,8 +57,8 @@ func TestContourRouter_Reconcile(t *testing.T) { require.NoError(t, err) cdClone = cd.DeepCopy() - cdClone.Spec.CanaryAnalysis.Iterations = 5 - cdClone.Spec.CanaryAnalysis.Match = newTestABTest().Spec.CanaryAnalysis.Match + cdClone.Spec.Analysis.Iterations = 5 + cdClone.Spec.Analysis.Match = newTestABTest().Spec.Analysis.Match canary, err = mocks.flaggerClient.FlaggerV1beta1().Canaries("default").Update(cdClone) require.NoError(t, err) @@ -104,8 +104,8 @@ func TestContourRouter_Routes(t *testing.T) { // test update to A/B cdClone := cd.DeepCopy() - cdClone.Spec.CanaryAnalysis.Iterations = 5 - cdClone.Spec.CanaryAnalysis.Match = newTestABTest().Spec.CanaryAnalysis.Match + cdClone.Spec.Analysis.Iterations = 5 + cdClone.Spec.Analysis.Match = newTestABTest().Spec.Analysis.Match canary, err := mocks.flaggerClient.FlaggerV1beta1().Canaries("default").Update(cdClone) require.NoError(t, err) diff --git a/pkg/router/router_test.go b/pkg/router/router_test.go index 205a8ab3..f2c07a48 100644 --- a/pkg/router/router_test.go +++ b/pkg/router/router_test.go @@ -112,7 +112,7 @@ func newTestCanary() *flaggerv1.Canary { "public-gateway.istio", "mesh", }, - }, CanaryAnalysis: &flaggerv1.CanaryAnalysis{ + }, Analysis: &flaggerv1.CanaryAnalysis{ Threshold: 10, StepWeight: 10, MaxWeight: 50, @@ -158,7 +158,7 @@ func newTestCanaryAppMesh() *flaggerv1.Canary { PerTryTimeout: "gateway-error", RetryOn: "5s", }, - }, CanaryAnalysis: &flaggerv1.CanaryAnalysis{ + }, Analysis: &flaggerv1.CanaryAnalysis{ Threshold: 10, StepWeight: 10, MaxWeight: 50, @@ -203,7 +203,7 @@ func newTestSMICanary() *flaggerv1.Canary { }, PortDiscovery: true, }, - CanaryAnalysis: &flaggerv1.CanaryAnalysis{ + Analysis: &flaggerv1.CanaryAnalysis{ Threshold: 10, StepWeight: 10, MaxWeight: 50, @@ -247,7 +247,7 @@ func newTestABTest() *flaggerv1.Canary { Service: flaggerv1.CanaryService{ Port: 9898, MeshName: "global", - }, CanaryAnalysis: &flaggerv1.CanaryAnalysis{ + }, Analysis: &flaggerv1.CanaryAnalysis{ Threshold: 10, Iterations: 2, Match: []istiov1alpha3.HTTPMatchRequest{ @@ -397,7 +397,7 @@ func newTestCanaryIngress() *flaggerv1.Canary { }, Service: flaggerv1.CanaryService{ Port: 9898, - }, CanaryAnalysis: &flaggerv1.CanaryAnalysis{ + }, Analysis: &flaggerv1.CanaryAnalysis{ Threshold: 10, StepWeight: 10, MaxWeight: 50,