blob: 3f38880f952644f0460599c5e290407bfe745100 [file] [log] [blame]
Matteo Scandoloa4285862020-12-01 18:10:10 -08001/*
2Copyright The Kubernetes Authors.
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15*/
16
17package v2beta2
18
19// This file contains a collection of methods that can be used from go-restful to
20// generate Swagger API documentation for its models. Please read this PR for more
21// information on the implementation: https://github.com/emicklei/go-restful/pull/215
22//
23// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
24// they are on one line! For multiple line or blocks that you want to ignore use ---.
25// Any context after a --- is ignored.
26//
27// Those methods can be generated by using hack/update-generated-swagger-docs.sh
28
29// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT.
30var map_CrossVersionObjectReference = map[string]string{
31 "": "CrossVersionObjectReference contains enough information to let you identify the referred resource.",
32 "kind": "Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\"",
33 "name": "Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names",
34 "apiVersion": "API version of the referent",
35}
36
37func (CrossVersionObjectReference) SwaggerDoc() map[string]string {
38 return map_CrossVersionObjectReference
39}
40
41var map_ExternalMetricSource = map[string]string{
42 "": "ExternalMetricSource indicates how to scale on a metric not associated with any Kubernetes object (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).",
43 "metric": "metric identifies the target metric by name and selector",
44 "target": "target specifies the target value for the given metric",
45}
46
47func (ExternalMetricSource) SwaggerDoc() map[string]string {
48 return map_ExternalMetricSource
49}
50
51var map_ExternalMetricStatus = map[string]string{
52 "": "ExternalMetricStatus indicates the current value of a global metric not associated with any Kubernetes object.",
53 "metric": "metric identifies the target metric by name and selector",
54 "current": "current contains the current value for the given metric",
55}
56
57func (ExternalMetricStatus) SwaggerDoc() map[string]string {
58 return map_ExternalMetricStatus
59}
60
61var map_HPAScalingPolicy = map[string]string{
62 "": "HPAScalingPolicy is a single policy which must hold true for a specified past interval.",
63 "type": "Type is used to specify the scaling policy.",
64 "value": "Value contains the amount of change which is permitted by the policy. It must be greater than zero",
65 "periodSeconds": "PeriodSeconds specifies the window of time for which the policy should hold true. PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min).",
66}
67
68func (HPAScalingPolicy) SwaggerDoc() map[string]string {
69 return map_HPAScalingPolicy
70}
71
72var map_HPAScalingRules = map[string]string{
73 "": "HPAScalingRules configures the scaling behavior for one direction. These Rules are applied after calculating DesiredReplicas from metrics for the HPA. They can limit the scaling velocity by specifying scaling policies. They can prevent flapping by specifying the stabilization window, so that the number of replicas is not set instantly, instead, the safest value from the stabilization window is chosen.",
74 "stabilizationWindowSeconds": "StabilizationWindowSeconds is the number of seconds for which past recommendations should be considered while scaling up or scaling down. StabilizationWindowSeconds must be greater than or equal to zero and less than or equal to 3600 (one hour). If not set, use the default values: - For scale up: 0 (i.e. no stabilization is done). - For scale down: 300 (i.e. the stabilization window is 300 seconds long).",
75 "selectPolicy": "selectPolicy is used to specify which policy should be used. If not set, the default value MaxPolicySelect is used.",
76 "policies": "policies is a list of potential scaling polices which can be used during scaling. At least one policy must be specified, otherwise the HPAScalingRules will be discarded as invalid",
77}
78
79func (HPAScalingRules) SwaggerDoc() map[string]string {
80 return map_HPAScalingRules
81}
82
83var map_HorizontalPodAutoscaler = map[string]string{
84 "": "HorizontalPodAutoscaler is the configuration for a horizontal pod autoscaler, which automatically manages the replica count of any resource implementing the scale subresource based on the metrics specified.",
85 "metadata": "metadata is the standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata",
86 "spec": "spec is the specification for the behaviour of the autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.",
87 "status": "status is the current information about the autoscaler.",
88}
89
90func (HorizontalPodAutoscaler) SwaggerDoc() map[string]string {
91 return map_HorizontalPodAutoscaler
92}
93
94var map_HorizontalPodAutoscalerBehavior = map[string]string{
95 "": "HorizontalPodAutoscalerBehavior configures the scaling behavior of the target in both Up and Down directions (scaleUp and scaleDown fields respectively).",
96 "scaleUp": "scaleUp is scaling policy for scaling Up. If not set, the default value is the higher of:\n * increase no more than 4 pods per 60 seconds\n * double the number of pods per 60 seconds\nNo stabilization is used.",
97 "scaleDown": "scaleDown is scaling policy for scaling Down. If not set, the default value is to allow to scale down to minReplicas pods, with a 300 second stabilization window (i.e., the highest recommendation for the last 300sec is used).",
98}
99
100func (HorizontalPodAutoscalerBehavior) SwaggerDoc() map[string]string {
101 return map_HorizontalPodAutoscalerBehavior
102}
103
104var map_HorizontalPodAutoscalerCondition = map[string]string{
105 "": "HorizontalPodAutoscalerCondition describes the state of a HorizontalPodAutoscaler at a certain point.",
106 "type": "type describes the current condition",
107 "status": "status is the status of the condition (True, False, Unknown)",
108 "lastTransitionTime": "lastTransitionTime is the last time the condition transitioned from one status to another",
109 "reason": "reason is the reason for the condition's last transition.",
110 "message": "message is a human-readable explanation containing details about the transition",
111}
112
113func (HorizontalPodAutoscalerCondition) SwaggerDoc() map[string]string {
114 return map_HorizontalPodAutoscalerCondition
115}
116
117var map_HorizontalPodAutoscalerList = map[string]string{
118 "": "HorizontalPodAutoscalerList is a list of horizontal pod autoscaler objects.",
119 "metadata": "metadata is the standard list metadata.",
120 "items": "items is the list of horizontal pod autoscaler objects.",
121}
122
123func (HorizontalPodAutoscalerList) SwaggerDoc() map[string]string {
124 return map_HorizontalPodAutoscalerList
125}
126
127var map_HorizontalPodAutoscalerSpec = map[string]string{
128 "": "HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler.",
129 "scaleTargetRef": "scaleTargetRef points to the target resource to scale, and is used to the pods for which metrics should be collected, as well as to actually change the replica count.",
130 "minReplicas": "minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down. It defaults to 1 pod. minReplicas is allowed to be 0 if the alpha feature gate HPAScaleToZero is enabled and at least one Object or External metric is configured. Scaling is active as long as at least one metric value is available.",
131 "maxReplicas": "maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up. It cannot be less that minReplicas.",
132 "metrics": "metrics contains the specifications for which to use to calculate the desired replica count (the maximum replica count across all metrics will be used). The desired replica count is calculated multiplying the ratio between the target value and the current value by the current number of pods. Ergo, metrics used must decrease as the pod count is increased, and vice-versa. See the individual metric source types for more information about how each type of metric must respond. If not set, the default metric will be set to 80% average CPU utilization.",
133 "behavior": "behavior configures the scaling behavior of the target in both Up and Down directions (scaleUp and scaleDown fields respectively). If not set, the default HPAScalingRules for scale up and scale down are used.",
134}
135
136func (HorizontalPodAutoscalerSpec) SwaggerDoc() map[string]string {
137 return map_HorizontalPodAutoscalerSpec
138}
139
140var map_HorizontalPodAutoscalerStatus = map[string]string{
141 "": "HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler.",
142 "observedGeneration": "observedGeneration is the most recent generation observed by this autoscaler.",
143 "lastScaleTime": "lastScaleTime is the last time the HorizontalPodAutoscaler scaled the number of pods, used by the autoscaler to control how often the number of pods is changed.",
144 "currentReplicas": "currentReplicas is current number of replicas of pods managed by this autoscaler, as last seen by the autoscaler.",
145 "desiredReplicas": "desiredReplicas is the desired number of replicas of pods managed by this autoscaler, as last calculated by the autoscaler.",
146 "currentMetrics": "currentMetrics is the last read state of the metrics used by this autoscaler.",
147 "conditions": "conditions is the set of conditions required for this autoscaler to scale its target, and indicates whether or not those conditions are met.",
148}
149
150func (HorizontalPodAutoscalerStatus) SwaggerDoc() map[string]string {
151 return map_HorizontalPodAutoscalerStatus
152}
153
154var map_MetricIdentifier = map[string]string{
155 "": "MetricIdentifier defines the name and optionally selector for a metric",
156 "name": "name is the name of the given metric",
157 "selector": "selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics.",
158}
159
160func (MetricIdentifier) SwaggerDoc() map[string]string {
161 return map_MetricIdentifier
162}
163
164var map_MetricSpec = map[string]string{
165 "": "MetricSpec specifies how to scale based on a single metric (only `type` and one other matching field should be set at once).",
166 "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.",
167 "object": "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).",
168 "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.",
169 "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.",
170 "external": "external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).",
171}
172
173func (MetricSpec) SwaggerDoc() map[string]string {
174 return map_MetricSpec
175}
176
177var map_MetricStatus = map[string]string{
178 "": "MetricStatus describes the last-read state of a single metric.",
179 "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.",
180 "object": "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).",
181 "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.",
182 "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.",
183 "external": "external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).",
184}
185
186func (MetricStatus) SwaggerDoc() map[string]string {
187 return map_MetricStatus
188}
189
190var map_MetricTarget = map[string]string{
191 "": "MetricTarget defines the target value, average value, or average utilization of a specific metric",
192 "type": "type represents whether the metric type is Utilization, Value, or AverageValue",
193 "value": "value is the target value of the metric (as a quantity).",
194 "averageValue": "averageValue is the target value of the average of the metric across all relevant pods (as a quantity)",
195 "averageUtilization": "averageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. Currently only valid for Resource metric source type",
196}
197
198func (MetricTarget) SwaggerDoc() map[string]string {
199 return map_MetricTarget
200}
201
202var map_MetricValueStatus = map[string]string{
203 "": "MetricValueStatus holds the current value for a metric",
204 "value": "value is the current value of the metric (as a quantity).",
205 "averageValue": "averageValue is the current value of the average of the metric across all relevant pods (as a quantity)",
206 "averageUtilization": "currentAverageUtilization is the current value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods.",
207}
208
209func (MetricValueStatus) SwaggerDoc() map[string]string {
210 return map_MetricValueStatus
211}
212
213var map_ObjectMetricSource = map[string]string{
214 "": "ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).",
215 "target": "target specifies the target value for the given metric",
216 "metric": "metric identifies the target metric by name and selector",
217}
218
219func (ObjectMetricSource) SwaggerDoc() map[string]string {
220 return map_ObjectMetricSource
221}
222
223var map_ObjectMetricStatus = map[string]string{
224 "": "ObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).",
225 "metric": "metric identifies the target metric by name and selector",
226 "current": "current contains the current value for the given metric",
227}
228
229func (ObjectMetricStatus) SwaggerDoc() map[string]string {
230 return map_ObjectMetricStatus
231}
232
233var map_PodsMetricSource = map[string]string{
234 "": "PodsMetricSource indicates how to scale on 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.",
235 "metric": "metric identifies the target metric by name and selector",
236 "target": "target specifies the target value for the given metric",
237}
238
239func (PodsMetricSource) SwaggerDoc() map[string]string {
240 return map_PodsMetricSource
241}
242
243var map_PodsMetricStatus = map[string]string{
244 "": "PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second).",
245 "metric": "metric identifies the target metric by name and selector",
246 "current": "current contains the current value for the given metric",
247}
248
249func (PodsMetricStatus) SwaggerDoc() map[string]string {
250 return map_PodsMetricStatus
251}
252
253var map_ResourceMetricSource = map[string]string{
254 "": "ResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. 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. Only one \"target\" type should be set.",
255 "name": "name is the name of the resource in question.",
256 "target": "target specifies the target value for the given metric",
257}
258
259func (ResourceMetricSource) SwaggerDoc() map[string]string {
260 return map_ResourceMetricSource
261}
262
263var map_ResourceMetricStatus = map[string]string{
264 "": "ResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, 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.",
265 "name": "Name is the name of the resource in question.",
266 "current": "current contains the current value for the given metric",
267}
268
269func (ResourceMetricStatus) SwaggerDoc() map[string]string {
270 return map_ResourceMetricStatus
271}
272
273// AUTO-GENERATED FUNCTIONS END HERE