diff --git a/api/openapi-spec/swagger.json b/api/openapi-spec/swagger.json
index 3812d6d978b..1e463c37288 100644
--- a/api/openapi-spec/swagger.json
+++ b/api/openapi-spec/swagger.json
@@ -73604,7 +73604,7 @@
"$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.ResourceMetricSource"
},
"type": {
- "description": "type is the type of metric source. It should match one of the fields below.",
+ "description": "type is the type of metric source. It should be one of \"Object\", \"Pods\" or \"Resource\", each mapping to a matching field in the object.",
"type": "string"
}
}
@@ -73628,7 +73628,7 @@
"$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.ResourceMetricStatus"
},
"type": {
- "description": "type is the type of metric source. It will match one of the fields below.",
+ "description": "type is the type of metric source. It will be one of \"Object\", \"Pods\" or \"Resource\", each corresponds to a matching field in the object.",
"type": "string"
}
}
diff --git a/api/swagger-spec/autoscaling_v2beta1.json b/api/swagger-spec/autoscaling_v2beta1.json
index 082485c755a..bf7d8a7d383 100644
--- a/api/swagger-spec/autoscaling_v2beta1.json
+++ b/api/swagger-spec/autoscaling_v2beta1.json
@@ -1547,7 +1547,7 @@
"properties": {
"type": {
"type": "string",
- "description": "type is the type of metric source. It should match one of the fields below."
+ "description": "type is the type of metric source. It should be one of \"Object\", \"Pods\" or \"Resource\", each mapping to a matching field in the object."
},
"object": {
"$ref": "v2beta1.ObjectMetricSource",
@@ -1680,7 +1680,7 @@
"properties": {
"type": {
"type": "string",
- "description": "type is the type of metric source. It will match one of the fields below."
+ "description": "type is the type of metric source. It will be one of \"Object\", \"Pods\" or \"Resource\", each corresponds to a matching field in the object."
},
"object": {
"$ref": "v2beta1.ObjectMetricStatus",
diff --git a/docs/api-reference/autoscaling/v2beta1/definitions.html b/docs/api-reference/autoscaling/v2beta1/definitions.html
index a66b5c13bb0..f8be7d0c377 100755
--- a/docs/api-reference/autoscaling/v2beta1/definitions.html
+++ b/docs/api-reference/autoscaling/v2beta1/definitions.html
@@ -871,7 +871,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
type |
-type is the type of metric source. It will match one of the fields below. |
+type is the type of metric source. It will be one of "Object", "Pods" or "Resource", each corresponds to a matching field in the object. |
true |
string |
|
@@ -1828,7 +1828,7 @@ Examples:
type |
-type is the type of metric source. It should match one of the fields below. |
+type is the type of metric source. It should be one of "Object", "Pods" or "Resource", each mapping to a matching field in the object. |
true |
string |
|
diff --git a/pkg/apis/autoscaling/types.go b/pkg/apis/autoscaling/types.go
index 0e9d669ad78..71837b87236 100644
--- a/pkg/apis/autoscaling/types.go
+++ b/pkg/apis/autoscaling/types.go
@@ -116,7 +116,8 @@ var (
// MetricSpec specifies how to scale based on a single metric
// (only `type` and one other matching field should be set at once).
type MetricSpec struct {
- // Type is the type of metric source. It should match one of the fields below.
+ // Type is the type of metric source. It should be one of "Object",
+ // "Pods" or "Resource", each mapping to a matching field in the object.
Type MetricSourceType
// Object refers to a metric describing a single kubernetes object
@@ -261,7 +262,8 @@ type HorizontalPodAutoscalerCondition struct {
// MetricStatus describes the last-read state of a single metric.
type MetricStatus struct {
- // Type is the type of metric source. It will match one of the fields below.
+ // Type is the type of metric source. It will be one of "Object",
+ // "Pods" or "Resource", each corresponds to a matching field in the object.
Type MetricSourceType
// Object refers to a metric describing a single kubernetes object
diff --git a/staging/src/k8s.io/api/autoscaling/v1/generated.proto b/staging/src/k8s.io/api/autoscaling/v1/generated.proto
index e41e62746bd..f5e4471317a 100644
--- a/staging/src/k8s.io/api/autoscaling/v1/generated.proto
+++ b/staging/src/k8s.io/api/autoscaling/v1/generated.proto
@@ -138,7 +138,8 @@ message HorizontalPodAutoscalerStatus {
// MetricSpec specifies how to scale based on a single metric
// (only `type` and one other matching field should be set at once).
message MetricSpec {
- // type is the type of metric source. It should match one of the fields below.
+ // type is the type of metric source. It should be one of "Object",
+ // "Pods" or "Resource", each mapping to a matching field in the object.
optional string type = 1;
// object refers to a metric describing a single kubernetes object
@@ -163,7 +164,8 @@ message MetricSpec {
// MetricStatus describes the last-read state of a single metric.
message MetricStatus {
- // type is the type of metric source. It will match one of the fields below.
+ // type is the type of metric source. It will be one of "Object",
+ // "Pods" or "Resource", each corresponds to a matching field in the object.
optional string type = 1;
// object refers to a metric describing a single kubernetes object
diff --git a/staging/src/k8s.io/api/autoscaling/v1/types.go b/staging/src/k8s.io/api/autoscaling/v1/types.go
index e726c140399..eeadaf88475 100644
--- a/staging/src/k8s.io/api/autoscaling/v1/types.go
+++ b/staging/src/k8s.io/api/autoscaling/v1/types.go
@@ -166,7 +166,8 @@ var (
// MetricSpec specifies how to scale based on a single metric
// (only `type` and one other matching field should be set at once).
type MetricSpec struct {
- // type is the type of metric source. It should match one of the fields below.
+ // type is the type of metric source. It should be one of "Object",
+ // "Pods" or "Resource", each mapping to a matching field in the object.
Type MetricSourceType `json:"type" protobuf:"bytes,1,name=type"`
// object refers to a metric describing a single kubernetes object
@@ -235,7 +236,8 @@ type ResourceMetricSource struct {
// MetricStatus describes the last-read state of a single metric.
type MetricStatus struct {
- // type is the type of metric source. It will match one of the fields below.
+ // type is the type of metric source. It will be one of "Object",
+ // "Pods" or "Resource", each corresponds to a matching field in the object.
Type MetricSourceType `json:"type" protobuf:"bytes,1,name=type"`
// object refers to a metric describing a single kubernetes object
diff --git a/staging/src/k8s.io/api/autoscaling/v1/types_swagger_doc_generated.go b/staging/src/k8s.io/api/autoscaling/v1/types_swagger_doc_generated.go
index 7f84c2d9348..5506b76f3df 100644
--- a/staging/src/k8s.io/api/autoscaling/v1/types_swagger_doc_generated.go
+++ b/staging/src/k8s.io/api/autoscaling/v1/types_swagger_doc_generated.go
@@ -99,7 +99,7 @@ func (HorizontalPodAutoscalerStatus) SwaggerDoc() map[string]string {
var map_MetricSpec = map[string]string{
"": "MetricSpec specifies how to scale based on a single metric (only `type` and one other matching field should be set at once).",
- "type": "type is the type of metric source. It should match one of the fields below.",
+ "type": "type is the type of metric source. It should be one of \"Object\", \"Pods\" or \"Resource\", each mapping to a matching field in the object.",
"object": "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).",
"pods": "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.",
"resource": "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.",
@@ -111,7 +111,7 @@ func (MetricSpec) SwaggerDoc() map[string]string {
var map_MetricStatus = map[string]string{
"": "MetricStatus describes the last-read state of a single metric.",
- "type": "type is the type of metric source. It will match one of the fields below.",
+ "type": "type is the type of metric source. It will be one of \"Object\", \"Pods\" or \"Resource\", each corresponds to a matching field in the object.",
"object": "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).",
"pods": "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.",
"resource": "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.",
diff --git a/staging/src/k8s.io/api/autoscaling/v2beta1/generated.proto b/staging/src/k8s.io/api/autoscaling/v2beta1/generated.proto
index de3d2665fdc..332502fce1f 100644
--- a/staging/src/k8s.io/api/autoscaling/v2beta1/generated.proto
+++ b/staging/src/k8s.io/api/autoscaling/v2beta1/generated.proto
@@ -153,7 +153,8 @@ message HorizontalPodAutoscalerStatus {
// MetricSpec specifies how to scale based on a single metric
// (only `type` and one other matching field should be set at once).
message MetricSpec {
- // type is the type of metric source. It should match one of the fields below.
+ // type is the type of metric source. It should be one of "Object",
+ // "Pods" or "Resource", each mapping to a matching field in the object.
optional string type = 1;
// object refers to a metric describing a single kubernetes object
@@ -178,7 +179,8 @@ message MetricSpec {
// MetricStatus describes the last-read state of a single metric.
message MetricStatus {
- // type is the type of metric source. It will match one of the fields below.
+ // type is the type of metric source. It will be one of "Object",
+ // "Pods" or "Resource", each corresponds to a matching field in the object.
optional string type = 1;
// object refers to a metric describing a single kubernetes object
diff --git a/staging/src/k8s.io/api/autoscaling/v2beta1/types.go b/staging/src/k8s.io/api/autoscaling/v2beta1/types.go
index 9c72ae25ca7..22e53573b2f 100644
--- a/staging/src/k8s.io/api/autoscaling/v2beta1/types.go
+++ b/staging/src/k8s.io/api/autoscaling/v2beta1/types.go
@@ -78,7 +78,8 @@ var (
// MetricSpec specifies how to scale based on a single metric
// (only `type` and one other matching field should be set at once).
type MetricSpec struct {
- // type is the type of metric source. It should match one of the fields below.
+ // type is the type of metric source. It should be one of "Object",
+ // "Pods" or "Resource", each mapping to a matching field in the object.
Type MetricSourceType `json:"type" protobuf:"bytes,1,name=type"`
// object refers to a metric describing a single kubernetes object
@@ -210,7 +211,8 @@ type HorizontalPodAutoscalerCondition struct {
// MetricStatus describes the last-read state of a single metric.
type MetricStatus struct {
- // type is the type of metric source. It will match one of the fields below.
+ // type is the type of metric source. It will be one of "Object",
+ // "Pods" or "Resource", each corresponds to a matching field in the object.
Type MetricSourceType `json:"type" protobuf:"bytes,1,name=type"`
// object refers to a metric describing a single kubernetes object
diff --git a/staging/src/k8s.io/api/autoscaling/v2beta1/types_swagger_doc_generated.go b/staging/src/k8s.io/api/autoscaling/v2beta1/types_swagger_doc_generated.go
index c7002b3d1e6..8bcf0f4b305 100644
--- a/staging/src/k8s.io/api/autoscaling/v2beta1/types_swagger_doc_generated.go
+++ b/staging/src/k8s.io/api/autoscaling/v2beta1/types_swagger_doc_generated.go
@@ -100,7 +100,7 @@ func (HorizontalPodAutoscalerStatus) SwaggerDoc() map[string]string {
var map_MetricSpec = map[string]string{
"": "MetricSpec specifies how to scale based on a single metric (only `type` and one other matching field should be set at once).",
- "type": "type is the type of metric source. It should match one of the fields below.",
+ "type": "type is the type of metric source. It should be one of \"Object\", \"Pods\" or \"Resource\", each mapping to a matching field in the object.",
"object": "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).",
"pods": "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.",
"resource": "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.",
@@ -112,7 +112,7 @@ func (MetricSpec) SwaggerDoc() map[string]string {
var map_MetricStatus = map[string]string{
"": "MetricStatus describes the last-read state of a single metric.",
- "type": "type is the type of metric source. It will match one of the fields below.",
+ "type": "type is the type of metric source. It will be one of \"Object\", \"Pods\" or \"Resource\", each corresponds to a matching field in the object.",
"object": "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).",
"pods": "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.",
"resource": "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.",