diff --git a/docs/features/kustomize/rollout_cr_schema.json b/docs/features/kustomize/rollout_cr_schema.json index 038ebebf89..b7ca35204f 100644 --- a/docs/features/kustomize/rollout_cr_schema.json +++ b/docs/features/kustomize/rollout_cr_schema.json @@ -244,7 +244,6 @@ "datadog": { "properties": { "aggregator": { - "default": "last", "enum": [ "avg", "min", @@ -5082,7 +5081,6 @@ "datadog": { "properties": { "aggregator": { - "default": "last", "enum": [ "avg", "min", @@ -9933,7 +9931,6 @@ "datadog": { "properties": { "aggregator": { - "default": "last", "enum": [ "avg", "min", diff --git a/manifests/crds/analysis-run-crd.yaml b/manifests/crds/analysis-run-crd.yaml index c8088911b6..816702aa04 100644 --- a/manifests/crds/analysis-run-crd.yaml +++ b/manifests/crds/analysis-run-crd.yaml @@ -179,7 +179,6 @@ spec: datadog: properties: aggregator: - default: last enum: - avg - min diff --git a/manifests/crds/analysis-template-crd.yaml b/manifests/crds/analysis-template-crd.yaml index 3cd6ec81a4..3bcf3855ad 100644 --- a/manifests/crds/analysis-template-crd.yaml +++ b/manifests/crds/analysis-template-crd.yaml @@ -175,7 +175,6 @@ spec: datadog: properties: aggregator: - default: last enum: - avg - min diff --git a/manifests/crds/cluster-analysis-template-crd.yaml b/manifests/crds/cluster-analysis-template-crd.yaml index ab4d887d23..1f97c14bd8 100644 --- a/manifests/crds/cluster-analysis-template-crd.yaml +++ b/manifests/crds/cluster-analysis-template-crd.yaml @@ -175,7 +175,6 @@ spec: datadog: properties: aggregator: - default: last enum: - avg - min diff --git a/manifests/install.yaml b/manifests/install.yaml index 4421af7c17..3dff99191a 100755 --- a/manifests/install.yaml +++ b/manifests/install.yaml @@ -180,7 +180,6 @@ spec: datadog: properties: aggregator: - default: last enum: - avg - min @@ -3470,7 +3469,6 @@ spec: datadog: properties: aggregator: - default: last enum: - avg - min @@ -6638,7 +6636,6 @@ spec: datadog: properties: aggregator: - default: last enum: - avg - min diff --git a/metricproviders/datadog/datadog_test.go b/metricproviders/datadog/datadog_test.go index fe817f385e..ed81977296 100644 --- a/metricproviders/datadog/datadog_test.go +++ b/metricproviders/datadog/datadog_test.go @@ -66,12 +66,6 @@ func TestDatadogSpecDefaults(t *testing.T) { assert.Equal(t, "\"l2norm\"", string(aggregatorEnums[7].Raw), "\"l2norm\" expected, got %s", string(aggregatorEnums[7].Raw)) assert.Equal(t, "\"area\"", string(aggregatorEnums[8].Raw), "\"area\" expected, got %s", string(aggregatorEnums[8].Raw)) }) - - t.Run("aggregator: Validate default is last", func(t *testing.T) { - defaultAggregator := string(ddSpec.Properties["aggregator"].Default.Raw) - assert.Equal(t, "\"last\"", defaultAggregator, "Default aggregator should be \"last\" ") - }) - } func TestValidateIncomingProps(t *testing.T) { diff --git a/pkg/apiclient/rollout/rollout.swagger.json b/pkg/apiclient/rollout/rollout.swagger.json index b3c10e03f8..3a74f48a24 100755 --- a/pkg/apiclient/rollout/rollout.swagger.json +++ b/pkg/apiclient/rollout/rollout.swagger.json @@ -1205,7 +1205,7 @@ }, "aggregator": { "type": "string", - "title": "+kubebuilder:default=\"last\"\n+kubebuilder:validation:Enum=avg;min;max;sum;last;percentile;mean;l2norm;area\nAggregator is a type of aggregator to use for metrics-based queries (default: last). Used for v2" + "title": "+kubebuilder:validation:Enum=avg;min;max;sum;last;percentile;mean;l2norm;area\nAggregator is a type of aggregator to use for metrics-based queries (default: \"\"). Used for v2" } } }, diff --git a/pkg/apis/rollouts/v1alpha1/analysis_types.go b/pkg/apis/rollouts/v1alpha1/analysis_types.go index 08ef18071f..3a287ec856 100644 --- a/pkg/apis/rollouts/v1alpha1/analysis_types.go +++ b/pkg/apis/rollouts/v1alpha1/analysis_types.go @@ -601,8 +601,7 @@ type DatadogMetric struct { // +kubebuilder:validation:Enum=v1;v2 // +kubebuilder:default=v1 ApiVersion string `json:"apiVersion,omitempty" protobuf:"bytes,5,opt,name=apiVersion"` - // +kubebuilder:default="last" // +kubebuilder:validation:Enum=avg;min;max;sum;last;percentile;mean;l2norm;area - // Aggregator is a type of aggregator to use for metrics-based queries (default: last). Used for v2 + // Aggregator is a type of aggregator to use for metrics-based queries (default: ""). Used for v2 Aggregator string `json:"aggregator,omitempty" protobuf:"bytes,6,opt,name=aggregator"` } diff --git a/pkg/apis/rollouts/v1alpha1/generated.proto b/pkg/apis/rollouts/v1alpha1/generated.proto index 0ea0a7bc2c..eebb4453cc 100644 --- a/pkg/apis/rollouts/v1alpha1/generated.proto +++ b/pkg/apis/rollouts/v1alpha1/generated.proto @@ -655,9 +655,8 @@ message DatadogMetric { // +kubebuilder:default=v1 optional string apiVersion = 5; - // +kubebuilder:default="last" // +kubebuilder:validation:Enum=avg;min;max;sum;last;percentile;mean;l2norm;area - // Aggregator is a type of aggregator to use for metrics-based queries (default: last). Used for v2 + // Aggregator is a type of aggregator to use for metrics-based queries (default: ""). Used for v2 optional string aggregator = 6; } diff --git a/pkg/apis/rollouts/v1alpha1/openapi_generated.go b/pkg/apis/rollouts/v1alpha1/openapi_generated.go index 2d4d68ff1e..6c18e64a2b 100644 --- a/pkg/apis/rollouts/v1alpha1/openapi_generated.go +++ b/pkg/apis/rollouts/v1alpha1/openapi_generated.go @@ -1935,7 +1935,7 @@ func schema_pkg_apis_rollouts_v1alpha1_DatadogMetric(ref common.ReferenceCallbac }, "aggregator": { SchemaProps: spec.SchemaProps{ - Description: "Aggregator is a type of aggregator to use for metrics-based queries (default: last). Used for v2", + Description: "Aggregator is a type of aggregator to use for metrics-based queries (default: \"\"). Used for v2", Type: []string{"string"}, Format: "", },