Merge pull request #54998 from tengqm/autoscale-api-doc

Automatic merge from submit-queue (batch tested with PRs 56410, 56707, 56661, 54998, 56722). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix autoscaling API documentation

**What this PR does / why we need it**:
This PR fixes the API documentation generated for HorizontalPodAutoscaler resource.

**Which issue(s) this PR fixes**:
The current API doc for `MetricSpec` and `MetricStatus` is confusing. Users get no idea what can be used as the value for the `type` field, because the doc says this:

```
type is the type of metric source. It should match one of the fields below.
```

While acceptable in the source code, it makes no senses when reading the API doc, especially when the "`type`" field is listed as the last row in a table (see: https://kubernetes.io/docs/api-reference/v1.8/#metricspec-v2beta1-autoscaling )

**Special notes for your reviewer**:
This PR makes no changes to the code behavior.

**Release note**:
```release-note
NONE
```
This commit is contained in:
Kubernetes Submit Queue
2017-12-16 05:46:37 -08:00
committed by GitHub
10 changed files with 30 additions and 20 deletions

View File

@@ -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"
}
}

View File

@@ -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",