From 1138cf19650aae9f18f739e508a293819061604a Mon Sep 17 00:00:00 2001 From: Song Gao Date: Tue, 18 Feb 2020 18:46:48 +0800 Subject: [PATCH] fix autoscaler api (#1718) --- manifests/crd.yaml | 16 ++++++++-------- pkg/apis/pingcap/v1alpha1/openapi_generated.go | 6 +++--- .../v1alpha1/tidbclusterautoscaler_types.go | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/manifests/crd.yaml b/manifests/crd.yaml index a1717e5497..cb174a7766 100644 --- a/manifests/crd.yaml +++ b/manifests/crd.yaml @@ -7060,10 +7060,6 @@ spec: tidb: description: TidbAutoScalerSpec describes the spec for tidb auto-scaling properties: - MetricsTimeDuration: - description: MetricsTimeDuration describe the Time duration to be - queried in the Prometheus - type: string maxReplicas: description: maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale out. It cannot be less than @@ -7082,6 +7078,10 @@ spec: metric will be set to 80% average CPU utilization. items: {} type: array + metricsTimeDuration: + description: MetricsTimeDuration describe the Time duration to be + queried in the Prometheus + type: string minReplicas: description: minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down. It defaults to 1 pod. @@ -7120,10 +7120,6 @@ spec: tikv: description: TikvAutoScalerSpec describes the spec for tikv auto-scaling properties: - MetricsTimeDuration: - description: MetricsTimeDuration describe the Time duration to be - queried in the Prometheus - type: string maxReplicas: description: maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale out. It cannot be less than @@ -7142,6 +7138,10 @@ spec: metric will be set to 80% average CPU utilization. items: {} type: array + metricsTimeDuration: + description: MetricsTimeDuration describe the Time duration to be + queried in the Prometheus + type: string minReplicas: description: minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down. It defaults to 1 pod. diff --git a/pkg/apis/pingcap/v1alpha1/openapi_generated.go b/pkg/apis/pingcap/v1alpha1/openapi_generated.go index 42c2712634..dabd175b7b 100644 --- a/pkg/apis/pingcap/v1alpha1/openapi_generated.go +++ b/pkg/apis/pingcap/v1alpha1/openapi_generated.go @@ -808,7 +808,7 @@ func schema_pkg_apis_pingcap_v1alpha1_BasicAutoScalerSpec(ref common.ReferenceCa }, }, }, - "MetricsTimeDuration": { + "metricsTimeDuration": { SchemaProps: spec.SchemaProps{ Description: "MetricsTimeDuration describe the Time duration to be queried in the Prometheus", Type: []string{"string"}, @@ -5705,7 +5705,7 @@ func schema_pkg_apis_pingcap_v1alpha1_TidbAutoScalerSpec(ref common.ReferenceCal }, }, }, - "MetricsTimeDuration": { + "metricsTimeDuration": { SchemaProps: spec.SchemaProps{ Description: "MetricsTimeDuration describe the Time duration to be queried in the Prometheus", Type: []string{"string"}, @@ -6605,7 +6605,7 @@ func schema_pkg_apis_pingcap_v1alpha1_TikvAutoScalerSpec(ref common.ReferenceCal }, }, }, - "MetricsTimeDuration": { + "metricsTimeDuration": { SchemaProps: spec.SchemaProps{ Description: "MetricsTimeDuration describe the Time duration to be queried in the Prometheus", Type: []string{"string"}, diff --git a/pkg/apis/pingcap/v1alpha1/tidbclusterautoscaler_types.go b/pkg/apis/pingcap/v1alpha1/tidbclusterautoscaler_types.go index af8ae40128..139ee7c744 100644 --- a/pkg/apis/pingcap/v1alpha1/tidbclusterautoscaler_types.go +++ b/pkg/apis/pingcap/v1alpha1/tidbclusterautoscaler_types.go @@ -115,7 +115,7 @@ type BasicAutoScalerSpec struct { // MetricsTimeDuration describe the Time duration to be queried in the Prometheus // +optional - MetricsTimeDuration *string `json:"MetricsTimeDuration,omitempty"` + MetricsTimeDuration *string `json:"metricsTimeDuration,omitempty"` // ScaleOutThreshold describe the consecutive threshold for the auto-scaling, // if the consecutive counts of the scale-out result in auto-scaling reach this number,