diff --git a/artifacts/flagger/crd.yaml b/artifacts/flagger/crd.yaml index a38c927d..106cb1ff 100644 --- a/artifacts/flagger/crd.yaml +++ b/artifacts/flagger/crd.yaml @@ -100,6 +100,8 @@ spec: pattern: "^[0-9]+(m|s)" threshold: type: number + query: + type: string webhooks: type: array properties: diff --git a/charts/flagger/templates/crd.yaml b/charts/flagger/templates/crd.yaml index 4d9527f7..0fd89e01 100644 --- a/charts/flagger/templates/crd.yaml +++ b/charts/flagger/templates/crd.yaml @@ -101,6 +101,8 @@ spec: pattern: "^[0-9]+(m|s)" threshold: type: number + query: + type: string webhooks: type: array properties: diff --git a/pkg/apis/flagger/v1alpha3/types.go b/pkg/apis/flagger/v1alpha3/types.go index 628c5dda..5829e954 100755 --- a/pkg/apis/flagger/v1alpha3/types.go +++ b/pkg/apis/flagger/v1alpha3/types.go @@ -127,9 +127,11 @@ type CanaryAnalysis struct { // CanaryMetric holds the reference to Istio metrics used for canary analysis type CanaryMetric struct { - Name string `json:"name"` - Interval string `json:"interval"` - Threshold int `json:"threshold"` + Name string `json:"name"` + Interval string `json:"interval"` + Threshold float64 `json:"threshold"` + // +optional + Query string `json:"query,omitempty"` } // CanaryWebhook holds the reference to external checks used for canary analysis