mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 10:51:29 +00:00
Merge pull request #115996 from rayowang/autoscaling
Fix API field references for autoscaling v1, v2 and v2beta2
This commit is contained in:
commit
4a934ae821
56
api/openapi-spec/swagger.json
generated
56
api/openapi-spec/swagger.json
generated
@ -2411,15 +2411,15 @@
|
|||||||
"description": "CrossVersionObjectReference contains enough information to let you identify the referred resource.",
|
"description": "CrossVersionObjectReference contains enough information to let you identify the referred resource.",
|
||||||
"properties": {
|
"properties": {
|
||||||
"apiVersion": {
|
"apiVersion": {
|
||||||
"description": "API version of the referent",
|
"description": "apiVersion is the API version of the referent",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"kind": {
|
"kind": {
|
||||||
"description": "Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
|
"description": "kind is the kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"name": {
|
"name": {
|
||||||
"description": "Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names",
|
"description": "name is the name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -2447,11 +2447,11 @@
|
|||||||
},
|
},
|
||||||
"spec": {
|
"spec": {
|
||||||
"$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerSpec",
|
"$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerSpec",
|
||||||
"description": "behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status."
|
"description": "spec defines the behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status."
|
||||||
},
|
},
|
||||||
"status": {
|
"status": {
|
||||||
"$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerStatus",
|
"$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerStatus",
|
||||||
"description": "current information about the autoscaler."
|
"description": "status is the current information about the autoscaler."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"type": "object",
|
"type": "object",
|
||||||
@ -2471,7 +2471,7 @@
|
|||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"items": {
|
"items": {
|
||||||
"description": "list of horizontal pod autoscaler objects.",
|
"description": "items is the list of horizontal pod autoscaler objects.",
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler"
|
"$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler"
|
||||||
},
|
},
|
||||||
@ -2502,7 +2502,7 @@
|
|||||||
"description": "specification of a horizontal pod autoscaler.",
|
"description": "specification of a horizontal pod autoscaler.",
|
||||||
"properties": {
|
"properties": {
|
||||||
"maxReplicas": {
|
"maxReplicas": {
|
||||||
"description": "upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.",
|
"description": "maxReplicas is the upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.",
|
||||||
"format": "int32",
|
"format": "int32",
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
@ -2516,7 +2516,7 @@
|
|||||||
"description": "reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption and will set the desired number of pods by using its Scale subresource."
|
"description": "reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption and will set the desired number of pods by using its Scale subresource."
|
||||||
},
|
},
|
||||||
"targetCPUUtilizationPercentage": {
|
"targetCPUUtilizationPercentage": {
|
||||||
"description": "target average CPU utilization (represented as a percentage of requested CPU) over all the pods; if not specified the default autoscaling policy will be used.",
|
"description": "targetCPUUtilizationPercentage is the target average CPU utilization (represented as a percentage of requested CPU) over all the pods; if not specified the default autoscaling policy will be used.",
|
||||||
"format": "int32",
|
"format": "int32",
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
}
|
}
|
||||||
@ -2531,26 +2531,26 @@
|
|||||||
"description": "current status of a horizontal pod autoscaler",
|
"description": "current status of a horizontal pod autoscaler",
|
||||||
"properties": {
|
"properties": {
|
||||||
"currentCPUUtilizationPercentage": {
|
"currentCPUUtilizationPercentage": {
|
||||||
"description": "current average CPU utilization over all pods, represented as a percentage of requested CPU, e.g. 70 means that an average pod is using now 70% of its requested CPU.",
|
"description": "currentCPUUtilizationPercentage is the current average CPU utilization over all pods, represented as a percentage of requested CPU, e.g. 70 means that an average pod is using now 70% of its requested CPU.",
|
||||||
"format": "int32",
|
"format": "int32",
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
"currentReplicas": {
|
"currentReplicas": {
|
||||||
"description": "current number of replicas of pods managed by this autoscaler.",
|
"description": "currentReplicas is the current number of replicas of pods managed by this autoscaler.",
|
||||||
"format": "int32",
|
"format": "int32",
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
"desiredReplicas": {
|
"desiredReplicas": {
|
||||||
"description": "desired number of replicas of pods managed by this autoscaler.",
|
"description": "desiredReplicas is the desired number of replicas of pods managed by this autoscaler.",
|
||||||
"format": "int32",
|
"format": "int32",
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
"lastScaleTime": {
|
"lastScaleTime": {
|
||||||
"$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time",
|
"$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time",
|
||||||
"description": "last time the HorizontalPodAutoscaler scaled the number of pods; used by the autoscaler to control how often the number of pods is changed."
|
"description": "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."
|
||||||
},
|
},
|
||||||
"observedGeneration": {
|
"observedGeneration": {
|
||||||
"description": "most recent generation observed by this autoscaler.",
|
"description": "observedGeneration is the most recent generation observed by this autoscaler.",
|
||||||
"format": "int64",
|
"format": "int64",
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
}
|
}
|
||||||
@ -2578,11 +2578,11 @@
|
|||||||
},
|
},
|
||||||
"spec": {
|
"spec": {
|
||||||
"$ref": "#/definitions/io.k8s.api.autoscaling.v1.ScaleSpec",
|
"$ref": "#/definitions/io.k8s.api.autoscaling.v1.ScaleSpec",
|
||||||
"description": "defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status."
|
"description": "spec defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status."
|
||||||
},
|
},
|
||||||
"status": {
|
"status": {
|
||||||
"$ref": "#/definitions/io.k8s.api.autoscaling.v1.ScaleStatus",
|
"$ref": "#/definitions/io.k8s.api.autoscaling.v1.ScaleStatus",
|
||||||
"description": "current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only."
|
"description": "status is the current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"type": "object",
|
"type": "object",
|
||||||
@ -2598,7 +2598,7 @@
|
|||||||
"description": "ScaleSpec describes the attributes of a scale subresource.",
|
"description": "ScaleSpec describes the attributes of a scale subresource.",
|
||||||
"properties": {
|
"properties": {
|
||||||
"replicas": {
|
"replicas": {
|
||||||
"description": "desired number of instances for the scaled object.",
|
"description": "replicas is the desired number of instances for the scaled object.",
|
||||||
"format": "int32",
|
"format": "int32",
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
}
|
}
|
||||||
@ -2609,12 +2609,12 @@
|
|||||||
"description": "ScaleStatus represents the current status of a scale subresource.",
|
"description": "ScaleStatus represents the current status of a scale subresource.",
|
||||||
"properties": {
|
"properties": {
|
||||||
"replicas": {
|
"replicas": {
|
||||||
"description": "actual number of observed instances of the scaled object.",
|
"description": "replicas is the actual number of observed instances of the scaled object.",
|
||||||
"format": "int32",
|
"format": "int32",
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
"selector": {
|
"selector": {
|
||||||
"description": "label query over pods that should match the replicas count. This is same as the label selector but in the string format to avoid introspection by clients. The string will be in the same format as the query-param syntax. More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors",
|
"description": "selector is the label query over pods that should match the replicas count. This is same as the label selector but in the string format to avoid introspection by clients. The string will be in the same format as the query-param syntax. More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -2650,7 +2650,7 @@
|
|||||||
"description": "ContainerResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing a single container in 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.",
|
"description": "ContainerResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing a single container in 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.",
|
||||||
"properties": {
|
"properties": {
|
||||||
"container": {
|
"container": {
|
||||||
"description": "Container is the name of the container in the pods of the scaling target",
|
"description": "container is the name of the container in the pods of the scaling target",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"current": {
|
"current": {
|
||||||
@ -2658,7 +2658,7 @@
|
|||||||
"description": "current contains the current value for the given metric"
|
"description": "current contains the current value for the given metric"
|
||||||
},
|
},
|
||||||
"name": {
|
"name": {
|
||||||
"description": "Name is the name of the resource in question.",
|
"description": "name is the name of the resource in question.",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -2673,15 +2673,15 @@
|
|||||||
"description": "CrossVersionObjectReference contains enough information to let you identify the referred resource.",
|
"description": "CrossVersionObjectReference contains enough information to let you identify the referred resource.",
|
||||||
"properties": {
|
"properties": {
|
||||||
"apiVersion": {
|
"apiVersion": {
|
||||||
"description": "API version of the referent",
|
"description": "apiVersion is the API version of the referent",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"kind": {
|
"kind": {
|
||||||
"description": "Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
|
"description": "kind is the kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"name": {
|
"name": {
|
||||||
"description": "Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names",
|
"description": "name is the name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -2731,16 +2731,16 @@
|
|||||||
"description": "HPAScalingPolicy is a single policy which must hold true for a specified past interval.",
|
"description": "HPAScalingPolicy is a single policy which must hold true for a specified past interval.",
|
||||||
"properties": {
|
"properties": {
|
||||||
"periodSeconds": {
|
"periodSeconds": {
|
||||||
"description": "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).",
|
"description": "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).",
|
||||||
"format": "int32",
|
"format": "int32",
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
"type": {
|
"type": {
|
||||||
"description": "Type is used to specify the scaling policy.",
|
"description": "type is used to specify the scaling policy.",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"value": {
|
"value": {
|
||||||
"description": "Value contains the amount of change which is permitted by the policy. It must be greater than zero",
|
"description": "value contains the amount of change which is permitted by the policy. It must be greater than zero",
|
||||||
"format": "int32",
|
"format": "int32",
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
}
|
}
|
||||||
@ -2768,7 +2768,7 @@
|
|||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"stabilizationWindowSeconds": {
|
"stabilizationWindowSeconds": {
|
||||||
"description": "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).",
|
"description": "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).",
|
||||||
"format": "int32",
|
"format": "int32",
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
}
|
}
|
||||||
@ -3208,7 +3208,7 @@
|
|||||||
"description": "current contains the current value for the given metric"
|
"description": "current contains the current value for the given metric"
|
||||||
},
|
},
|
||||||
"name": {
|
"name": {
|
||||||
"description": "Name is the name of the resource in question.",
|
"description": "name is the name of the resource in question.",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -155,7 +155,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"default": {},
|
"default": {},
|
||||||
"description": "defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status."
|
"description": "spec defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status."
|
||||||
},
|
},
|
||||||
"status": {
|
"status": {
|
||||||
"allOf": [
|
"allOf": [
|
||||||
@ -164,7 +164,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"default": {},
|
"default": {},
|
||||||
"description": "current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only."
|
"description": "status is the current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"type": "object",
|
"type": "object",
|
||||||
@ -180,7 +180,7 @@
|
|||||||
"description": "ScaleSpec describes the attributes of a scale subresource.",
|
"description": "ScaleSpec describes the attributes of a scale subresource.",
|
||||||
"properties": {
|
"properties": {
|
||||||
"replicas": {
|
"replicas": {
|
||||||
"description": "desired number of instances for the scaled object.",
|
"description": "replicas is the desired number of instances for the scaled object.",
|
||||||
"format": "int32",
|
"format": "int32",
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
}
|
}
|
||||||
@ -192,12 +192,12 @@
|
|||||||
"properties": {
|
"properties": {
|
||||||
"replicas": {
|
"replicas": {
|
||||||
"default": 0,
|
"default": 0,
|
||||||
"description": "actual number of observed instances of the scaled object.",
|
"description": "replicas is the actual number of observed instances of the scaled object.",
|
||||||
"format": "int32",
|
"format": "int32",
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
"selector": {
|
"selector": {
|
||||||
"description": "label query over pods that should match the replicas count. This is same as the label selector but in the string format to avoid introspection by clients. The string will be in the same format as the query-param syntax. More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors",
|
"description": "selector is the label query over pods that should match the replicas count. This is same as the label selector but in the string format to avoid introspection by clients. The string will be in the same format as the query-param syntax. More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -1272,7 +1272,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"default": {},
|
"default": {},
|
||||||
"description": "defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status."
|
"description": "spec defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status."
|
||||||
},
|
},
|
||||||
"status": {
|
"status": {
|
||||||
"allOf": [
|
"allOf": [
|
||||||
@ -1281,7 +1281,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"default": {},
|
"default": {},
|
||||||
"description": "current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only."
|
"description": "status is the current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"type": "object",
|
"type": "object",
|
||||||
@ -1297,7 +1297,7 @@
|
|||||||
"description": "ScaleSpec describes the attributes of a scale subresource.",
|
"description": "ScaleSpec describes the attributes of a scale subresource.",
|
||||||
"properties": {
|
"properties": {
|
||||||
"replicas": {
|
"replicas": {
|
||||||
"description": "desired number of instances for the scaled object.",
|
"description": "replicas is the desired number of instances for the scaled object.",
|
||||||
"format": "int32",
|
"format": "int32",
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
}
|
}
|
||||||
@ -1309,12 +1309,12 @@
|
|||||||
"properties": {
|
"properties": {
|
||||||
"replicas": {
|
"replicas": {
|
||||||
"default": 0,
|
"default": 0,
|
||||||
"description": "actual number of observed instances of the scaled object.",
|
"description": "replicas is the actual number of observed instances of the scaled object.",
|
||||||
"format": "int32",
|
"format": "int32",
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
"selector": {
|
"selector": {
|
||||||
"description": "label query over pods that should match the replicas count. This is same as the label selector but in the string format to avoid introspection by clients. The string will be in the same format as the query-param syntax. More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors",
|
"description": "selector is the label query over pods that should match the replicas count. This is same as the label selector but in the string format to avoid introspection by clients. The string will be in the same format as the query-param syntax. More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -5,17 +5,17 @@
|
|||||||
"description": "CrossVersionObjectReference contains enough information to let you identify the referred resource.",
|
"description": "CrossVersionObjectReference contains enough information to let you identify the referred resource.",
|
||||||
"properties": {
|
"properties": {
|
||||||
"apiVersion": {
|
"apiVersion": {
|
||||||
"description": "API version of the referent",
|
"description": "apiVersion is the API version of the referent",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"kind": {
|
"kind": {
|
||||||
"default": "",
|
"default": "",
|
||||||
"description": "Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
|
"description": "kind is the kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"name": {
|
"name": {
|
||||||
"default": "",
|
"default": "",
|
||||||
"description": "Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names",
|
"description": "name is the name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -53,7 +53,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"default": {},
|
"default": {},
|
||||||
"description": "behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status."
|
"description": "spec defines the behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status."
|
||||||
},
|
},
|
||||||
"status": {
|
"status": {
|
||||||
"allOf": [
|
"allOf": [
|
||||||
@ -62,7 +62,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"default": {},
|
"default": {},
|
||||||
"description": "current information about the autoscaler."
|
"description": "status is the current information about the autoscaler."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"type": "object",
|
"type": "object",
|
||||||
@ -82,7 +82,7 @@
|
|||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"items": {
|
"items": {
|
||||||
"description": "list of horizontal pod autoscaler objects.",
|
"description": "items is the list of horizontal pod autoscaler objects.",
|
||||||
"items": {
|
"items": {
|
||||||
"allOf": [
|
"allOf": [
|
||||||
{
|
{
|
||||||
@ -124,7 +124,7 @@
|
|||||||
"properties": {
|
"properties": {
|
||||||
"maxReplicas": {
|
"maxReplicas": {
|
||||||
"default": 0,
|
"default": 0,
|
||||||
"description": "upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.",
|
"description": "maxReplicas is the upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.",
|
||||||
"format": "int32",
|
"format": "int32",
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
@ -143,7 +143,7 @@
|
|||||||
"description": "reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption and will set the desired number of pods by using its Scale subresource."
|
"description": "reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption and will set the desired number of pods by using its Scale subresource."
|
||||||
},
|
},
|
||||||
"targetCPUUtilizationPercentage": {
|
"targetCPUUtilizationPercentage": {
|
||||||
"description": "target average CPU utilization (represented as a percentage of requested CPU) over all the pods; if not specified the default autoscaling policy will be used.",
|
"description": "targetCPUUtilizationPercentage is the target average CPU utilization (represented as a percentage of requested CPU) over all the pods; if not specified the default autoscaling policy will be used.",
|
||||||
"format": "int32",
|
"format": "int32",
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
}
|
}
|
||||||
@ -158,19 +158,19 @@
|
|||||||
"description": "current status of a horizontal pod autoscaler",
|
"description": "current status of a horizontal pod autoscaler",
|
||||||
"properties": {
|
"properties": {
|
||||||
"currentCPUUtilizationPercentage": {
|
"currentCPUUtilizationPercentage": {
|
||||||
"description": "current average CPU utilization over all pods, represented as a percentage of requested CPU, e.g. 70 means that an average pod is using now 70% of its requested CPU.",
|
"description": "currentCPUUtilizationPercentage is the current average CPU utilization over all pods, represented as a percentage of requested CPU, e.g. 70 means that an average pod is using now 70% of its requested CPU.",
|
||||||
"format": "int32",
|
"format": "int32",
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
"currentReplicas": {
|
"currentReplicas": {
|
||||||
"default": 0,
|
"default": 0,
|
||||||
"description": "current number of replicas of pods managed by this autoscaler.",
|
"description": "currentReplicas is the current number of replicas of pods managed by this autoscaler.",
|
||||||
"format": "int32",
|
"format": "int32",
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
"desiredReplicas": {
|
"desiredReplicas": {
|
||||||
"default": 0,
|
"default": 0,
|
||||||
"description": "desired number of replicas of pods managed by this autoscaler.",
|
"description": "desiredReplicas is the desired number of replicas of pods managed by this autoscaler.",
|
||||||
"format": "int32",
|
"format": "int32",
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
@ -180,10 +180,10 @@
|
|||||||
"$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Time"
|
"$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Time"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "last time the HorizontalPodAutoscaler scaled the number of pods; used by the autoscaler to control how often the number of pods is changed."
|
"description": "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."
|
||||||
},
|
},
|
||||||
"observedGeneration": {
|
"observedGeneration": {
|
||||||
"description": "most recent generation observed by this autoscaler.",
|
"description": "observedGeneration is the most recent generation observed by this autoscaler.",
|
||||||
"format": "int64",
|
"format": "int64",
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
"properties": {
|
"properties": {
|
||||||
"container": {
|
"container": {
|
||||||
"default": "",
|
"default": "",
|
||||||
"description": "Container is the name of the container in the pods of the scaling target",
|
"description": "container is the name of the container in the pods of the scaling target",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"current": {
|
"current": {
|
||||||
@ -50,7 +50,7 @@
|
|||||||
},
|
},
|
||||||
"name": {
|
"name": {
|
||||||
"default": "",
|
"default": "",
|
||||||
"description": "Name is the name of the resource in question.",
|
"description": "name is the name of the resource in question.",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -65,17 +65,17 @@
|
|||||||
"description": "CrossVersionObjectReference contains enough information to let you identify the referred resource.",
|
"description": "CrossVersionObjectReference contains enough information to let you identify the referred resource.",
|
||||||
"properties": {
|
"properties": {
|
||||||
"apiVersion": {
|
"apiVersion": {
|
||||||
"description": "API version of the referent",
|
"description": "apiVersion is the API version of the referent",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"kind": {
|
"kind": {
|
||||||
"default": "",
|
"default": "",
|
||||||
"description": "Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
|
"description": "kind is the kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"name": {
|
"name": {
|
||||||
"default": "",
|
"default": "",
|
||||||
"description": "Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names",
|
"description": "name is the name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -146,18 +146,18 @@
|
|||||||
"properties": {
|
"properties": {
|
||||||
"periodSeconds": {
|
"periodSeconds": {
|
||||||
"default": 0,
|
"default": 0,
|
||||||
"description": "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).",
|
"description": "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).",
|
||||||
"format": "int32",
|
"format": "int32",
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
"type": {
|
"type": {
|
||||||
"default": "",
|
"default": "",
|
||||||
"description": "Type is used to specify the scaling policy.",
|
"description": "type is used to specify the scaling policy.",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"value": {
|
"value": {
|
||||||
"default": 0,
|
"default": 0,
|
||||||
"description": "Value contains the amount of change which is permitted by the policy. It must be greater than zero",
|
"description": "value contains the amount of change which is permitted by the policy. It must be greater than zero",
|
||||||
"format": "int32",
|
"format": "int32",
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
}
|
}
|
||||||
@ -190,7 +190,7 @@
|
|||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"stabilizationWindowSeconds": {
|
"stabilizationWindowSeconds": {
|
||||||
"description": "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).",
|
"description": "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).",
|
||||||
"format": "int32",
|
"format": "int32",
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
}
|
}
|
||||||
@ -826,7 +826,7 @@
|
|||||||
},
|
},
|
||||||
"name": {
|
"name": {
|
||||||
"default": "",
|
"default": "",
|
||||||
"description": "Name is the name of the resource in question.",
|
"description": "name is the name of the resource in question.",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -31,25 +31,25 @@ type Scale struct {
|
|||||||
// +optional
|
// +optional
|
||||||
metav1.ObjectMeta
|
metav1.ObjectMeta
|
||||||
|
|
||||||
// defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
|
// spec defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
|
||||||
// +optional
|
// +optional
|
||||||
Spec ScaleSpec
|
Spec ScaleSpec
|
||||||
|
|
||||||
// current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only.
|
// status represents the current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only.
|
||||||
// +optional
|
// +optional
|
||||||
Status ScaleStatus
|
Status ScaleStatus
|
||||||
}
|
}
|
||||||
|
|
||||||
// ScaleSpec describes the attributes of a scale subresource.
|
// ScaleSpec describes the attributes of a scale subresource.
|
||||||
type ScaleSpec struct {
|
type ScaleSpec struct {
|
||||||
// desired number of instances for the scaled object.
|
// replicas is the desired number of instances for the scaled object.
|
||||||
// +optional
|
// +optional
|
||||||
Replicas int32
|
Replicas int32
|
||||||
}
|
}
|
||||||
|
|
||||||
// ScaleStatus represents the current status of a scale subresource.
|
// ScaleStatus represents the current status of a scale subresource.
|
||||||
type ScaleStatus struct {
|
type ScaleStatus struct {
|
||||||
// actual number of observed instances of the scaled object.
|
// replicas is the actual number of observed instances of the scaled object.
|
||||||
Replicas int32
|
Replicas int32
|
||||||
|
|
||||||
// label query over pods that should match the replicas count. This is same
|
// label query over pods that should match the replicas count. This is same
|
||||||
@ -62,20 +62,23 @@ type ScaleStatus struct {
|
|||||||
|
|
||||||
// CrossVersionObjectReference contains enough information to let you identify the referred resource.
|
// CrossVersionObjectReference contains enough information to let you identify the referred resource.
|
||||||
type CrossVersionObjectReference struct {
|
type CrossVersionObjectReference struct {
|
||||||
// Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds"
|
// kind is the kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds"
|
||||||
Kind string
|
Kind string
|
||||||
// Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names
|
|
||||||
|
// name is the name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names
|
||||||
Name string
|
Name string
|
||||||
// API version of the referent
|
|
||||||
|
// apiVersion is the API version of the referent
|
||||||
// +optional
|
// +optional
|
||||||
APIVersion string
|
APIVersion string
|
||||||
}
|
}
|
||||||
|
|
||||||
// HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler.
|
// HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler.
|
||||||
type HorizontalPodAutoscalerSpec struct {
|
type HorizontalPodAutoscalerSpec struct {
|
||||||
// ScaleTargetRef points to the target resource to scale, and is used to the pods for which metrics
|
// 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.
|
// should be collected, as well as to actually change the replica count.
|
||||||
ScaleTargetRef CrossVersionObjectReference
|
ScaleTargetRef CrossVersionObjectReference
|
||||||
|
|
||||||
// minReplicas is the lower limit for the number of replicas to which the autoscaler
|
// 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
|
// 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
|
// alpha feature gate HPAScaleToZero is enabled and at least one Object or External
|
||||||
@ -83,10 +86,12 @@ type HorizontalPodAutoscalerSpec struct {
|
|||||||
// available.
|
// available.
|
||||||
// +optional
|
// +optional
|
||||||
MinReplicas *int32
|
MinReplicas *int32
|
||||||
// MaxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up.
|
|
||||||
|
// maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up.
|
||||||
// It cannot be less that minReplicas.
|
// It cannot be less that minReplicas.
|
||||||
MaxReplicas int32
|
MaxReplicas int32
|
||||||
// Metrics contains the specifications for which to use to calculate the
|
|
||||||
|
// metrics contains the specifications for which to use to calculate the
|
||||||
// desired replica count (the maximum replica count across all metrics will
|
// desired replica count (the maximum replica count across all metrics will
|
||||||
// be used). The desired replica count is calculated multiplying the
|
// be used). The desired replica count is calculated multiplying the
|
||||||
// ratio between the target value and the current value by the current
|
// ratio between the target value and the current value by the current
|
||||||
@ -487,7 +492,7 @@ type PodsMetricStatus struct {
|
|||||||
// Kubernetes, and have special scaling options on top of those available to
|
// Kubernetes, and have special scaling options on top of those available to
|
||||||
// normal per-pod metrics using the "pods" source.
|
// normal per-pod metrics using the "pods" source.
|
||||||
type ResourceMetricStatus struct {
|
type ResourceMetricStatus struct {
|
||||||
// Name is the name of the resource in question.
|
// name is the name of the resource in question.
|
||||||
Name api.ResourceName
|
Name api.ResourceName
|
||||||
Current MetricValueStatus
|
Current MetricValueStatus
|
||||||
}
|
}
|
||||||
@ -498,7 +503,7 @@ type ResourceMetricStatus struct {
|
|||||||
// Kubernetes, and have special scaling options on top of those available to
|
// Kubernetes, and have special scaling options on top of those available to
|
||||||
// normal per-pod metrics using the "pods" source.
|
// normal per-pod metrics using the "pods" source.
|
||||||
type ContainerResourceMetricStatus struct {
|
type ContainerResourceMetricStatus struct {
|
||||||
// Name is the name of the resource in question.
|
// name is the name of the resource in question.
|
||||||
Name api.ResourceName
|
Name api.ResourceName
|
||||||
Container string
|
Container string
|
||||||
Current MetricValueStatus
|
Current MetricValueStatus
|
||||||
@ -530,12 +535,12 @@ type HorizontalPodAutoscaler struct {
|
|||||||
// +optional
|
// +optional
|
||||||
metav1.ObjectMeta
|
metav1.ObjectMeta
|
||||||
|
|
||||||
// Spec is the specification for the behaviour of the autoscaler.
|
// 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.
|
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
|
||||||
// +optional
|
// +optional
|
||||||
Spec HorizontalPodAutoscalerSpec
|
Spec HorizontalPodAutoscalerSpec
|
||||||
|
|
||||||
// Status is the current information about the autoscaler.
|
// status is the current information about the autoscaler.
|
||||||
// +optional
|
// +optional
|
||||||
Status HorizontalPodAutoscalerStatus
|
Status HorizontalPodAutoscalerStatus
|
||||||
}
|
}
|
||||||
@ -549,6 +554,6 @@ type HorizontalPodAutoscalerList struct {
|
|||||||
// +optional
|
// +optional
|
||||||
metav1.ListMeta
|
metav1.ListMeta
|
||||||
|
|
||||||
// Items is the list of horizontal pod autoscaler objects.
|
// items is the list of horizontal pod autoscaler objects.
|
||||||
Items []HorizontalPodAutoscaler
|
Items []HorizontalPodAutoscaler
|
||||||
}
|
}
|
||||||
|
84
pkg/generated/openapi/zz_generated.openapi.go
generated
84
pkg/generated/openapi/zz_generated.openapi.go
generated
@ -9989,7 +9989,7 @@ func schema_k8sio_api_autoscaling_v1_CrossVersionObjectReference(ref common.Refe
|
|||||||
Properties: map[string]spec.Schema{
|
Properties: map[string]spec.Schema{
|
||||||
"kind": {
|
"kind": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
|
Description: "kind is the kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
|
||||||
Default: "",
|
Default: "",
|
||||||
Type: []string{"string"},
|
Type: []string{"string"},
|
||||||
Format: "",
|
Format: "",
|
||||||
@ -9997,7 +9997,7 @@ func schema_k8sio_api_autoscaling_v1_CrossVersionObjectReference(ref common.Refe
|
|||||||
},
|
},
|
||||||
"name": {
|
"name": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names",
|
Description: "name is the name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names",
|
||||||
Default: "",
|
Default: "",
|
||||||
Type: []string{"string"},
|
Type: []string{"string"},
|
||||||
Format: "",
|
Format: "",
|
||||||
@ -10005,7 +10005,7 @@ func schema_k8sio_api_autoscaling_v1_CrossVersionObjectReference(ref common.Refe
|
|||||||
},
|
},
|
||||||
"apiVersion": {
|
"apiVersion": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "API version of the referent",
|
Description: "apiVersion is the API version of the referent",
|
||||||
Type: []string{"string"},
|
Type: []string{"string"},
|
||||||
Format: "",
|
Format: "",
|
||||||
},
|
},
|
||||||
@ -10137,14 +10137,14 @@ func schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscaler(ref common.Referenc
|
|||||||
},
|
},
|
||||||
"spec": {
|
"spec": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.",
|
Description: "spec defines the behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.",
|
||||||
Default: map[string]interface{}{},
|
Default: map[string]interface{}{},
|
||||||
Ref: ref("k8s.io/api/autoscaling/v1.HorizontalPodAutoscalerSpec"),
|
Ref: ref("k8s.io/api/autoscaling/v1.HorizontalPodAutoscalerSpec"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"status": {
|
"status": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "current information about the autoscaler.",
|
Description: "status is the current information about the autoscaler.",
|
||||||
Default: map[string]interface{}{},
|
Default: map[string]interface{}{},
|
||||||
Ref: ref("k8s.io/api/autoscaling/v1.HorizontalPodAutoscalerStatus"),
|
Ref: ref("k8s.io/api/autoscaling/v1.HorizontalPodAutoscalerStatus"),
|
||||||
},
|
},
|
||||||
@ -10240,7 +10240,7 @@ func schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerList(ref common.Refe
|
|||||||
},
|
},
|
||||||
"items": {
|
"items": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "list of horizontal pod autoscaler objects.",
|
Description: "items is the list of horizontal pod autoscaler objects.",
|
||||||
Type: []string{"array"},
|
Type: []string{"array"},
|
||||||
Items: &spec.SchemaOrArray{
|
Items: &spec.SchemaOrArray{
|
||||||
Schema: &spec.Schema{
|
Schema: &spec.Schema{
|
||||||
@ -10284,7 +10284,7 @@ func schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerSpec(ref common.Refe
|
|||||||
},
|
},
|
||||||
"maxReplicas": {
|
"maxReplicas": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.",
|
Description: "maxReplicas is the upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.",
|
||||||
Default: 0,
|
Default: 0,
|
||||||
Type: []string{"integer"},
|
Type: []string{"integer"},
|
||||||
Format: "int32",
|
Format: "int32",
|
||||||
@ -10292,7 +10292,7 @@ func schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerSpec(ref common.Refe
|
|||||||
},
|
},
|
||||||
"targetCPUUtilizationPercentage": {
|
"targetCPUUtilizationPercentage": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "target average CPU utilization (represented as a percentage of requested CPU) over all the pods; if not specified the default autoscaling policy will be used.",
|
Description: "targetCPUUtilizationPercentage is the target average CPU utilization (represented as a percentage of requested CPU) over all the pods; if not specified the default autoscaling policy will be used.",
|
||||||
Type: []string{"integer"},
|
Type: []string{"integer"},
|
||||||
Format: "int32",
|
Format: "int32",
|
||||||
},
|
},
|
||||||
@ -10315,20 +10315,20 @@ func schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerStatus(ref common.Re
|
|||||||
Properties: map[string]spec.Schema{
|
Properties: map[string]spec.Schema{
|
||||||
"observedGeneration": {
|
"observedGeneration": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "most recent generation observed by this autoscaler.",
|
Description: "observedGeneration is the most recent generation observed by this autoscaler.",
|
||||||
Type: []string{"integer"},
|
Type: []string{"integer"},
|
||||||
Format: "int64",
|
Format: "int64",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"lastScaleTime": {
|
"lastScaleTime": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "last time the HorizontalPodAutoscaler scaled the number of pods; used by the autoscaler to control how often the number of pods is changed.",
|
Description: "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.",
|
||||||
Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"),
|
Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"currentReplicas": {
|
"currentReplicas": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "current number of replicas of pods managed by this autoscaler.",
|
Description: "currentReplicas is the current number of replicas of pods managed by this autoscaler.",
|
||||||
Default: 0,
|
Default: 0,
|
||||||
Type: []string{"integer"},
|
Type: []string{"integer"},
|
||||||
Format: "int32",
|
Format: "int32",
|
||||||
@ -10336,7 +10336,7 @@ func schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerStatus(ref common.Re
|
|||||||
},
|
},
|
||||||
"desiredReplicas": {
|
"desiredReplicas": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "desired number of replicas of pods managed by this autoscaler.",
|
Description: "desiredReplicas is the desired number of replicas of pods managed by this autoscaler.",
|
||||||
Default: 0,
|
Default: 0,
|
||||||
Type: []string{"integer"},
|
Type: []string{"integer"},
|
||||||
Format: "int32",
|
Format: "int32",
|
||||||
@ -10344,7 +10344,7 @@ func schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerStatus(ref common.Re
|
|||||||
},
|
},
|
||||||
"currentCPUUtilizationPercentage": {
|
"currentCPUUtilizationPercentage": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "current average CPU utilization over all pods, represented as a percentage of requested CPU, e.g. 70 means that an average pod is using now 70% of its requested CPU.",
|
Description: "currentCPUUtilizationPercentage is the current average CPU utilization over all pods, represented as a percentage of requested CPU, e.g. 70 means that an average pod is using now 70% of its requested CPU.",
|
||||||
Type: []string{"integer"},
|
Type: []string{"integer"},
|
||||||
Format: "int32",
|
Format: "int32",
|
||||||
},
|
},
|
||||||
@ -10394,7 +10394,7 @@ func schema_k8sio_api_autoscaling_v1_MetricSpec(ref common.ReferenceCallback) co
|
|||||||
},
|
},
|
||||||
"containerResource": {
|
"containerResource": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "container resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod of 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. This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag.",
|
Description: "containerResource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod of 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. This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag.",
|
||||||
Ref: ref("k8s.io/api/autoscaling/v1.ContainerResourceMetricSource"),
|
Ref: ref("k8s.io/api/autoscaling/v1.ContainerResourceMetricSource"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -10449,7 +10449,7 @@ func schema_k8sio_api_autoscaling_v1_MetricStatus(ref common.ReferenceCallback)
|
|||||||
},
|
},
|
||||||
"containerResource": {
|
"containerResource": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "container resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in 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.",
|
Description: "containerResource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in 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.",
|
||||||
Ref: ref("k8s.io/api/autoscaling/v1.ContainerResourceMetricStatus"),
|
Ref: ref("k8s.io/api/autoscaling/v1.ContainerResourceMetricStatus"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -10747,14 +10747,14 @@ func schema_k8sio_api_autoscaling_v1_Scale(ref common.ReferenceCallback) common.
|
|||||||
},
|
},
|
||||||
"spec": {
|
"spec": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.",
|
Description: "spec defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.",
|
||||||
Default: map[string]interface{}{},
|
Default: map[string]interface{}{},
|
||||||
Ref: ref("k8s.io/api/autoscaling/v1.ScaleSpec"),
|
Ref: ref("k8s.io/api/autoscaling/v1.ScaleSpec"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"status": {
|
"status": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only.",
|
Description: "status is the current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only.",
|
||||||
Default: map[string]interface{}{},
|
Default: map[string]interface{}{},
|
||||||
Ref: ref("k8s.io/api/autoscaling/v1.ScaleStatus"),
|
Ref: ref("k8s.io/api/autoscaling/v1.ScaleStatus"),
|
||||||
},
|
},
|
||||||
@ -10776,7 +10776,7 @@ func schema_k8sio_api_autoscaling_v1_ScaleSpec(ref common.ReferenceCallback) com
|
|||||||
Properties: map[string]spec.Schema{
|
Properties: map[string]spec.Schema{
|
||||||
"replicas": {
|
"replicas": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "desired number of instances for the scaled object.",
|
Description: "replicas is the desired number of instances for the scaled object.",
|
||||||
Type: []string{"integer"},
|
Type: []string{"integer"},
|
||||||
Format: "int32",
|
Format: "int32",
|
||||||
},
|
},
|
||||||
@ -10796,7 +10796,7 @@ func schema_k8sio_api_autoscaling_v1_ScaleStatus(ref common.ReferenceCallback) c
|
|||||||
Properties: map[string]spec.Schema{
|
Properties: map[string]spec.Schema{
|
||||||
"replicas": {
|
"replicas": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "actual number of observed instances of the scaled object.",
|
Description: "replicas is the actual number of observed instances of the scaled object.",
|
||||||
Default: 0,
|
Default: 0,
|
||||||
Type: []string{"integer"},
|
Type: []string{"integer"},
|
||||||
Format: "int32",
|
Format: "int32",
|
||||||
@ -10804,7 +10804,7 @@ func schema_k8sio_api_autoscaling_v1_ScaleStatus(ref common.ReferenceCallback) c
|
|||||||
},
|
},
|
||||||
"selector": {
|
"selector": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "label query over pods that should match the replicas count. This is same as the label selector but in the string format to avoid introspection by clients. The string will be in the same format as the query-param syntax. More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors",
|
Description: "selector is the label query over pods that should match the replicas count. This is same as the label selector but in the string format to avoid introspection by clients. The string will be in the same format as the query-param syntax. More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors",
|
||||||
Type: []string{"string"},
|
Type: []string{"string"},
|
||||||
Format: "",
|
Format: "",
|
||||||
},
|
},
|
||||||
@ -10864,7 +10864,7 @@ func schema_k8sio_api_autoscaling_v2_ContainerResourceMetricStatus(ref common.Re
|
|||||||
Properties: map[string]spec.Schema{
|
Properties: map[string]spec.Schema{
|
||||||
"name": {
|
"name": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "Name is the name of the resource in question.",
|
Description: "name is the name of the resource in question.",
|
||||||
Default: "",
|
Default: "",
|
||||||
Type: []string{"string"},
|
Type: []string{"string"},
|
||||||
Format: "",
|
Format: "",
|
||||||
@ -10879,7 +10879,7 @@ func schema_k8sio_api_autoscaling_v2_ContainerResourceMetricStatus(ref common.Re
|
|||||||
},
|
},
|
||||||
"container": {
|
"container": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "Container is the name of the container in the pods of the scaling target",
|
Description: "container is the name of the container in the pods of the scaling target",
|
||||||
Default: "",
|
Default: "",
|
||||||
Type: []string{"string"},
|
Type: []string{"string"},
|
||||||
Format: "",
|
Format: "",
|
||||||
@ -10903,7 +10903,7 @@ func schema_k8sio_api_autoscaling_v2_CrossVersionObjectReference(ref common.Refe
|
|||||||
Properties: map[string]spec.Schema{
|
Properties: map[string]spec.Schema{
|
||||||
"kind": {
|
"kind": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
|
Description: "kind is the kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
|
||||||
Default: "",
|
Default: "",
|
||||||
Type: []string{"string"},
|
Type: []string{"string"},
|
||||||
Format: "",
|
Format: "",
|
||||||
@ -10911,7 +10911,7 @@ func schema_k8sio_api_autoscaling_v2_CrossVersionObjectReference(ref common.Refe
|
|||||||
},
|
},
|
||||||
"name": {
|
"name": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names",
|
Description: "name is the name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names",
|
||||||
Default: "",
|
Default: "",
|
||||||
Type: []string{"string"},
|
Type: []string{"string"},
|
||||||
Format: "",
|
Format: "",
|
||||||
@ -10919,7 +10919,7 @@ func schema_k8sio_api_autoscaling_v2_CrossVersionObjectReference(ref common.Refe
|
|||||||
},
|
},
|
||||||
"apiVersion": {
|
"apiVersion": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "API version of the referent",
|
Description: "apiVersion is the API version of the referent",
|
||||||
Type: []string{"string"},
|
Type: []string{"string"},
|
||||||
Format: "",
|
Format: "",
|
||||||
},
|
},
|
||||||
@ -11000,7 +11000,7 @@ func schema_k8sio_api_autoscaling_v2_HPAScalingPolicy(ref common.ReferenceCallba
|
|||||||
Properties: map[string]spec.Schema{
|
Properties: map[string]spec.Schema{
|
||||||
"type": {
|
"type": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "Type is used to specify the scaling policy.",
|
Description: "type is used to specify the scaling policy.",
|
||||||
Default: "",
|
Default: "",
|
||||||
Type: []string{"string"},
|
Type: []string{"string"},
|
||||||
Format: "",
|
Format: "",
|
||||||
@ -11008,7 +11008,7 @@ func schema_k8sio_api_autoscaling_v2_HPAScalingPolicy(ref common.ReferenceCallba
|
|||||||
},
|
},
|
||||||
"value": {
|
"value": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "Value contains the amount of change which is permitted by the policy. It must be greater than zero",
|
Description: "value contains the amount of change which is permitted by the policy. It must be greater than zero",
|
||||||
Default: 0,
|
Default: 0,
|
||||||
Type: []string{"integer"},
|
Type: []string{"integer"},
|
||||||
Format: "int32",
|
Format: "int32",
|
||||||
@ -11016,7 +11016,7 @@ func schema_k8sio_api_autoscaling_v2_HPAScalingPolicy(ref common.ReferenceCallba
|
|||||||
},
|
},
|
||||||
"periodSeconds": {
|
"periodSeconds": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "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).",
|
Description: "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).",
|
||||||
Default: 0,
|
Default: 0,
|
||||||
Type: []string{"integer"},
|
Type: []string{"integer"},
|
||||||
Format: "int32",
|
Format: "int32",
|
||||||
@ -11038,7 +11038,7 @@ func schema_k8sio_api_autoscaling_v2_HPAScalingRules(ref common.ReferenceCallbac
|
|||||||
Properties: map[string]spec.Schema{
|
Properties: map[string]spec.Schema{
|
||||||
"stabilizationWindowSeconds": {
|
"stabilizationWindowSeconds": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "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).",
|
Description: "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).",
|
||||||
Type: []string{"integer"},
|
Type: []string{"integer"},
|
||||||
Format: "int32",
|
Format: "int32",
|
||||||
},
|
},
|
||||||
@ -11797,7 +11797,7 @@ func schema_k8sio_api_autoscaling_v2_ResourceMetricStatus(ref common.ReferenceCa
|
|||||||
Properties: map[string]spec.Schema{
|
Properties: map[string]spec.Schema{
|
||||||
"name": {
|
"name": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "Name is the name of the resource in question.",
|
Description: "name is the name of the resource in question.",
|
||||||
Default: "",
|
Default: "",
|
||||||
Type: []string{"string"},
|
Type: []string{"string"},
|
||||||
Format: "",
|
Format: "",
|
||||||
@ -12716,7 +12716,7 @@ func schema_k8sio_api_autoscaling_v2beta2_ContainerResourceMetricStatus(ref comm
|
|||||||
Properties: map[string]spec.Schema{
|
Properties: map[string]spec.Schema{
|
||||||
"name": {
|
"name": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "Name is the name of the resource in question.",
|
Description: "name is the name of the resource in question.",
|
||||||
Default: "",
|
Default: "",
|
||||||
Type: []string{"string"},
|
Type: []string{"string"},
|
||||||
Format: "",
|
Format: "",
|
||||||
@ -12731,7 +12731,7 @@ func schema_k8sio_api_autoscaling_v2beta2_ContainerResourceMetricStatus(ref comm
|
|||||||
},
|
},
|
||||||
"container": {
|
"container": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "Container is the name of the container in the pods of the scaling target",
|
Description: "container is the name of the container in the pods of the scaling target",
|
||||||
Default: "",
|
Default: "",
|
||||||
Type: []string{"string"},
|
Type: []string{"string"},
|
||||||
Format: "",
|
Format: "",
|
||||||
@ -12755,7 +12755,7 @@ func schema_k8sio_api_autoscaling_v2beta2_CrossVersionObjectReference(ref common
|
|||||||
Properties: map[string]spec.Schema{
|
Properties: map[string]spec.Schema{
|
||||||
"kind": {
|
"kind": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
|
Description: "kind is the kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
|
||||||
Default: "",
|
Default: "",
|
||||||
Type: []string{"string"},
|
Type: []string{"string"},
|
||||||
Format: "",
|
Format: "",
|
||||||
@ -12763,7 +12763,7 @@ func schema_k8sio_api_autoscaling_v2beta2_CrossVersionObjectReference(ref common
|
|||||||
},
|
},
|
||||||
"name": {
|
"name": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names",
|
Description: "name is the name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names",
|
||||||
Default: "",
|
Default: "",
|
||||||
Type: []string{"string"},
|
Type: []string{"string"},
|
||||||
Format: "",
|
Format: "",
|
||||||
@ -12771,7 +12771,7 @@ func schema_k8sio_api_autoscaling_v2beta2_CrossVersionObjectReference(ref common
|
|||||||
},
|
},
|
||||||
"apiVersion": {
|
"apiVersion": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "API version of the referent",
|
Description: "apiVersion is the API version of the referent",
|
||||||
Type: []string{"string"},
|
Type: []string{"string"},
|
||||||
Format: "",
|
Format: "",
|
||||||
},
|
},
|
||||||
@ -12852,7 +12852,7 @@ func schema_k8sio_api_autoscaling_v2beta2_HPAScalingPolicy(ref common.ReferenceC
|
|||||||
Properties: map[string]spec.Schema{
|
Properties: map[string]spec.Schema{
|
||||||
"type": {
|
"type": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "Type is used to specify the scaling policy.",
|
Description: "type is used to specify the scaling policy.",
|
||||||
Default: "",
|
Default: "",
|
||||||
Type: []string{"string"},
|
Type: []string{"string"},
|
||||||
Format: "",
|
Format: "",
|
||||||
@ -12860,7 +12860,7 @@ func schema_k8sio_api_autoscaling_v2beta2_HPAScalingPolicy(ref common.ReferenceC
|
|||||||
},
|
},
|
||||||
"value": {
|
"value": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "Value contains the amount of change which is permitted by the policy. It must be greater than zero",
|
Description: "value contains the amount of change which is permitted by the policy. It must be greater than zero",
|
||||||
Default: 0,
|
Default: 0,
|
||||||
Type: []string{"integer"},
|
Type: []string{"integer"},
|
||||||
Format: "int32",
|
Format: "int32",
|
||||||
@ -12868,7 +12868,7 @@ func schema_k8sio_api_autoscaling_v2beta2_HPAScalingPolicy(ref common.ReferenceC
|
|||||||
},
|
},
|
||||||
"periodSeconds": {
|
"periodSeconds": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "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).",
|
Description: "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).",
|
||||||
Default: 0,
|
Default: 0,
|
||||||
Type: []string{"integer"},
|
Type: []string{"integer"},
|
||||||
Format: "int32",
|
Format: "int32",
|
||||||
@ -12890,7 +12890,7 @@ func schema_k8sio_api_autoscaling_v2beta2_HPAScalingRules(ref common.ReferenceCa
|
|||||||
Properties: map[string]spec.Schema{
|
Properties: map[string]spec.Schema{
|
||||||
"stabilizationWindowSeconds": {
|
"stabilizationWindowSeconds": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "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).",
|
Description: "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).",
|
||||||
Type: []string{"integer"},
|
Type: []string{"integer"},
|
||||||
Format: "int32",
|
Format: "int32",
|
||||||
},
|
},
|
||||||
@ -13355,7 +13355,7 @@ func schema_k8sio_api_autoscaling_v2beta2_MetricStatus(ref common.ReferenceCallb
|
|||||||
},
|
},
|
||||||
"containerResource": {
|
"containerResource": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "container resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in 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.",
|
Description: "containerResource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in 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.",
|
||||||
Ref: ref("k8s.io/api/autoscaling/v2beta2.ContainerResourceMetricStatus"),
|
Ref: ref("k8s.io/api/autoscaling/v2beta2.ContainerResourceMetricStatus"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -13438,7 +13438,7 @@ func schema_k8sio_api_autoscaling_v2beta2_MetricValueStatus(ref common.Reference
|
|||||||
},
|
},
|
||||||
"averageUtilization": {
|
"averageUtilization": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "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.",
|
Description: "averageUtilization 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.",
|
||||||
Type: []string{"integer"},
|
Type: []string{"integer"},
|
||||||
Format: "int32",
|
Format: "int32",
|
||||||
},
|
},
|
||||||
@ -13623,7 +13623,7 @@ func schema_k8sio_api_autoscaling_v2beta2_ResourceMetricStatus(ref common.Refere
|
|||||||
Properties: map[string]spec.Schema{
|
Properties: map[string]spec.Schema{
|
||||||
"name": {
|
"name": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "Name is the name of the resource in question.",
|
Description: "name is the name of the resource in question.",
|
||||||
Default: "",
|
Default: "",
|
||||||
Type: []string{"string"},
|
Type: []string{"string"},
|
||||||
Format: "",
|
Format: "",
|
||||||
|
@ -87,13 +87,13 @@ message ContainerResourceMetricStatus {
|
|||||||
// CrossVersionObjectReference contains enough information to let you identify the referred resource.
|
// CrossVersionObjectReference contains enough information to let you identify the referred resource.
|
||||||
// +structType=atomic
|
// +structType=atomic
|
||||||
message CrossVersionObjectReference {
|
message CrossVersionObjectReference {
|
||||||
// Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
// kind is the kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||||
optional string kind = 1;
|
optional string kind = 1;
|
||||||
|
|
||||||
// Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names
|
// name is the name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names
|
||||||
optional string name = 2;
|
optional string name = 2;
|
||||||
|
|
||||||
// API version of the referent
|
// apiVersion is the API version of the referent
|
||||||
// +optional
|
// +optional
|
||||||
optional string apiVersion = 3;
|
optional string apiVersion = 3;
|
||||||
}
|
}
|
||||||
@ -147,11 +147,11 @@ message HorizontalPodAutoscaler {
|
|||||||
// +optional
|
// +optional
|
||||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
|
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
|
||||||
|
|
||||||
// behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
|
// spec defines the behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
|
||||||
// +optional
|
// +optional
|
||||||
optional HorizontalPodAutoscalerSpec spec = 2;
|
optional HorizontalPodAutoscalerSpec spec = 2;
|
||||||
|
|
||||||
// current information about the autoscaler.
|
// status is the current information about the autoscaler.
|
||||||
// +optional
|
// +optional
|
||||||
optional HorizontalPodAutoscalerStatus status = 3;
|
optional HorizontalPodAutoscalerStatus status = 3;
|
||||||
}
|
}
|
||||||
@ -186,7 +186,7 @@ message HorizontalPodAutoscalerList {
|
|||||||
// +optional
|
// +optional
|
||||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
|
optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
|
||||||
|
|
||||||
// list of horizontal pod autoscaler objects.
|
// items is the list of horizontal pod autoscaler objects.
|
||||||
repeated HorizontalPodAutoscaler items = 2;
|
repeated HorizontalPodAutoscaler items = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -204,10 +204,10 @@ message HorizontalPodAutoscalerSpec {
|
|||||||
// +optional
|
// +optional
|
||||||
optional int32 minReplicas = 2;
|
optional int32 minReplicas = 2;
|
||||||
|
|
||||||
// upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.
|
// maxReplicas is the upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.
|
||||||
optional int32 maxReplicas = 3;
|
optional int32 maxReplicas = 3;
|
||||||
|
|
||||||
// target average CPU utilization (represented as a percentage of requested CPU) over all the pods;
|
// targetCPUUtilizationPercentage is the target average CPU utilization (represented as a percentage of requested CPU) over all the pods;
|
||||||
// if not specified the default autoscaling policy will be used.
|
// if not specified the default autoscaling policy will be used.
|
||||||
// +optional
|
// +optional
|
||||||
optional int32 targetCPUUtilizationPercentage = 4;
|
optional int32 targetCPUUtilizationPercentage = 4;
|
||||||
@ -215,22 +215,22 @@ message HorizontalPodAutoscalerSpec {
|
|||||||
|
|
||||||
// current status of a horizontal pod autoscaler
|
// current status of a horizontal pod autoscaler
|
||||||
message HorizontalPodAutoscalerStatus {
|
message HorizontalPodAutoscalerStatus {
|
||||||
// most recent generation observed by this autoscaler.
|
// observedGeneration is the most recent generation observed by this autoscaler.
|
||||||
// +optional
|
// +optional
|
||||||
optional int64 observedGeneration = 1;
|
optional int64 observedGeneration = 1;
|
||||||
|
|
||||||
// last time the HorizontalPodAutoscaler scaled the number of pods;
|
// 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.
|
// used by the autoscaler to control how often the number of pods is changed.
|
||||||
// +optional
|
// +optional
|
||||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastScaleTime = 2;
|
optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastScaleTime = 2;
|
||||||
|
|
||||||
// current number of replicas of pods managed by this autoscaler.
|
// currentReplicas is the current number of replicas of pods managed by this autoscaler.
|
||||||
optional int32 currentReplicas = 3;
|
optional int32 currentReplicas = 3;
|
||||||
|
|
||||||
// desired number of replicas of pods managed by this autoscaler.
|
// desiredReplicas is the desired number of replicas of pods managed by this autoscaler.
|
||||||
optional int32 desiredReplicas = 4;
|
optional int32 desiredReplicas = 4;
|
||||||
|
|
||||||
// current average CPU utilization over all pods, represented as a percentage of requested CPU,
|
// currentCPUUtilizationPercentage is the current average CPU utilization over all pods, represented as a percentage of requested CPU,
|
||||||
// e.g. 70 means that an average pod is using now 70% of its requested CPU.
|
// e.g. 70 means that an average pod is using now 70% of its requested CPU.
|
||||||
// +optional
|
// +optional
|
||||||
optional int32 currentCPUUtilizationPercentage = 5;
|
optional int32 currentCPUUtilizationPercentage = 5;
|
||||||
@ -264,7 +264,7 @@ message MetricSpec {
|
|||||||
// +optional
|
// +optional
|
||||||
optional ResourceMetricSource resource = 4;
|
optional ResourceMetricSource resource = 4;
|
||||||
|
|
||||||
// container resource refers to a resource metric (such as those specified in
|
// containerResource refers to a resource metric (such as those specified in
|
||||||
// requests and limits) known to Kubernetes describing a single container in each pod of the
|
// requests and limits) known to Kubernetes describing a single container in each pod of the
|
||||||
// current scale target (e.g. CPU or memory). Such metrics are built in to
|
// 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
|
// Kubernetes, and have special scaling options on top of those available
|
||||||
@ -309,7 +309,7 @@ message MetricStatus {
|
|||||||
// +optional
|
// +optional
|
||||||
optional ResourceMetricStatus resource = 4;
|
optional ResourceMetricStatus resource = 4;
|
||||||
|
|
||||||
// container resource refers to a resource metric (such as those specified in
|
// containerResource refers to a resource metric (such as those specified in
|
||||||
// requests and limits) known to Kubernetes describing a single container in each pod in the
|
// requests and limits) known to Kubernetes describing a single container in each pod in the
|
||||||
// current scale target (e.g. CPU or memory). Such metrics are built in to
|
// 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
|
// Kubernetes, and have special scaling options on top of those available
|
||||||
@ -464,28 +464,28 @@ message Scale {
|
|||||||
// +optional
|
// +optional
|
||||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
|
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
|
||||||
|
|
||||||
// defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
|
// spec defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
|
||||||
// +optional
|
// +optional
|
||||||
optional ScaleSpec spec = 2;
|
optional ScaleSpec spec = 2;
|
||||||
|
|
||||||
// current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only.
|
// status is the current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only.
|
||||||
// +optional
|
// +optional
|
||||||
optional ScaleStatus status = 3;
|
optional ScaleStatus status = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ScaleSpec describes the attributes of a scale subresource.
|
// ScaleSpec describes the attributes of a scale subresource.
|
||||||
message ScaleSpec {
|
message ScaleSpec {
|
||||||
// desired number of instances for the scaled object.
|
// replicas is the desired number of instances for the scaled object.
|
||||||
// +optional
|
// +optional
|
||||||
optional int32 replicas = 1;
|
optional int32 replicas = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ScaleStatus represents the current status of a scale subresource.
|
// ScaleStatus represents the current status of a scale subresource.
|
||||||
message ScaleStatus {
|
message ScaleStatus {
|
||||||
// actual number of observed instances of the scaled object.
|
// replicas is the actual number of observed instances of the scaled object.
|
||||||
optional int32 replicas = 1;
|
optional int32 replicas = 1;
|
||||||
|
|
||||||
// label query over pods that should match the replicas count. This is same
|
// selector is the label query over pods that should match the replicas count. This is same
|
||||||
// as the label selector but in the string format to avoid introspection
|
// as the label selector but in the string format to avoid introspection
|
||||||
// by clients. The string will be in the same format as the query-param syntax.
|
// by clients. The string will be in the same format as the query-param syntax.
|
||||||
// More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors
|
// More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors
|
||||||
|
@ -25,11 +25,13 @@ import (
|
|||||||
// CrossVersionObjectReference contains enough information to let you identify the referred resource.
|
// CrossVersionObjectReference contains enough information to let you identify the referred resource.
|
||||||
// +structType=atomic
|
// +structType=atomic
|
||||||
type CrossVersionObjectReference struct {
|
type CrossVersionObjectReference struct {
|
||||||
// Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
// kind is the kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||||
Kind string `json:"kind" protobuf:"bytes,1,opt,name=kind"`
|
Kind string `json:"kind" protobuf:"bytes,1,opt,name=kind"`
|
||||||
// Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names
|
|
||||||
|
// name is the name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names
|
||||||
Name string `json:"name" protobuf:"bytes,2,opt,name=name"`
|
Name string `json:"name" protobuf:"bytes,2,opt,name=name"`
|
||||||
// API version of the referent
|
|
||||||
|
// apiVersion is the API version of the referent
|
||||||
// +optional
|
// +optional
|
||||||
APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,3,opt,name=apiVersion"`
|
APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,3,opt,name=apiVersion"`
|
||||||
}
|
}
|
||||||
@ -46,9 +48,11 @@ type HorizontalPodAutoscalerSpec struct {
|
|||||||
// available.
|
// available.
|
||||||
// +optional
|
// +optional
|
||||||
MinReplicas *int32 `json:"minReplicas,omitempty" protobuf:"varint,2,opt,name=minReplicas"`
|
MinReplicas *int32 `json:"minReplicas,omitempty" protobuf:"varint,2,opt,name=minReplicas"`
|
||||||
// upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.
|
|
||||||
|
// maxReplicas is the upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.
|
||||||
MaxReplicas int32 `json:"maxReplicas" protobuf:"varint,3,opt,name=maxReplicas"`
|
MaxReplicas int32 `json:"maxReplicas" protobuf:"varint,3,opt,name=maxReplicas"`
|
||||||
// target average CPU utilization (represented as a percentage of requested CPU) over all the pods;
|
|
||||||
|
// targetCPUUtilizationPercentage is the target average CPU utilization (represented as a percentage of requested CPU) over all the pods;
|
||||||
// if not specified the default autoscaling policy will be used.
|
// if not specified the default autoscaling policy will be used.
|
||||||
// +optional
|
// +optional
|
||||||
TargetCPUUtilizationPercentage *int32 `json:"targetCPUUtilizationPercentage,omitempty" protobuf:"varint,4,opt,name=targetCPUUtilizationPercentage"`
|
TargetCPUUtilizationPercentage *int32 `json:"targetCPUUtilizationPercentage,omitempty" protobuf:"varint,4,opt,name=targetCPUUtilizationPercentage"`
|
||||||
@ -56,22 +60,22 @@ type HorizontalPodAutoscalerSpec struct {
|
|||||||
|
|
||||||
// current status of a horizontal pod autoscaler
|
// current status of a horizontal pod autoscaler
|
||||||
type HorizontalPodAutoscalerStatus struct {
|
type HorizontalPodAutoscalerStatus struct {
|
||||||
// most recent generation observed by this autoscaler.
|
// observedGeneration is the most recent generation observed by this autoscaler.
|
||||||
// +optional
|
// +optional
|
||||||
ObservedGeneration *int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"`
|
ObservedGeneration *int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"`
|
||||||
|
|
||||||
// last time the HorizontalPodAutoscaler scaled the number of pods;
|
// 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.
|
// used by the autoscaler to control how often the number of pods is changed.
|
||||||
// +optional
|
// +optional
|
||||||
LastScaleTime *metav1.Time `json:"lastScaleTime,omitempty" protobuf:"bytes,2,opt,name=lastScaleTime"`
|
LastScaleTime *metav1.Time `json:"lastScaleTime,omitempty" protobuf:"bytes,2,opt,name=lastScaleTime"`
|
||||||
|
|
||||||
// current number of replicas of pods managed by this autoscaler.
|
// currentReplicas is the current number of replicas of pods managed by this autoscaler.
|
||||||
CurrentReplicas int32 `json:"currentReplicas" protobuf:"varint,3,opt,name=currentReplicas"`
|
CurrentReplicas int32 `json:"currentReplicas" protobuf:"varint,3,opt,name=currentReplicas"`
|
||||||
|
|
||||||
// desired number of replicas of pods managed by this autoscaler.
|
// desiredReplicas is the desired number of replicas of pods managed by this autoscaler.
|
||||||
DesiredReplicas int32 `json:"desiredReplicas" protobuf:"varint,4,opt,name=desiredReplicas"`
|
DesiredReplicas int32 `json:"desiredReplicas" protobuf:"varint,4,opt,name=desiredReplicas"`
|
||||||
|
|
||||||
// current average CPU utilization over all pods, represented as a percentage of requested CPU,
|
// currentCPUUtilizationPercentage is the current average CPU utilization over all pods, represented as a percentage of requested CPU,
|
||||||
// e.g. 70 means that an average pod is using now 70% of its requested CPU.
|
// e.g. 70 means that an average pod is using now 70% of its requested CPU.
|
||||||
// +optional
|
// +optional
|
||||||
CurrentCPUUtilizationPercentage *int32 `json:"currentCPUUtilizationPercentage,omitempty" protobuf:"varint,5,opt,name=currentCPUUtilizationPercentage"`
|
CurrentCPUUtilizationPercentage *int32 `json:"currentCPUUtilizationPercentage,omitempty" protobuf:"varint,5,opt,name=currentCPUUtilizationPercentage"`
|
||||||
@ -87,11 +91,11 @@ type HorizontalPodAutoscaler struct {
|
|||||||
// +optional
|
// +optional
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
|
// spec defines the behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
|
||||||
// +optional
|
// +optional
|
||||||
Spec HorizontalPodAutoscalerSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
|
Spec HorizontalPodAutoscalerSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
|
||||||
|
|
||||||
// current information about the autoscaler.
|
// status is the current information about the autoscaler.
|
||||||
// +optional
|
// +optional
|
||||||
Status HorizontalPodAutoscalerStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
Status HorizontalPodAutoscalerStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
||||||
}
|
}
|
||||||
@ -105,7 +109,7 @@ type HorizontalPodAutoscalerList struct {
|
|||||||
// +optional
|
// +optional
|
||||||
metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// list of horizontal pod autoscaler objects.
|
// items is the list of horizontal pod autoscaler objects.
|
||||||
Items []HorizontalPodAutoscaler `json:"items" protobuf:"bytes,2,rep,name=items"`
|
Items []HorizontalPodAutoscaler `json:"items" protobuf:"bytes,2,rep,name=items"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -118,28 +122,28 @@ type Scale struct {
|
|||||||
// +optional
|
// +optional
|
||||||
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||||
|
|
||||||
// defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
|
// spec defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
|
||||||
// +optional
|
// +optional
|
||||||
Spec ScaleSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
|
Spec ScaleSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
|
||||||
|
|
||||||
// current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only.
|
// status is the current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only.
|
||||||
// +optional
|
// +optional
|
||||||
Status ScaleStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
Status ScaleStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// ScaleSpec describes the attributes of a scale subresource.
|
// ScaleSpec describes the attributes of a scale subresource.
|
||||||
type ScaleSpec struct {
|
type ScaleSpec struct {
|
||||||
// desired number of instances for the scaled object.
|
// replicas is the desired number of instances for the scaled object.
|
||||||
// +optional
|
// +optional
|
||||||
Replicas int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`
|
Replicas int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// ScaleStatus represents the current status of a scale subresource.
|
// ScaleStatus represents the current status of a scale subresource.
|
||||||
type ScaleStatus struct {
|
type ScaleStatus struct {
|
||||||
// actual number of observed instances of the scaled object.
|
// replicas is the actual number of observed instances of the scaled object.
|
||||||
Replicas int32 `json:"replicas" protobuf:"varint,1,opt,name=replicas"`
|
Replicas int32 `json:"replicas" protobuf:"varint,1,opt,name=replicas"`
|
||||||
|
|
||||||
// label query over pods that should match the replicas count. This is same
|
// selector is the label query over pods that should match the replicas count. This is same
|
||||||
// as the label selector but in the string format to avoid introspection
|
// as the label selector but in the string format to avoid introspection
|
||||||
// by clients. The string will be in the same format as the query-param syntax.
|
// by clients. The string will be in the same format as the query-param syntax.
|
||||||
// More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors
|
// More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors
|
||||||
@ -194,11 +198,13 @@ type MetricSpec struct {
|
|||||||
// (for example, hits-per-second on an Ingress object).
|
// (for example, hits-per-second on an Ingress object).
|
||||||
// +optional
|
// +optional
|
||||||
Object *ObjectMetricSource `json:"object,omitempty" protobuf:"bytes,2,opt,name=object"`
|
Object *ObjectMetricSource `json:"object,omitempty" protobuf:"bytes,2,opt,name=object"`
|
||||||
|
|
||||||
// pods refers to a metric describing each pod in the current scale target
|
// pods refers to a metric describing each pod in the current scale target
|
||||||
// (for example, transactions-processed-per-second). The values will be
|
// (for example, transactions-processed-per-second). The values will be
|
||||||
// averaged together before being compared to the target value.
|
// averaged together before being compared to the target value.
|
||||||
// +optional
|
// +optional
|
||||||
Pods *PodsMetricSource `json:"pods,omitempty" protobuf:"bytes,3,opt,name=pods"`
|
Pods *PodsMetricSource `json:"pods,omitempty" protobuf:"bytes,3,opt,name=pods"`
|
||||||
|
|
||||||
// resource refers to a resource metric (such as those specified in
|
// resource refers to a resource metric (such as those specified in
|
||||||
// requests and limits) known to Kubernetes describing each pod in the
|
// 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
|
// current scale target (e.g. CPU or memory). Such metrics are built in to
|
||||||
@ -206,7 +212,8 @@ type MetricSpec struct {
|
|||||||
// to normal per-pod metrics using the "pods" source.
|
// to normal per-pod metrics using the "pods" source.
|
||||||
// +optional
|
// +optional
|
||||||
Resource *ResourceMetricSource `json:"resource,omitempty" protobuf:"bytes,4,opt,name=resource"`
|
Resource *ResourceMetricSource `json:"resource,omitempty" protobuf:"bytes,4,opt,name=resource"`
|
||||||
// container resource refers to a resource metric (such as those specified in
|
|
||||||
|
// containerResource refers to a resource metric (such as those specified in
|
||||||
// requests and limits) known to Kubernetes describing a single container in each pod of the
|
// requests and limits) known to Kubernetes describing a single container in each pod of the
|
||||||
// current scale target (e.g. CPU or memory). Such metrics are built in to
|
// 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
|
// Kubernetes, and have special scaling options on top of those available
|
||||||
@ -214,6 +221,7 @@ type MetricSpec struct {
|
|||||||
// This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag.
|
// This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag.
|
||||||
// +optional
|
// +optional
|
||||||
ContainerResource *ContainerResourceMetricSource `json:"containerResource,omitempty" protobuf:"bytes,7,opt,name=containerResource"`
|
ContainerResource *ContainerResourceMetricSource `json:"containerResource,omitempty" protobuf:"bytes,7,opt,name=containerResource"`
|
||||||
|
|
||||||
// external refers to a global metric that is not associated
|
// external refers to a global metric that is not associated
|
||||||
// with any Kubernetes object. It allows autoscaling based on information
|
// with any Kubernetes object. It allows autoscaling based on information
|
||||||
// coming from components running outside of cluster
|
// coming from components running outside of cluster
|
||||||
@ -231,6 +239,7 @@ type ObjectMetricSource struct {
|
|||||||
|
|
||||||
// metricName is the name of the metric in question.
|
// metricName is the name of the metric in question.
|
||||||
MetricName string `json:"metricName" protobuf:"bytes,2,name=metricName"`
|
MetricName string `json:"metricName" protobuf:"bytes,2,name=metricName"`
|
||||||
|
|
||||||
// targetValue is the target value of the metric (as a quantity).
|
// targetValue is the target value of the metric (as a quantity).
|
||||||
TargetValue resource.Quantity `json:"targetValue" protobuf:"bytes,3,name=targetValue"`
|
TargetValue resource.Quantity `json:"targetValue" protobuf:"bytes,3,name=targetValue"`
|
||||||
|
|
||||||
@ -239,6 +248,7 @@ type ObjectMetricSource struct {
|
|||||||
// When unset, just the metricName will be used to gather metrics.
|
// When unset, just the metricName will be used to gather metrics.
|
||||||
// +optional
|
// +optional
|
||||||
Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,4,name=selector"`
|
Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,4,name=selector"`
|
||||||
|
|
||||||
// averageValue is the target value of the average of the
|
// averageValue is the target value of the average of the
|
||||||
// metric across all relevant pods (as a quantity)
|
// metric across all relevant pods (as a quantity)
|
||||||
// +optional
|
// +optional
|
||||||
@ -252,6 +262,7 @@ type ObjectMetricSource struct {
|
|||||||
type PodsMetricSource struct {
|
type PodsMetricSource struct {
|
||||||
// metricName is the name of the metric in question
|
// metricName is the name of the metric in question
|
||||||
MetricName string `json:"metricName" protobuf:"bytes,1,name=metricName"`
|
MetricName string `json:"metricName" protobuf:"bytes,1,name=metricName"`
|
||||||
|
|
||||||
// targetAverageValue is the target value of the average of the
|
// targetAverageValue is the target value of the average of the
|
||||||
// metric across all relevant pods (as a quantity)
|
// metric across all relevant pods (as a quantity)
|
||||||
TargetAverageValue resource.Quantity `json:"targetAverageValue" protobuf:"bytes,2,name=targetAverageValue"`
|
TargetAverageValue resource.Quantity `json:"targetAverageValue" protobuf:"bytes,2,name=targetAverageValue"`
|
||||||
@ -273,11 +284,13 @@ type PodsMetricSource struct {
|
|||||||
type ResourceMetricSource struct {
|
type ResourceMetricSource struct {
|
||||||
// name is the name of the resource in question.
|
// name is the name of the resource in question.
|
||||||
Name v1.ResourceName `json:"name" protobuf:"bytes,1,name=name"`
|
Name v1.ResourceName `json:"name" protobuf:"bytes,1,name=name"`
|
||||||
|
|
||||||
// targetAverageUtilization is the target value of the average of the
|
// targetAverageUtilization is the target value of the average of the
|
||||||
// resource metric across all relevant pods, represented as a percentage of
|
// resource metric across all relevant pods, represented as a percentage of
|
||||||
// the requested value of the resource for the pods.
|
// the requested value of the resource for the pods.
|
||||||
// +optional
|
// +optional
|
||||||
TargetAverageUtilization *int32 `json:"targetAverageUtilization,omitempty" protobuf:"varint,2,opt,name=targetAverageUtilization"`
|
TargetAverageUtilization *int32 `json:"targetAverageUtilization,omitempty" protobuf:"varint,2,opt,name=targetAverageUtilization"`
|
||||||
|
|
||||||
// targetAverageValue is the target value of the average of the
|
// targetAverageValue is the target value of the average of the
|
||||||
// resource metric across all relevant pods, as a raw value (instead of as
|
// resource metric across all relevant pods, as a raw value (instead of as
|
||||||
// a percentage of the request), similar to the "pods" metric source type.
|
// a percentage of the request), similar to the "pods" metric source type.
|
||||||
@ -295,16 +308,19 @@ type ResourceMetricSource struct {
|
|||||||
type ContainerResourceMetricSource struct {
|
type ContainerResourceMetricSource struct {
|
||||||
// name is the name of the resource in question.
|
// name is the name of the resource in question.
|
||||||
Name v1.ResourceName `json:"name" protobuf:"bytes,1,name=name"`
|
Name v1.ResourceName `json:"name" protobuf:"bytes,1,name=name"`
|
||||||
|
|
||||||
// targetAverageUtilization is the target value of the average of the
|
// targetAverageUtilization is the target value of the average of the
|
||||||
// resource metric across all relevant pods, represented as a percentage of
|
// resource metric across all relevant pods, represented as a percentage of
|
||||||
// the requested value of the resource for the pods.
|
// the requested value of the resource for the pods.
|
||||||
// +optional
|
// +optional
|
||||||
TargetAverageUtilization *int32 `json:"targetAverageUtilization,omitempty" protobuf:"varint,2,opt,name=targetAverageUtilization"`
|
TargetAverageUtilization *int32 `json:"targetAverageUtilization,omitempty" protobuf:"varint,2,opt,name=targetAverageUtilization"`
|
||||||
|
|
||||||
// targetAverageValue is the target value of the average of the
|
// targetAverageValue is the target value of the average of the
|
||||||
// resource metric across all relevant pods, as a raw value (instead of as
|
// resource metric across all relevant pods, as a raw value (instead of as
|
||||||
// a percentage of the request), similar to the "pods" metric source type.
|
// a percentage of the request), similar to the "pods" metric source type.
|
||||||
// +optional
|
// +optional
|
||||||
TargetAverageValue *resource.Quantity `json:"targetAverageValue,omitempty" protobuf:"bytes,3,opt,name=targetAverageValue"`
|
TargetAverageValue *resource.Quantity `json:"targetAverageValue,omitempty" protobuf:"bytes,3,opt,name=targetAverageValue"`
|
||||||
|
|
||||||
// container is the name of the container in the pods of the scaling target.
|
// container is the name of the container in the pods of the scaling target.
|
||||||
Container string `json:"container" protobuf:"bytes,5,opt,name=container"`
|
Container string `json:"container" protobuf:"bytes,5,opt,name=container"`
|
||||||
}
|
}
|
||||||
@ -315,14 +331,17 @@ type ContainerResourceMetricSource struct {
|
|||||||
type ExternalMetricSource struct {
|
type ExternalMetricSource struct {
|
||||||
// metricName is the name of the metric in question.
|
// metricName is the name of the metric in question.
|
||||||
MetricName string `json:"metricName" protobuf:"bytes,1,name=metricName"`
|
MetricName string `json:"metricName" protobuf:"bytes,1,name=metricName"`
|
||||||
|
|
||||||
// metricSelector is used to identify a specific time series
|
// metricSelector is used to identify a specific time series
|
||||||
// within a given metric.
|
// within a given metric.
|
||||||
// +optional
|
// +optional
|
||||||
MetricSelector *metav1.LabelSelector `json:"metricSelector,omitempty" protobuf:"bytes,2,opt,name=metricSelector"`
|
MetricSelector *metav1.LabelSelector `json:"metricSelector,omitempty" protobuf:"bytes,2,opt,name=metricSelector"`
|
||||||
|
|
||||||
// targetValue is the target value of the metric (as a quantity).
|
// targetValue is the target value of the metric (as a quantity).
|
||||||
// Mutually exclusive with TargetAverageValue.
|
// Mutually exclusive with TargetAverageValue.
|
||||||
// +optional
|
// +optional
|
||||||
TargetValue *resource.Quantity `json:"targetValue,omitempty" protobuf:"bytes,3,opt,name=targetValue"`
|
TargetValue *resource.Quantity `json:"targetValue,omitempty" protobuf:"bytes,3,opt,name=targetValue"`
|
||||||
|
|
||||||
// targetAverageValue is the target per-pod value of global metric (as a quantity).
|
// targetAverageValue is the target per-pod value of global metric (as a quantity).
|
||||||
// Mutually exclusive with TargetValue.
|
// Mutually exclusive with TargetValue.
|
||||||
// +optional
|
// +optional
|
||||||
@ -341,11 +360,13 @@ type MetricStatus struct {
|
|||||||
// (for example, hits-per-second on an Ingress object).
|
// (for example, hits-per-second on an Ingress object).
|
||||||
// +optional
|
// +optional
|
||||||
Object *ObjectMetricStatus `json:"object,omitempty" protobuf:"bytes,2,opt,name=object"`
|
Object *ObjectMetricStatus `json:"object,omitempty" protobuf:"bytes,2,opt,name=object"`
|
||||||
|
|
||||||
// pods refers to a metric describing each pod in the current scale target
|
// pods refers to a metric describing each pod in the current scale target
|
||||||
// (for example, transactions-processed-per-second). The values will be
|
// (for example, transactions-processed-per-second). The values will be
|
||||||
// averaged together before being compared to the target value.
|
// averaged together before being compared to the target value.
|
||||||
// +optional
|
// +optional
|
||||||
Pods *PodsMetricStatus `json:"pods,omitempty" protobuf:"bytes,3,opt,name=pods"`
|
Pods *PodsMetricStatus `json:"pods,omitempty" protobuf:"bytes,3,opt,name=pods"`
|
||||||
|
|
||||||
// resource refers to a resource metric (such as those specified in
|
// resource refers to a resource metric (such as those specified in
|
||||||
// requests and limits) known to Kubernetes describing each pod in the
|
// 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
|
// current scale target (e.g. CPU or memory). Such metrics are built in to
|
||||||
@ -353,13 +374,15 @@ type MetricStatus struct {
|
|||||||
// to normal per-pod metrics using the "pods" source.
|
// to normal per-pod metrics using the "pods" source.
|
||||||
// +optional
|
// +optional
|
||||||
Resource *ResourceMetricStatus `json:"resource,omitempty" protobuf:"bytes,4,opt,name=resource"`
|
Resource *ResourceMetricStatus `json:"resource,omitempty" protobuf:"bytes,4,opt,name=resource"`
|
||||||
// container resource refers to a resource metric (such as those specified in
|
|
||||||
|
// containerResource refers to a resource metric (such as those specified in
|
||||||
// requests and limits) known to Kubernetes describing a single container in each pod in the
|
// requests and limits) known to Kubernetes describing a single container in each pod in the
|
||||||
// current scale target (e.g. CPU or memory). Such metrics are built in to
|
// 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
|
// Kubernetes, and have special scaling options on top of those available
|
||||||
// to normal per-pod metrics using the "pods" source.
|
// to normal per-pod metrics using the "pods" source.
|
||||||
// +optional
|
// +optional
|
||||||
ContainerResource *ContainerResourceMetricStatus `json:"containerResource,omitempty" protobuf:"bytes,7,opt,name=containerResource"`
|
ContainerResource *ContainerResourceMetricStatus `json:"containerResource,omitempty" protobuf:"bytes,7,opt,name=containerResource"`
|
||||||
|
|
||||||
// external refers to a global metric that is not associated
|
// external refers to a global metric that is not associated
|
||||||
// with any Kubernetes object. It allows autoscaling based on information
|
// with any Kubernetes object. It allows autoscaling based on information
|
||||||
// coming from components running outside of cluster
|
// coming from components running outside of cluster
|
||||||
@ -390,15 +413,19 @@ const (
|
|||||||
type HorizontalPodAutoscalerCondition struct {
|
type HorizontalPodAutoscalerCondition struct {
|
||||||
// type describes the current condition
|
// type describes the current condition
|
||||||
Type HorizontalPodAutoscalerConditionType `json:"type" protobuf:"bytes,1,name=type"`
|
Type HorizontalPodAutoscalerConditionType `json:"type" protobuf:"bytes,1,name=type"`
|
||||||
|
|
||||||
// status is the status of the condition (True, False, Unknown)
|
// status is the status of the condition (True, False, Unknown)
|
||||||
Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,name=status"`
|
Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,name=status"`
|
||||||
|
|
||||||
// lastTransitionTime is the last time the condition transitioned from
|
// lastTransitionTime is the last time the condition transitioned from
|
||||||
// one status to another
|
// one status to another
|
||||||
// +optional
|
// +optional
|
||||||
LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,3,opt,name=lastTransitionTime"`
|
LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,3,opt,name=lastTransitionTime"`
|
||||||
|
|
||||||
// reason is the reason for the condition's last transition.
|
// reason is the reason for the condition's last transition.
|
||||||
// +optional
|
// +optional
|
||||||
Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"`
|
Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"`
|
||||||
|
|
||||||
// message is a human-readable explanation containing details about
|
// message is a human-readable explanation containing details about
|
||||||
// the transition
|
// the transition
|
||||||
// +optional
|
// +optional
|
||||||
@ -413,6 +440,7 @@ type ObjectMetricStatus struct {
|
|||||||
|
|
||||||
// metricName is the name of the metric in question.
|
// metricName is the name of the metric in question.
|
||||||
MetricName string `json:"metricName" protobuf:"bytes,2,name=metricName"`
|
MetricName string `json:"metricName" protobuf:"bytes,2,name=metricName"`
|
||||||
|
|
||||||
// currentValue is the current value of the metric (as a quantity).
|
// currentValue is the current value of the metric (as a quantity).
|
||||||
CurrentValue resource.Quantity `json:"currentValue" protobuf:"bytes,3,name=currentValue"`
|
CurrentValue resource.Quantity `json:"currentValue" protobuf:"bytes,3,name=currentValue"`
|
||||||
|
|
||||||
@ -421,6 +449,7 @@ type ObjectMetricStatus struct {
|
|||||||
// When unset, just the metricName will be used to gather metrics.
|
// When unset, just the metricName will be used to gather metrics.
|
||||||
// +optional
|
// +optional
|
||||||
Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,4,name=selector"`
|
Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,4,name=selector"`
|
||||||
|
|
||||||
// averageValue is the current value of the average of the
|
// averageValue is the current value of the average of the
|
||||||
// metric across all relevant pods (as a quantity)
|
// metric across all relevant pods (as a quantity)
|
||||||
// +optional
|
// +optional
|
||||||
@ -432,6 +461,7 @@ type ObjectMetricStatus struct {
|
|||||||
type PodsMetricStatus struct {
|
type PodsMetricStatus struct {
|
||||||
// metricName is the name of the metric in question
|
// metricName is the name of the metric in question
|
||||||
MetricName string `json:"metricName" protobuf:"bytes,1,name=metricName"`
|
MetricName string `json:"metricName" protobuf:"bytes,1,name=metricName"`
|
||||||
|
|
||||||
// currentAverageValue is the current value of the average of the
|
// currentAverageValue is the current value of the average of the
|
||||||
// metric across all relevant pods (as a quantity)
|
// metric across all relevant pods (as a quantity)
|
||||||
CurrentAverageValue resource.Quantity `json:"currentAverageValue" protobuf:"bytes,2,name=currentAverageValue"`
|
CurrentAverageValue resource.Quantity `json:"currentAverageValue" protobuf:"bytes,2,name=currentAverageValue"`
|
||||||
@ -451,6 +481,7 @@ type PodsMetricStatus struct {
|
|||||||
type ResourceMetricStatus struct {
|
type ResourceMetricStatus struct {
|
||||||
// name is the name of the resource in question.
|
// name is the name of the resource in question.
|
||||||
Name v1.ResourceName `json:"name" protobuf:"bytes,1,name=name"`
|
Name v1.ResourceName `json:"name" protobuf:"bytes,1,name=name"`
|
||||||
|
|
||||||
// currentAverageUtilization is the current value of the average of the
|
// currentAverageUtilization is the current value of the average of the
|
||||||
// resource metric across all relevant pods, represented as a percentage of
|
// resource metric across all relevant pods, represented as a percentage of
|
||||||
// the requested value of the resource for the pods. It will only be
|
// the requested value of the resource for the pods. It will only be
|
||||||
@ -458,6 +489,7 @@ type ResourceMetricStatus struct {
|
|||||||
// specification.
|
// specification.
|
||||||
// +optional
|
// +optional
|
||||||
CurrentAverageUtilization *int32 `json:"currentAverageUtilization,omitempty" protobuf:"bytes,2,opt,name=currentAverageUtilization"`
|
CurrentAverageUtilization *int32 `json:"currentAverageUtilization,omitempty" protobuf:"bytes,2,opt,name=currentAverageUtilization"`
|
||||||
|
|
||||||
// currentAverageValue is the current value of the average of the
|
// currentAverageValue is the current value of the average of the
|
||||||
// resource metric across all relevant pods, as a raw value (instead of as
|
// resource metric across all relevant pods, as a raw value (instead of as
|
||||||
// a percentage of the request), similar to the "pods" metric source type.
|
// a percentage of the request), similar to the "pods" metric source type.
|
||||||
@ -473,6 +505,7 @@ type ResourceMetricStatus struct {
|
|||||||
type ContainerResourceMetricStatus struct {
|
type ContainerResourceMetricStatus struct {
|
||||||
// name is the name of the resource in question.
|
// name is the name of the resource in question.
|
||||||
Name v1.ResourceName `json:"name" protobuf:"bytes,1,name=name"`
|
Name v1.ResourceName `json:"name" protobuf:"bytes,1,name=name"`
|
||||||
|
|
||||||
// currentAverageUtilization is the current value of the average of the
|
// currentAverageUtilization is the current value of the average of the
|
||||||
// resource metric across all relevant pods, represented as a percentage of
|
// resource metric across all relevant pods, represented as a percentage of
|
||||||
// the requested value of the resource for the pods. It will only be
|
// the requested value of the resource for the pods. It will only be
|
||||||
@ -480,11 +513,13 @@ type ContainerResourceMetricStatus struct {
|
|||||||
// specification.
|
// specification.
|
||||||
// +optional
|
// +optional
|
||||||
CurrentAverageUtilization *int32 `json:"currentAverageUtilization,omitempty" protobuf:"bytes,2,opt,name=currentAverageUtilization"`
|
CurrentAverageUtilization *int32 `json:"currentAverageUtilization,omitempty" protobuf:"bytes,2,opt,name=currentAverageUtilization"`
|
||||||
|
|
||||||
// currentAverageValue is the current value of the average of the
|
// currentAverageValue is the current value of the average of the
|
||||||
// resource metric across all relevant pods, as a raw value (instead of as
|
// resource metric across all relevant pods, as a raw value (instead of as
|
||||||
// a percentage of the request), similar to the "pods" metric source type.
|
// a percentage of the request), similar to the "pods" metric source type.
|
||||||
// It will always be set, regardless of the corresponding metric specification.
|
// It will always be set, regardless of the corresponding metric specification.
|
||||||
CurrentAverageValue resource.Quantity `json:"currentAverageValue" protobuf:"bytes,3,name=currentAverageValue"`
|
CurrentAverageValue resource.Quantity `json:"currentAverageValue" protobuf:"bytes,3,name=currentAverageValue"`
|
||||||
|
|
||||||
// container is the name of the container in the pods of the scaling taget
|
// container is the name of the container in the pods of the scaling taget
|
||||||
Container string `json:"container" protobuf:"bytes,4,opt,name=container"`
|
Container string `json:"container" protobuf:"bytes,4,opt,name=container"`
|
||||||
}
|
}
|
||||||
@ -495,12 +530,14 @@ type ExternalMetricStatus struct {
|
|||||||
// metricName is the name of a metric used for autoscaling in
|
// metricName is the name of a metric used for autoscaling in
|
||||||
// metric system.
|
// metric system.
|
||||||
MetricName string `json:"metricName" protobuf:"bytes,1,name=metricName"`
|
MetricName string `json:"metricName" protobuf:"bytes,1,name=metricName"`
|
||||||
|
|
||||||
// metricSelector is used to identify a specific time series
|
// metricSelector is used to identify a specific time series
|
||||||
// within a given metric.
|
// within a given metric.
|
||||||
// +optional
|
// +optional
|
||||||
MetricSelector *metav1.LabelSelector `json:"metricSelector,omitempty" protobuf:"bytes,2,opt,name=metricSelector"`
|
MetricSelector *metav1.LabelSelector `json:"metricSelector,omitempty" protobuf:"bytes,2,opt,name=metricSelector"`
|
||||||
// currentValue is the current value of the metric (as a quantity)
|
// currentValue is the current value of the metric (as a quantity)
|
||||||
CurrentValue resource.Quantity `json:"currentValue" protobuf:"bytes,3,name=currentValue"`
|
CurrentValue resource.Quantity `json:"currentValue" protobuf:"bytes,3,name=currentValue"`
|
||||||
|
|
||||||
// currentAverageValue is the current value of metric averaged over autoscaled pods.
|
// currentAverageValue is the current value of metric averaged over autoscaled pods.
|
||||||
// +optional
|
// +optional
|
||||||
CurrentAverageValue *resource.Quantity `json:"currentAverageValue,omitempty" protobuf:"bytes,4,opt,name=currentAverageValue"`
|
CurrentAverageValue *resource.Quantity `json:"currentAverageValue,omitempty" protobuf:"bytes,4,opt,name=currentAverageValue"`
|
||||||
|
@ -53,9 +53,9 @@ func (ContainerResourceMetricStatus) SwaggerDoc() map[string]string {
|
|||||||
|
|
||||||
var map_CrossVersionObjectReference = map[string]string{
|
var map_CrossVersionObjectReference = map[string]string{
|
||||||
"": "CrossVersionObjectReference contains enough information to let you identify the referred resource.",
|
"": "CrossVersionObjectReference contains enough information to let you identify the referred resource.",
|
||||||
"kind": "Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
|
"kind": "kind is the kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
|
||||||
"name": "Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names",
|
"name": "name is the name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names",
|
||||||
"apiVersion": "API version of the referent",
|
"apiVersion": "apiVersion is the API version of the referent",
|
||||||
}
|
}
|
||||||
|
|
||||||
func (CrossVersionObjectReference) SwaggerDoc() map[string]string {
|
func (CrossVersionObjectReference) SwaggerDoc() map[string]string {
|
||||||
@ -89,8 +89,8 @@ func (ExternalMetricStatus) SwaggerDoc() map[string]string {
|
|||||||
var map_HorizontalPodAutoscaler = map[string]string{
|
var map_HorizontalPodAutoscaler = map[string]string{
|
||||||
"": "configuration of a horizontal pod autoscaler.",
|
"": "configuration of a horizontal pod autoscaler.",
|
||||||
"metadata": "Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata",
|
"metadata": "Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata",
|
||||||
"spec": "behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.",
|
"spec": "spec defines the behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.",
|
||||||
"status": "current information about the autoscaler.",
|
"status": "status is the current information about the autoscaler.",
|
||||||
}
|
}
|
||||||
|
|
||||||
func (HorizontalPodAutoscaler) SwaggerDoc() map[string]string {
|
func (HorizontalPodAutoscaler) SwaggerDoc() map[string]string {
|
||||||
@ -113,7 +113,7 @@ func (HorizontalPodAutoscalerCondition) SwaggerDoc() map[string]string {
|
|||||||
var map_HorizontalPodAutoscalerList = map[string]string{
|
var map_HorizontalPodAutoscalerList = map[string]string{
|
||||||
"": "list of horizontal pod autoscaler objects.",
|
"": "list of horizontal pod autoscaler objects.",
|
||||||
"metadata": "Standard list metadata.",
|
"metadata": "Standard list metadata.",
|
||||||
"items": "list of horizontal pod autoscaler objects.",
|
"items": "items is the list of horizontal pod autoscaler objects.",
|
||||||
}
|
}
|
||||||
|
|
||||||
func (HorizontalPodAutoscalerList) SwaggerDoc() map[string]string {
|
func (HorizontalPodAutoscalerList) SwaggerDoc() map[string]string {
|
||||||
@ -124,8 +124,8 @@ var map_HorizontalPodAutoscalerSpec = map[string]string{
|
|||||||
"": "specification of a horizontal pod autoscaler.",
|
"": "specification of a horizontal pod autoscaler.",
|
||||||
"scaleTargetRef": "reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption and will set the desired number of pods by using its Scale subresource.",
|
"scaleTargetRef": "reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption and will set the desired number of pods by using its Scale subresource.",
|
||||||
"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.",
|
"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.",
|
||||||
"maxReplicas": "upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.",
|
"maxReplicas": "maxReplicas is the upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.",
|
||||||
"targetCPUUtilizationPercentage": "target average CPU utilization (represented as a percentage of requested CPU) over all the pods; if not specified the default autoscaling policy will be used.",
|
"targetCPUUtilizationPercentage": "targetCPUUtilizationPercentage is the target average CPU utilization (represented as a percentage of requested CPU) over all the pods; if not specified the default autoscaling policy will be used.",
|
||||||
}
|
}
|
||||||
|
|
||||||
func (HorizontalPodAutoscalerSpec) SwaggerDoc() map[string]string {
|
func (HorizontalPodAutoscalerSpec) SwaggerDoc() map[string]string {
|
||||||
@ -134,11 +134,11 @@ func (HorizontalPodAutoscalerSpec) SwaggerDoc() map[string]string {
|
|||||||
|
|
||||||
var map_HorizontalPodAutoscalerStatus = map[string]string{
|
var map_HorizontalPodAutoscalerStatus = map[string]string{
|
||||||
"": "current status of a horizontal pod autoscaler",
|
"": "current status of a horizontal pod autoscaler",
|
||||||
"observedGeneration": "most recent generation observed by this autoscaler.",
|
"observedGeneration": "observedGeneration is the most recent generation observed by this autoscaler.",
|
||||||
"lastScaleTime": "last time the HorizontalPodAutoscaler scaled the number of pods; used by the autoscaler to control how often the number of pods is changed.",
|
"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.",
|
||||||
"currentReplicas": "current number of replicas of pods managed by this autoscaler.",
|
"currentReplicas": "currentReplicas is the current number of replicas of pods managed by this autoscaler.",
|
||||||
"desiredReplicas": "desired number of replicas of pods managed by this autoscaler.",
|
"desiredReplicas": "desiredReplicas is the desired number of replicas of pods managed by this autoscaler.",
|
||||||
"currentCPUUtilizationPercentage": "current average CPU utilization over all pods, represented as a percentage of requested CPU, e.g. 70 means that an average pod is using now 70% of its requested CPU.",
|
"currentCPUUtilizationPercentage": "currentCPUUtilizationPercentage is the current average CPU utilization over all pods, represented as a percentage of requested CPU, e.g. 70 means that an average pod is using now 70% of its requested CPU.",
|
||||||
}
|
}
|
||||||
|
|
||||||
func (HorizontalPodAutoscalerStatus) SwaggerDoc() map[string]string {
|
func (HorizontalPodAutoscalerStatus) SwaggerDoc() map[string]string {
|
||||||
@ -151,7 +151,7 @@ var map_MetricSpec = map[string]string{
|
|||||||
"object": "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress 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.",
|
"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.",
|
"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.",
|
||||||
"containerResource": "container resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod of 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. This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag.",
|
"containerResource": "containerResource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod of 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. This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag.",
|
||||||
"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).",
|
"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).",
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -165,7 +165,7 @@ var map_MetricStatus = map[string]string{
|
|||||||
"object": "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress 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.",
|
"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.",
|
"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.",
|
||||||
"containerResource": "container resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in 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.",
|
"containerResource": "containerResource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in 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.",
|
||||||
"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).",
|
"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).",
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -246,8 +246,8 @@ func (ResourceMetricStatus) SwaggerDoc() map[string]string {
|
|||||||
var map_Scale = map[string]string{
|
var map_Scale = map[string]string{
|
||||||
"": "Scale represents a scaling request for a resource.",
|
"": "Scale represents a scaling request for a resource.",
|
||||||
"metadata": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.",
|
"metadata": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.",
|
||||||
"spec": "defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.",
|
"spec": "spec defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.",
|
||||||
"status": "current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only.",
|
"status": "status is the current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only.",
|
||||||
}
|
}
|
||||||
|
|
||||||
func (Scale) SwaggerDoc() map[string]string {
|
func (Scale) SwaggerDoc() map[string]string {
|
||||||
@ -256,7 +256,7 @@ func (Scale) SwaggerDoc() map[string]string {
|
|||||||
|
|
||||||
var map_ScaleSpec = map[string]string{
|
var map_ScaleSpec = map[string]string{
|
||||||
"": "ScaleSpec describes the attributes of a scale subresource.",
|
"": "ScaleSpec describes the attributes of a scale subresource.",
|
||||||
"replicas": "desired number of instances for the scaled object.",
|
"replicas": "replicas is the desired number of instances for the scaled object.",
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ScaleSpec) SwaggerDoc() map[string]string {
|
func (ScaleSpec) SwaggerDoc() map[string]string {
|
||||||
@ -265,8 +265,8 @@ func (ScaleSpec) SwaggerDoc() map[string]string {
|
|||||||
|
|
||||||
var map_ScaleStatus = map[string]string{
|
var map_ScaleStatus = map[string]string{
|
||||||
"": "ScaleStatus represents the current status of a scale subresource.",
|
"": "ScaleStatus represents the current status of a scale subresource.",
|
||||||
"replicas": "actual number of observed instances of the scaled object.",
|
"replicas": "replicas is the actual number of observed instances of the scaled object.",
|
||||||
"selector": "label query over pods that should match the replicas count. This is same as the label selector but in the string format to avoid introspection by clients. The string will be in the same format as the query-param syntax. More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors",
|
"selector": "selector is the label query over pods that should match the replicas count. This is same as the label selector but in the string format to avoid introspection by clients. The string will be in the same format as the query-param syntax. More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors",
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ScaleStatus) SwaggerDoc() map[string]string {
|
func (ScaleStatus) SwaggerDoc() map[string]string {
|
||||||
|
@ -54,25 +54,25 @@ message ContainerResourceMetricSource {
|
|||||||
// Kubernetes, and have special scaling options on top of those available to
|
// Kubernetes, and have special scaling options on top of those available to
|
||||||
// normal per-pod metrics using the "pods" source.
|
// normal per-pod metrics using the "pods" source.
|
||||||
message ContainerResourceMetricStatus {
|
message ContainerResourceMetricStatus {
|
||||||
// Name is the name of the resource in question.
|
// name is the name of the resource in question.
|
||||||
optional string name = 1;
|
optional string name = 1;
|
||||||
|
|
||||||
// current contains the current value for the given metric
|
// current contains the current value for the given metric
|
||||||
optional MetricValueStatus current = 2;
|
optional MetricValueStatus current = 2;
|
||||||
|
|
||||||
// Container is the name of the container in the pods of the scaling target
|
// container is the name of the container in the pods of the scaling target
|
||||||
optional string container = 3;
|
optional string container = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
// CrossVersionObjectReference contains enough information to let you identify the referred resource.
|
// CrossVersionObjectReference contains enough information to let you identify the referred resource.
|
||||||
message CrossVersionObjectReference {
|
message CrossVersionObjectReference {
|
||||||
// Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
// kind is the kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||||
optional string kind = 1;
|
optional string kind = 1;
|
||||||
|
|
||||||
// Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names
|
// name is the name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names
|
||||||
optional string name = 2;
|
optional string name = 2;
|
||||||
|
|
||||||
// API version of the referent
|
// apiVersion is the API version of the referent
|
||||||
// +optional
|
// +optional
|
||||||
optional string apiVersion = 3;
|
optional string apiVersion = 3;
|
||||||
}
|
}
|
||||||
@ -100,14 +100,14 @@ message ExternalMetricStatus {
|
|||||||
|
|
||||||
// HPAScalingPolicy is a single policy which must hold true for a specified past interval.
|
// HPAScalingPolicy is a single policy which must hold true for a specified past interval.
|
||||||
message HPAScalingPolicy {
|
message HPAScalingPolicy {
|
||||||
// Type is used to specify the scaling policy.
|
// type is used to specify the scaling policy.
|
||||||
optional string type = 1;
|
optional string type = 1;
|
||||||
|
|
||||||
// Value contains the amount of change which is permitted by the policy.
|
// value contains the amount of change which is permitted by the policy.
|
||||||
// It must be greater than zero
|
// It must be greater than zero
|
||||||
optional int32 value = 2;
|
optional int32 value = 2;
|
||||||
|
|
||||||
// PeriodSeconds specifies the window of time for which the policy should hold true.
|
// 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).
|
// PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min).
|
||||||
optional int32 periodSeconds = 3;
|
optional int32 periodSeconds = 3;
|
||||||
}
|
}
|
||||||
@ -119,7 +119,7 @@ message HPAScalingPolicy {
|
|||||||
// number of replicas is not set instantly, instead, the safest value from the stabilization
|
// number of replicas is not set instantly, instead, the safest value from the stabilization
|
||||||
// window is chosen.
|
// window is chosen.
|
||||||
message HPAScalingRules {
|
message HPAScalingRules {
|
||||||
// StabilizationWindowSeconds is the number of seconds for which past recommendations should be
|
// stabilizationWindowSeconds is the number of seconds for which past recommendations should be
|
||||||
// considered while scaling up or scaling down.
|
// 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).
|
// 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:
|
// If not set, use the default values:
|
||||||
@ -495,7 +495,7 @@ message ResourceMetricSource {
|
|||||||
// Kubernetes, and have special scaling options on top of those available to
|
// Kubernetes, and have special scaling options on top of those available to
|
||||||
// normal per-pod metrics using the "pods" source.
|
// normal per-pod metrics using the "pods" source.
|
||||||
message ResourceMetricStatus {
|
message ResourceMetricStatus {
|
||||||
// Name is the name of the resource in question.
|
// name is the name of the resource in question.
|
||||||
optional string name = 1;
|
optional string name = 1;
|
||||||
|
|
||||||
// current contains the current value for the given metric
|
// current contains the current value for the given metric
|
||||||
|
@ -59,9 +59,11 @@ type HorizontalPodAutoscalerSpec struct {
|
|||||||
// available.
|
// available.
|
||||||
// +optional
|
// +optional
|
||||||
MinReplicas *int32 `json:"minReplicas,omitempty" protobuf:"varint,2,opt,name=minReplicas"`
|
MinReplicas *int32 `json:"minReplicas,omitempty" protobuf:"varint,2,opt,name=minReplicas"`
|
||||||
|
|
||||||
// maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up.
|
// maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up.
|
||||||
// It cannot be less that minReplicas.
|
// It cannot be less that minReplicas.
|
||||||
MaxReplicas int32 `json:"maxReplicas" protobuf:"varint,3,opt,name=maxReplicas"`
|
MaxReplicas int32 `json:"maxReplicas" protobuf:"varint,3,opt,name=maxReplicas"`
|
||||||
|
|
||||||
// metrics contains the specifications for which to use to calculate the
|
// metrics contains the specifications for which to use to calculate the
|
||||||
// desired replica count (the maximum replica count across all metrics will
|
// desired replica count (the maximum replica count across all metrics will
|
||||||
// be used). The desired replica count is calculated multiplying the
|
// be used). The desired replica count is calculated multiplying the
|
||||||
@ -83,11 +85,13 @@ type HorizontalPodAutoscalerSpec struct {
|
|||||||
|
|
||||||
// CrossVersionObjectReference contains enough information to let you identify the referred resource.
|
// CrossVersionObjectReference contains enough information to let you identify the referred resource.
|
||||||
type CrossVersionObjectReference struct {
|
type CrossVersionObjectReference struct {
|
||||||
// Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
// kind is the kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||||
Kind string `json:"kind" protobuf:"bytes,1,opt,name=kind"`
|
Kind string `json:"kind" protobuf:"bytes,1,opt,name=kind"`
|
||||||
// Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names
|
|
||||||
|
// name is the name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names
|
||||||
Name string `json:"name" protobuf:"bytes,2,opt,name=name"`
|
Name string `json:"name" protobuf:"bytes,2,opt,name=name"`
|
||||||
// API version of the referent
|
|
||||||
|
// apiVersion is the API version of the referent
|
||||||
// +optional
|
// +optional
|
||||||
APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,3,opt,name=apiVersion"`
|
APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,3,opt,name=apiVersion"`
|
||||||
}
|
}
|
||||||
@ -105,11 +109,13 @@ type MetricSpec struct {
|
|||||||
// (for example, hits-per-second on an Ingress object).
|
// (for example, hits-per-second on an Ingress object).
|
||||||
// +optional
|
// +optional
|
||||||
Object *ObjectMetricSource `json:"object,omitempty" protobuf:"bytes,2,opt,name=object"`
|
Object *ObjectMetricSource `json:"object,omitempty" protobuf:"bytes,2,opt,name=object"`
|
||||||
|
|
||||||
// pods refers to a metric describing each pod in the current scale target
|
// pods refers to a metric describing each pod in the current scale target
|
||||||
// (for example, transactions-processed-per-second). The values will be
|
// (for example, transactions-processed-per-second). The values will be
|
||||||
// averaged together before being compared to the target value.
|
// averaged together before being compared to the target value.
|
||||||
// +optional
|
// +optional
|
||||||
Pods *PodsMetricSource `json:"pods,omitempty" protobuf:"bytes,3,opt,name=pods"`
|
Pods *PodsMetricSource `json:"pods,omitempty" protobuf:"bytes,3,opt,name=pods"`
|
||||||
|
|
||||||
// resource refers to a resource metric (such as those specified in
|
// resource refers to a resource metric (such as those specified in
|
||||||
// requests and limits) known to Kubernetes describing each pod in the
|
// 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
|
// current scale target (e.g. CPU or memory). Such metrics are built in to
|
||||||
@ -117,6 +123,7 @@ type MetricSpec struct {
|
|||||||
// to normal per-pod metrics using the "pods" source.
|
// to normal per-pod metrics using the "pods" source.
|
||||||
// +optional
|
// +optional
|
||||||
Resource *ResourceMetricSource `json:"resource,omitempty" protobuf:"bytes,4,opt,name=resource"`
|
Resource *ResourceMetricSource `json:"resource,omitempty" protobuf:"bytes,4,opt,name=resource"`
|
||||||
|
|
||||||
// containerResource refers to a resource metric (such as those specified in
|
// containerResource refers to a resource metric (such as those specified in
|
||||||
// requests and limits) known to Kubernetes describing a single container in
|
// requests and limits) known to Kubernetes describing a single container in
|
||||||
// each pod of the current scale target (e.g. CPU or memory). Such metrics are
|
// each pod of the current scale target (e.g. CPU or memory). Such metrics are
|
||||||
@ -125,6 +132,7 @@ type MetricSpec struct {
|
|||||||
// This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag.
|
// This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag.
|
||||||
// +optional
|
// +optional
|
||||||
ContainerResource *ContainerResourceMetricSource `json:"containerResource,omitempty" protobuf:"bytes,7,opt,name=containerResource"`
|
ContainerResource *ContainerResourceMetricSource `json:"containerResource,omitempty" protobuf:"bytes,7,opt,name=containerResource"`
|
||||||
|
|
||||||
// external refers to a global metric that is not associated
|
// external refers to a global metric that is not associated
|
||||||
// with any Kubernetes object. It allows autoscaling based on information
|
// with any Kubernetes object. It allows autoscaling based on information
|
||||||
// coming from components running outside of cluster
|
// coming from components running outside of cluster
|
||||||
@ -144,6 +152,7 @@ type HorizontalPodAutoscalerBehavior struct {
|
|||||||
// No stabilization is used.
|
// No stabilization is used.
|
||||||
// +optional
|
// +optional
|
||||||
ScaleUp *HPAScalingRules `json:"scaleUp,omitempty" protobuf:"bytes,1,opt,name=scaleUp"`
|
ScaleUp *HPAScalingRules `json:"scaleUp,omitempty" protobuf:"bytes,1,opt,name=scaleUp"`
|
||||||
|
|
||||||
// scaleDown is scaling policy for scaling Down.
|
// scaleDown is scaling policy for scaling Down.
|
||||||
// If not set, the default value is to allow to scale down to minReplicas pods, with a
|
// 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
|
// 300 second stabilization window (i.e., the highest recommendation for
|
||||||
@ -171,7 +180,7 @@ const (
|
|||||||
// number of replicas is not set instantly, instead, the safest value from the stabilization
|
// number of replicas is not set instantly, instead, the safest value from the stabilization
|
||||||
// window is chosen.
|
// window is chosen.
|
||||||
type HPAScalingRules struct {
|
type HPAScalingRules struct {
|
||||||
// StabilizationWindowSeconds is the number of seconds for which past recommendations should be
|
// stabilizationWindowSeconds is the number of seconds for which past recommendations should be
|
||||||
// considered while scaling up or scaling down.
|
// 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).
|
// 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:
|
// If not set, use the default values:
|
||||||
@ -179,10 +188,12 @@ type HPAScalingRules struct {
|
|||||||
// - For scale down: 300 (i.e. the stabilization window is 300 seconds long).
|
// - For scale down: 300 (i.e. the stabilization window is 300 seconds long).
|
||||||
// +optional
|
// +optional
|
||||||
StabilizationWindowSeconds *int32 `json:"stabilizationWindowSeconds,omitempty" protobuf:"varint,3,opt,name=stabilizationWindowSeconds"`
|
StabilizationWindowSeconds *int32 `json:"stabilizationWindowSeconds,omitempty" protobuf:"varint,3,opt,name=stabilizationWindowSeconds"`
|
||||||
|
|
||||||
// selectPolicy is used to specify which policy should be used.
|
// selectPolicy is used to specify which policy should be used.
|
||||||
// If not set, the default value Max is used.
|
// If not set, the default value Max is used.
|
||||||
// +optional
|
// +optional
|
||||||
SelectPolicy *ScalingPolicySelect `json:"selectPolicy,omitempty" protobuf:"bytes,1,opt,name=selectPolicy"`
|
SelectPolicy *ScalingPolicySelect `json:"selectPolicy,omitempty" protobuf:"bytes,1,opt,name=selectPolicy"`
|
||||||
|
|
||||||
// policies is a list of potential scaling polices which can be used during scaling.
|
// 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
|
// At least one policy must be specified, otherwise the HPAScalingRules will be discarded as invalid
|
||||||
// +listType=atomic
|
// +listType=atomic
|
||||||
@ -203,12 +214,14 @@ const (
|
|||||||
|
|
||||||
// HPAScalingPolicy is a single policy which must hold true for a specified past interval.
|
// HPAScalingPolicy is a single policy which must hold true for a specified past interval.
|
||||||
type HPAScalingPolicy struct {
|
type HPAScalingPolicy struct {
|
||||||
// Type is used to specify the scaling policy.
|
// type is used to specify the scaling policy.
|
||||||
Type HPAScalingPolicyType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=HPAScalingPolicyType"`
|
Type HPAScalingPolicyType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=HPAScalingPolicyType"`
|
||||||
// Value contains the amount of change which is permitted by the policy.
|
|
||||||
|
// value contains the amount of change which is permitted by the policy.
|
||||||
// It must be greater than zero
|
// It must be greater than zero
|
||||||
Value int32 `json:"value" protobuf:"varint,2,opt,name=value"`
|
Value int32 `json:"value" protobuf:"varint,2,opt,name=value"`
|
||||||
// PeriodSeconds specifies the window of time for which the policy should hold true.
|
|
||||||
|
// 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).
|
// PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min).
|
||||||
PeriodSeconds int32 `json:"periodSeconds" protobuf:"varint,3,opt,name=periodSeconds"`
|
PeriodSeconds int32 `json:"periodSeconds" protobuf:"varint,3,opt,name=periodSeconds"`
|
||||||
}
|
}
|
||||||
@ -249,8 +262,10 @@ const (
|
|||||||
type ObjectMetricSource struct {
|
type ObjectMetricSource struct {
|
||||||
// describedObject specifies the descriptions of a object,such as kind,name apiVersion
|
// describedObject specifies the descriptions of a object,such as kind,name apiVersion
|
||||||
DescribedObject CrossVersionObjectReference `json:"describedObject" protobuf:"bytes,1,name=describedObject"`
|
DescribedObject CrossVersionObjectReference `json:"describedObject" protobuf:"bytes,1,name=describedObject"`
|
||||||
|
|
||||||
// target specifies the target value for the given metric
|
// target specifies the target value for the given metric
|
||||||
Target MetricTarget `json:"target" protobuf:"bytes,2,name=target"`
|
Target MetricTarget `json:"target" protobuf:"bytes,2,name=target"`
|
||||||
|
|
||||||
// metric identifies the target metric by name and selector
|
// metric identifies the target metric by name and selector
|
||||||
Metric MetricIdentifier `json:"metric" protobuf:"bytes,3,name=metric"`
|
Metric MetricIdentifier `json:"metric" protobuf:"bytes,3,name=metric"`
|
||||||
}
|
}
|
||||||
@ -262,6 +277,7 @@ type ObjectMetricSource struct {
|
|||||||
type PodsMetricSource struct {
|
type PodsMetricSource struct {
|
||||||
// metric identifies the target metric by name and selector
|
// metric identifies the target metric by name and selector
|
||||||
Metric MetricIdentifier `json:"metric" protobuf:"bytes,1,name=metric"`
|
Metric MetricIdentifier `json:"metric" protobuf:"bytes,1,name=metric"`
|
||||||
|
|
||||||
// target specifies the target value for the given metric
|
// target specifies the target value for the given metric
|
||||||
Target MetricTarget `json:"target" protobuf:"bytes,2,name=target"`
|
Target MetricTarget `json:"target" protobuf:"bytes,2,name=target"`
|
||||||
}
|
}
|
||||||
@ -276,6 +292,7 @@ type PodsMetricSource struct {
|
|||||||
type ResourceMetricSource struct {
|
type ResourceMetricSource struct {
|
||||||
// name is the name of the resource in question.
|
// name is the name of the resource in question.
|
||||||
Name v1.ResourceName `json:"name" protobuf:"bytes,1,name=name"`
|
Name v1.ResourceName `json:"name" protobuf:"bytes,1,name=name"`
|
||||||
|
|
||||||
// target specifies the target value for the given metric
|
// target specifies the target value for the given metric
|
||||||
Target MetricTarget `json:"target" protobuf:"bytes,2,name=target"`
|
Target MetricTarget `json:"target" protobuf:"bytes,2,name=target"`
|
||||||
}
|
}
|
||||||
@ -290,8 +307,10 @@ type ResourceMetricSource struct {
|
|||||||
type ContainerResourceMetricSource struct {
|
type ContainerResourceMetricSource struct {
|
||||||
// name is the name of the resource in question.
|
// name is the name of the resource in question.
|
||||||
Name v1.ResourceName `json:"name" protobuf:"bytes,1,name=name"`
|
Name v1.ResourceName `json:"name" protobuf:"bytes,1,name=name"`
|
||||||
|
|
||||||
// target specifies the target value for the given metric
|
// target specifies the target value for the given metric
|
||||||
Target MetricTarget `json:"target" protobuf:"bytes,2,name=target"`
|
Target MetricTarget `json:"target" protobuf:"bytes,2,name=target"`
|
||||||
|
|
||||||
// container is the name of the container in the pods of the scaling target
|
// container is the name of the container in the pods of the scaling target
|
||||||
Container string `json:"container" protobuf:"bytes,3,opt,name=container"`
|
Container string `json:"container" protobuf:"bytes,3,opt,name=container"`
|
||||||
}
|
}
|
||||||
@ -302,6 +321,7 @@ type ContainerResourceMetricSource struct {
|
|||||||
type ExternalMetricSource struct {
|
type ExternalMetricSource struct {
|
||||||
// metric identifies the target metric by name and selector
|
// metric identifies the target metric by name and selector
|
||||||
Metric MetricIdentifier `json:"metric" protobuf:"bytes,1,name=metric"`
|
Metric MetricIdentifier `json:"metric" protobuf:"bytes,1,name=metric"`
|
||||||
|
|
||||||
// target specifies the target value for the given metric
|
// target specifies the target value for the given metric
|
||||||
Target MetricTarget `json:"target" protobuf:"bytes,2,name=target"`
|
Target MetricTarget `json:"target" protobuf:"bytes,2,name=target"`
|
||||||
}
|
}
|
||||||
@ -310,6 +330,7 @@ type ExternalMetricSource struct {
|
|||||||
type MetricIdentifier struct {
|
type MetricIdentifier struct {
|
||||||
// name is the name of the given metric
|
// name is the name of the given metric
|
||||||
Name string `json:"name" protobuf:"bytes,1,name=name"`
|
Name string `json:"name" protobuf:"bytes,1,name=name"`
|
||||||
|
|
||||||
// selector is the string-encoded form of a standard kubernetes label selector for the given metric
|
// 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 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.
|
// When unset, just the metricName will be used to gather metrics.
|
||||||
@ -321,13 +342,16 @@ type MetricIdentifier struct {
|
|||||||
type MetricTarget struct {
|
type MetricTarget struct {
|
||||||
// type represents whether the metric type is Utilization, Value, or AverageValue
|
// type represents whether the metric type is Utilization, Value, or AverageValue
|
||||||
Type MetricTargetType `json:"type" protobuf:"bytes,1,name=type"`
|
Type MetricTargetType `json:"type" protobuf:"bytes,1,name=type"`
|
||||||
|
|
||||||
// value is the target value of the metric (as a quantity).
|
// value is the target value of the metric (as a quantity).
|
||||||
// +optional
|
// +optional
|
||||||
Value *resource.Quantity `json:"value,omitempty" protobuf:"bytes,2,opt,name=value"`
|
Value *resource.Quantity `json:"value,omitempty" protobuf:"bytes,2,opt,name=value"`
|
||||||
|
|
||||||
// averageValue is the target value of the average of the
|
// averageValue is the target value of the average of the
|
||||||
// metric across all relevant pods (as a quantity)
|
// metric across all relevant pods (as a quantity)
|
||||||
// +optional
|
// +optional
|
||||||
AverageValue *resource.Quantity `json:"averageValue,omitempty" protobuf:"bytes,3,opt,name=averageValue"`
|
AverageValue *resource.Quantity `json:"averageValue,omitempty" protobuf:"bytes,3,opt,name=averageValue"`
|
||||||
|
|
||||||
// averageUtilization is the target value of the average of the
|
// averageUtilization is the target value of the average of the
|
||||||
// resource metric across all relevant pods, represented as a percentage of
|
// resource metric across all relevant pods, represented as a percentage of
|
||||||
// the requested value of the resource for the pods.
|
// the requested value of the resource for the pods.
|
||||||
@ -405,15 +429,19 @@ const (
|
|||||||
type HorizontalPodAutoscalerCondition struct {
|
type HorizontalPodAutoscalerCondition struct {
|
||||||
// type describes the current condition
|
// type describes the current condition
|
||||||
Type HorizontalPodAutoscalerConditionType `json:"type" protobuf:"bytes,1,name=type"`
|
Type HorizontalPodAutoscalerConditionType `json:"type" protobuf:"bytes,1,name=type"`
|
||||||
|
|
||||||
// status is the status of the condition (True, False, Unknown)
|
// status is the status of the condition (True, False, Unknown)
|
||||||
Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,name=status"`
|
Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,name=status"`
|
||||||
|
|
||||||
// lastTransitionTime is the last time the condition transitioned from
|
// lastTransitionTime is the last time the condition transitioned from
|
||||||
// one status to another
|
// one status to another
|
||||||
// +optional
|
// +optional
|
||||||
LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,3,opt,name=lastTransitionTime"`
|
LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,3,opt,name=lastTransitionTime"`
|
||||||
|
|
||||||
// reason is the reason for the condition's last transition.
|
// reason is the reason for the condition's last transition.
|
||||||
// +optional
|
// +optional
|
||||||
Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"`
|
Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"`
|
||||||
|
|
||||||
// message is a human-readable explanation containing details about
|
// message is a human-readable explanation containing details about
|
||||||
// the transition
|
// the transition
|
||||||
// +optional
|
// +optional
|
||||||
@ -432,11 +460,13 @@ type MetricStatus struct {
|
|||||||
// (for example, hits-per-second on an Ingress object).
|
// (for example, hits-per-second on an Ingress object).
|
||||||
// +optional
|
// +optional
|
||||||
Object *ObjectMetricStatus `json:"object,omitempty" protobuf:"bytes,2,opt,name=object"`
|
Object *ObjectMetricStatus `json:"object,omitempty" protobuf:"bytes,2,opt,name=object"`
|
||||||
|
|
||||||
// pods refers to a metric describing each pod in the current scale target
|
// pods refers to a metric describing each pod in the current scale target
|
||||||
// (for example, transactions-processed-per-second). The values will be
|
// (for example, transactions-processed-per-second). The values will be
|
||||||
// averaged together before being compared to the target value.
|
// averaged together before being compared to the target value.
|
||||||
// +optional
|
// +optional
|
||||||
Pods *PodsMetricStatus `json:"pods,omitempty" protobuf:"bytes,3,opt,name=pods"`
|
Pods *PodsMetricStatus `json:"pods,omitempty" protobuf:"bytes,3,opt,name=pods"`
|
||||||
|
|
||||||
// resource refers to a resource metric (such as those specified in
|
// resource refers to a resource metric (such as those specified in
|
||||||
// requests and limits) known to Kubernetes describing each pod in the
|
// 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
|
// current scale target (e.g. CPU or memory). Such metrics are built in to
|
||||||
@ -444,6 +474,7 @@ type MetricStatus struct {
|
|||||||
// to normal per-pod metrics using the "pods" source.
|
// to normal per-pod metrics using the "pods" source.
|
||||||
// +optional
|
// +optional
|
||||||
Resource *ResourceMetricStatus `json:"resource,omitempty" protobuf:"bytes,4,opt,name=resource"`
|
Resource *ResourceMetricStatus `json:"resource,omitempty" protobuf:"bytes,4,opt,name=resource"`
|
||||||
|
|
||||||
// container resource refers to a resource metric (such as those specified in
|
// container resource refers to a resource metric (such as those specified in
|
||||||
// requests and limits) known to Kubernetes describing a single container in each pod in the
|
// requests and limits) known to Kubernetes describing a single container in each pod in the
|
||||||
// current scale target (e.g. CPU or memory). Such metrics are built in to
|
// current scale target (e.g. CPU or memory). Such metrics are built in to
|
||||||
@ -451,6 +482,7 @@ type MetricStatus struct {
|
|||||||
// to normal per-pod metrics using the "pods" source.
|
// to normal per-pod metrics using the "pods" source.
|
||||||
// +optional
|
// +optional
|
||||||
ContainerResource *ContainerResourceMetricStatus `json:"containerResource,omitempty" protobuf:"bytes,7,opt,name=containerResource"`
|
ContainerResource *ContainerResourceMetricStatus `json:"containerResource,omitempty" protobuf:"bytes,7,opt,name=containerResource"`
|
||||||
|
|
||||||
// external refers to a global metric that is not associated
|
// external refers to a global metric that is not associated
|
||||||
// with any Kubernetes object. It allows autoscaling based on information
|
// with any Kubernetes object. It allows autoscaling based on information
|
||||||
// coming from components running outside of cluster
|
// coming from components running outside of cluster
|
||||||
@ -465,8 +497,10 @@ type MetricStatus struct {
|
|||||||
type ObjectMetricStatus struct {
|
type ObjectMetricStatus struct {
|
||||||
// metric identifies the target metric by name and selector
|
// metric identifies the target metric by name and selector
|
||||||
Metric MetricIdentifier `json:"metric" protobuf:"bytes,1,name=metric"`
|
Metric MetricIdentifier `json:"metric" protobuf:"bytes,1,name=metric"`
|
||||||
|
|
||||||
// current contains the current value for the given metric
|
// current contains the current value for the given metric
|
||||||
Current MetricValueStatus `json:"current" protobuf:"bytes,2,name=current"`
|
Current MetricValueStatus `json:"current" protobuf:"bytes,2,name=current"`
|
||||||
|
|
||||||
// DescribedObject specifies the descriptions of a object,such as kind,name apiVersion
|
// DescribedObject specifies the descriptions of a object,such as kind,name apiVersion
|
||||||
DescribedObject CrossVersionObjectReference `json:"describedObject" protobuf:"bytes,3,name=describedObject"`
|
DescribedObject CrossVersionObjectReference `json:"describedObject" protobuf:"bytes,3,name=describedObject"`
|
||||||
}
|
}
|
||||||
@ -476,6 +510,7 @@ type ObjectMetricStatus struct {
|
|||||||
type PodsMetricStatus struct {
|
type PodsMetricStatus struct {
|
||||||
// metric identifies the target metric by name and selector
|
// metric identifies the target metric by name and selector
|
||||||
Metric MetricIdentifier `json:"metric" protobuf:"bytes,1,name=metric"`
|
Metric MetricIdentifier `json:"metric" protobuf:"bytes,1,name=metric"`
|
||||||
|
|
||||||
// current contains the current value for the given metric
|
// current contains the current value for the given metric
|
||||||
Current MetricValueStatus `json:"current" protobuf:"bytes,2,name=current"`
|
Current MetricValueStatus `json:"current" protobuf:"bytes,2,name=current"`
|
||||||
}
|
}
|
||||||
@ -486,8 +521,9 @@ type PodsMetricStatus struct {
|
|||||||
// Kubernetes, and have special scaling options on top of those available to
|
// Kubernetes, and have special scaling options on top of those available to
|
||||||
// normal per-pod metrics using the "pods" source.
|
// normal per-pod metrics using the "pods" source.
|
||||||
type ResourceMetricStatus struct {
|
type ResourceMetricStatus struct {
|
||||||
// Name is the name of the resource in question.
|
// name is the name of the resource in question.
|
||||||
Name v1.ResourceName `json:"name" protobuf:"bytes,1,name=name"`
|
Name v1.ResourceName `json:"name" protobuf:"bytes,1,name=name"`
|
||||||
|
|
||||||
// current contains the current value for the given metric
|
// current contains the current value for the given metric
|
||||||
Current MetricValueStatus `json:"current" protobuf:"bytes,2,name=current"`
|
Current MetricValueStatus `json:"current" protobuf:"bytes,2,name=current"`
|
||||||
}
|
}
|
||||||
@ -498,11 +534,13 @@ type ResourceMetricStatus struct {
|
|||||||
// Kubernetes, and have special scaling options on top of those available to
|
// Kubernetes, and have special scaling options on top of those available to
|
||||||
// normal per-pod metrics using the "pods" source.
|
// normal per-pod metrics using the "pods" source.
|
||||||
type ContainerResourceMetricStatus struct {
|
type ContainerResourceMetricStatus struct {
|
||||||
// Name is the name of the resource in question.
|
// name is the name of the resource in question.
|
||||||
Name v1.ResourceName `json:"name" protobuf:"bytes,1,name=name"`
|
Name v1.ResourceName `json:"name" protobuf:"bytes,1,name=name"`
|
||||||
|
|
||||||
// current contains the current value for the given metric
|
// current contains the current value for the given metric
|
||||||
Current MetricValueStatus `json:"current" protobuf:"bytes,2,name=current"`
|
Current MetricValueStatus `json:"current" protobuf:"bytes,2,name=current"`
|
||||||
// Container is the name of the container in the pods of the scaling target
|
|
||||||
|
// container is the name of the container in the pods of the scaling target
|
||||||
Container string `json:"container" protobuf:"bytes,3,opt,name=container"`
|
Container string `json:"container" protobuf:"bytes,3,opt,name=container"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -511,6 +549,7 @@ type ContainerResourceMetricStatus struct {
|
|||||||
type ExternalMetricStatus struct {
|
type ExternalMetricStatus struct {
|
||||||
// metric identifies the target metric by name and selector
|
// metric identifies the target metric by name and selector
|
||||||
Metric MetricIdentifier `json:"metric" protobuf:"bytes,1,name=metric"`
|
Metric MetricIdentifier `json:"metric" protobuf:"bytes,1,name=metric"`
|
||||||
|
|
||||||
// current contains the current value for the given metric
|
// current contains the current value for the given metric
|
||||||
Current MetricValueStatus `json:"current" protobuf:"bytes,2,name=current"`
|
Current MetricValueStatus `json:"current" protobuf:"bytes,2,name=current"`
|
||||||
}
|
}
|
||||||
@ -520,10 +559,12 @@ type MetricValueStatus struct {
|
|||||||
// value is the current value of the metric (as a quantity).
|
// value is the current value of the metric (as a quantity).
|
||||||
// +optional
|
// +optional
|
||||||
Value *resource.Quantity `json:"value,omitempty" protobuf:"bytes,1,opt,name=value"`
|
Value *resource.Quantity `json:"value,omitempty" protobuf:"bytes,1,opt,name=value"`
|
||||||
|
|
||||||
// averageValue is the current value of the average of the
|
// averageValue is the current value of the average of the
|
||||||
// metric across all relevant pods (as a quantity)
|
// metric across all relevant pods (as a quantity)
|
||||||
// +optional
|
// +optional
|
||||||
AverageValue *resource.Quantity `json:"averageValue,omitempty" protobuf:"bytes,2,opt,name=averageValue"`
|
AverageValue *resource.Quantity `json:"averageValue,omitempty" protobuf:"bytes,2,opt,name=averageValue"`
|
||||||
|
|
||||||
// currentAverageUtilization is the current value of the average of the
|
// currentAverageUtilization is the current value of the average of the
|
||||||
// resource metric across all relevant pods, represented as a percentage of
|
// resource metric across all relevant pods, represented as a percentage of
|
||||||
// the requested value of the resource for the pods.
|
// the requested value of the resource for the pods.
|
||||||
|
@ -40,9 +40,9 @@ func (ContainerResourceMetricSource) SwaggerDoc() map[string]string {
|
|||||||
|
|
||||||
var map_ContainerResourceMetricStatus = map[string]string{
|
var map_ContainerResourceMetricStatus = map[string]string{
|
||||||
"": "ContainerResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing a single container in 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.",
|
"": "ContainerResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing a single container in 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.",
|
||||||
"name": "Name is the name of the resource in question.",
|
"name": "name is the name of the resource in question.",
|
||||||
"current": "current contains the current value for the given metric",
|
"current": "current contains the current value for the given metric",
|
||||||
"container": "Container is the name of the container in the pods of the scaling target",
|
"container": "container is the name of the container in the pods of the scaling target",
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ContainerResourceMetricStatus) SwaggerDoc() map[string]string {
|
func (ContainerResourceMetricStatus) SwaggerDoc() map[string]string {
|
||||||
@ -51,9 +51,9 @@ func (ContainerResourceMetricStatus) SwaggerDoc() map[string]string {
|
|||||||
|
|
||||||
var map_CrossVersionObjectReference = map[string]string{
|
var map_CrossVersionObjectReference = map[string]string{
|
||||||
"": "CrossVersionObjectReference contains enough information to let you identify the referred resource.",
|
"": "CrossVersionObjectReference contains enough information to let you identify the referred resource.",
|
||||||
"kind": "Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
|
"kind": "kind is the kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
|
||||||
"name": "Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names",
|
"name": "name is the name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names",
|
||||||
"apiVersion": "API version of the referent",
|
"apiVersion": "apiVersion is the API version of the referent",
|
||||||
}
|
}
|
||||||
|
|
||||||
func (CrossVersionObjectReference) SwaggerDoc() map[string]string {
|
func (CrossVersionObjectReference) SwaggerDoc() map[string]string {
|
||||||
@ -82,9 +82,9 @@ func (ExternalMetricStatus) SwaggerDoc() map[string]string {
|
|||||||
|
|
||||||
var map_HPAScalingPolicy = map[string]string{
|
var map_HPAScalingPolicy = map[string]string{
|
||||||
"": "HPAScalingPolicy is a single policy which must hold true for a specified past interval.",
|
"": "HPAScalingPolicy is a single policy which must hold true for a specified past interval.",
|
||||||
"type": "Type is used to specify the scaling policy.",
|
"type": "type is used to specify the scaling policy.",
|
||||||
"value": "Value contains the amount of change which is permitted by the policy. It must be greater than zero",
|
"value": "value contains the amount of change which is permitted by the policy. It must be greater than zero",
|
||||||
"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).",
|
"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).",
|
||||||
}
|
}
|
||||||
|
|
||||||
func (HPAScalingPolicy) SwaggerDoc() map[string]string {
|
func (HPAScalingPolicy) SwaggerDoc() map[string]string {
|
||||||
@ -93,7 +93,7 @@ func (HPAScalingPolicy) SwaggerDoc() map[string]string {
|
|||||||
|
|
||||||
var map_HPAScalingRules = map[string]string{
|
var map_HPAScalingRules = map[string]string{
|
||||||
"": "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.",
|
"": "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.",
|
||||||
"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).",
|
"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).",
|
||||||
"selectPolicy": "selectPolicy is used to specify which policy should be used. If not set, the default value Max is used.",
|
"selectPolicy": "selectPolicy is used to specify which policy should be used. If not set, the default value Max is used.",
|
||||||
"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",
|
"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",
|
||||||
}
|
}
|
||||||
@ -288,7 +288,7 @@ func (ResourceMetricSource) SwaggerDoc() map[string]string {
|
|||||||
|
|
||||||
var map_ResourceMetricStatus = map[string]string{
|
var map_ResourceMetricStatus = map[string]string{
|
||||||
"": "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.",
|
"": "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.",
|
||||||
"name": "Name is the name of the resource in question.",
|
"name": "name is the name of the resource in question.",
|
||||||
"current": "current contains the current value for the given metric",
|
"current": "current contains the current value for the given metric",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,25 +54,25 @@ message ContainerResourceMetricSource {
|
|||||||
// Kubernetes, and have special scaling options on top of those available to
|
// Kubernetes, and have special scaling options on top of those available to
|
||||||
// normal per-pod metrics using the "pods" source.
|
// normal per-pod metrics using the "pods" source.
|
||||||
message ContainerResourceMetricStatus {
|
message ContainerResourceMetricStatus {
|
||||||
// Name is the name of the resource in question.
|
// name is the name of the resource in question.
|
||||||
optional string name = 1;
|
optional string name = 1;
|
||||||
|
|
||||||
// current contains the current value for the given metric
|
// current contains the current value for the given metric
|
||||||
optional MetricValueStatus current = 2;
|
optional MetricValueStatus current = 2;
|
||||||
|
|
||||||
// Container is the name of the container in the pods of the scaling target
|
// container is the name of the container in the pods of the scaling target
|
||||||
optional string container = 3;
|
optional string container = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
// CrossVersionObjectReference contains enough information to let you identify the referred resource.
|
// CrossVersionObjectReference contains enough information to let you identify the referred resource.
|
||||||
message CrossVersionObjectReference {
|
message CrossVersionObjectReference {
|
||||||
// Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
// kind is the kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||||
optional string kind = 1;
|
optional string kind = 1;
|
||||||
|
|
||||||
// Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names
|
// name is the name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names
|
||||||
optional string name = 2;
|
optional string name = 2;
|
||||||
|
|
||||||
// API version of the referent
|
// apiVersion is the API version of the referent
|
||||||
// +optional
|
// +optional
|
||||||
optional string apiVersion = 3;
|
optional string apiVersion = 3;
|
||||||
}
|
}
|
||||||
@ -100,14 +100,14 @@ message ExternalMetricStatus {
|
|||||||
|
|
||||||
// HPAScalingPolicy is a single policy which must hold true for a specified past interval.
|
// HPAScalingPolicy is a single policy which must hold true for a specified past interval.
|
||||||
message HPAScalingPolicy {
|
message HPAScalingPolicy {
|
||||||
// Type is used to specify the scaling policy.
|
// type is used to specify the scaling policy.
|
||||||
optional string type = 1;
|
optional string type = 1;
|
||||||
|
|
||||||
// Value contains the amount of change which is permitted by the policy.
|
// value contains the amount of change which is permitted by the policy.
|
||||||
// It must be greater than zero
|
// It must be greater than zero
|
||||||
optional int32 value = 2;
|
optional int32 value = 2;
|
||||||
|
|
||||||
// PeriodSeconds specifies the window of time for which the policy should hold true.
|
// 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).
|
// PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min).
|
||||||
optional int32 periodSeconds = 3;
|
optional int32 periodSeconds = 3;
|
||||||
}
|
}
|
||||||
@ -119,7 +119,7 @@ message HPAScalingPolicy {
|
|||||||
// number of replicas is not set instantly, instead, the safest value from the stabilization
|
// number of replicas is not set instantly, instead, the safest value from the stabilization
|
||||||
// window is chosen.
|
// window is chosen.
|
||||||
message HPAScalingRules {
|
message HPAScalingRules {
|
||||||
// StabilizationWindowSeconds is the number of seconds for which past recommendations should be
|
// stabilizationWindowSeconds is the number of seconds for which past recommendations should be
|
||||||
// considered while scaling up or scaling down.
|
// 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).
|
// 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:
|
// If not set, use the default values:
|
||||||
@ -361,7 +361,7 @@ message MetricStatus {
|
|||||||
// +optional
|
// +optional
|
||||||
optional ResourceMetricStatus resource = 4;
|
optional ResourceMetricStatus resource = 4;
|
||||||
|
|
||||||
// container resource refers to a resource metric (such as those specified in
|
// containerResource refers to a resource metric (such as those specified in
|
||||||
// requests and limits) known to Kubernetes describing a single container in each pod in the
|
// requests and limits) known to Kubernetes describing a single container in each pod in the
|
||||||
// current scale target (e.g. CPU or memory). Such metrics are built in to
|
// 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
|
// Kubernetes, and have special scaling options on top of those available
|
||||||
@ -411,7 +411,7 @@ message MetricValueStatus {
|
|||||||
// +optional
|
// +optional
|
||||||
optional k8s.io.apimachinery.pkg.api.resource.Quantity averageValue = 2;
|
optional k8s.io.apimachinery.pkg.api.resource.Quantity averageValue = 2;
|
||||||
|
|
||||||
// currentAverageUtilization is the current value of the average of the
|
// averageUtilization is the current value of the average of the
|
||||||
// resource metric across all relevant pods, represented as a percentage of
|
// resource metric across all relevant pods, represented as a percentage of
|
||||||
// the requested value of the resource for the pods.
|
// the requested value of the resource for the pods.
|
||||||
// +optional
|
// +optional
|
||||||
@ -485,7 +485,7 @@ message ResourceMetricSource {
|
|||||||
// Kubernetes, and have special scaling options on top of those available to
|
// Kubernetes, and have special scaling options on top of those available to
|
||||||
// normal per-pod metrics using the "pods" source.
|
// normal per-pod metrics using the "pods" source.
|
||||||
message ResourceMetricStatus {
|
message ResourceMetricStatus {
|
||||||
// Name is the name of the resource in question.
|
// name is the name of the resource in question.
|
||||||
optional string name = 1;
|
optional string name = 1;
|
||||||
|
|
||||||
// current contains the current value for the given metric
|
// current contains the current value for the given metric
|
||||||
|
@ -62,9 +62,11 @@ type HorizontalPodAutoscalerSpec struct {
|
|||||||
// available.
|
// available.
|
||||||
// +optional
|
// +optional
|
||||||
MinReplicas *int32 `json:"minReplicas,omitempty" protobuf:"varint,2,opt,name=minReplicas"`
|
MinReplicas *int32 `json:"minReplicas,omitempty" protobuf:"varint,2,opt,name=minReplicas"`
|
||||||
|
|
||||||
// maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up.
|
// maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up.
|
||||||
// It cannot be less that minReplicas.
|
// It cannot be less that minReplicas.
|
||||||
MaxReplicas int32 `json:"maxReplicas" protobuf:"varint,3,opt,name=maxReplicas"`
|
MaxReplicas int32 `json:"maxReplicas" protobuf:"varint,3,opt,name=maxReplicas"`
|
||||||
|
|
||||||
// metrics contains the specifications for which to use to calculate the
|
// metrics contains the specifications for which to use to calculate the
|
||||||
// desired replica count (the maximum replica count across all metrics will
|
// desired replica count (the maximum replica count across all metrics will
|
||||||
// be used). The desired replica count is calculated multiplying the
|
// be used). The desired replica count is calculated multiplying the
|
||||||
@ -85,11 +87,13 @@ type HorizontalPodAutoscalerSpec struct {
|
|||||||
|
|
||||||
// CrossVersionObjectReference contains enough information to let you identify the referred resource.
|
// CrossVersionObjectReference contains enough information to let you identify the referred resource.
|
||||||
type CrossVersionObjectReference struct {
|
type CrossVersionObjectReference struct {
|
||||||
// Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
// kind is the kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||||
Kind string `json:"kind" protobuf:"bytes,1,opt,name=kind"`
|
Kind string `json:"kind" protobuf:"bytes,1,opt,name=kind"`
|
||||||
// Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names
|
|
||||||
|
// name is the name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names
|
||||||
Name string `json:"name" protobuf:"bytes,2,opt,name=name"`
|
Name string `json:"name" protobuf:"bytes,2,opt,name=name"`
|
||||||
// API version of the referent
|
|
||||||
|
// apiVersion is the API version of the referent
|
||||||
// +optional
|
// +optional
|
||||||
APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,3,opt,name=apiVersion"`
|
APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,3,opt,name=apiVersion"`
|
||||||
}
|
}
|
||||||
@ -107,11 +111,13 @@ type MetricSpec struct {
|
|||||||
// (for example, hits-per-second on an Ingress object).
|
// (for example, hits-per-second on an Ingress object).
|
||||||
// +optional
|
// +optional
|
||||||
Object *ObjectMetricSource `json:"object,omitempty" protobuf:"bytes,2,opt,name=object"`
|
Object *ObjectMetricSource `json:"object,omitempty" protobuf:"bytes,2,opt,name=object"`
|
||||||
|
|
||||||
// pods refers to a metric describing each pod in the current scale target
|
// pods refers to a metric describing each pod in the current scale target
|
||||||
// (for example, transactions-processed-per-second). The values will be
|
// (for example, transactions-processed-per-second). The values will be
|
||||||
// averaged together before being compared to the target value.
|
// averaged together before being compared to the target value.
|
||||||
// +optional
|
// +optional
|
||||||
Pods *PodsMetricSource `json:"pods,omitempty" protobuf:"bytes,3,opt,name=pods"`
|
Pods *PodsMetricSource `json:"pods,omitempty" protobuf:"bytes,3,opt,name=pods"`
|
||||||
|
|
||||||
// resource refers to a resource metric (such as those specified in
|
// resource refers to a resource metric (such as those specified in
|
||||||
// requests and limits) known to Kubernetes describing each pod in the
|
// 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
|
// current scale target (e.g. CPU or memory). Such metrics are built in to
|
||||||
@ -119,6 +125,7 @@ type MetricSpec struct {
|
|||||||
// to normal per-pod metrics using the "pods" source.
|
// to normal per-pod metrics using the "pods" source.
|
||||||
// +optional
|
// +optional
|
||||||
Resource *ResourceMetricSource `json:"resource,omitempty" protobuf:"bytes,4,opt,name=resource"`
|
Resource *ResourceMetricSource `json:"resource,omitempty" protobuf:"bytes,4,opt,name=resource"`
|
||||||
|
|
||||||
// container resource refers to a resource metric (such as those specified in
|
// container resource refers to a resource metric (such as those specified in
|
||||||
// requests and limits) known to Kubernetes describing a single container in
|
// requests and limits) known to Kubernetes describing a single container in
|
||||||
// each pod of the current scale target (e.g. CPU or memory). Such metrics are
|
// each pod of the current scale target (e.g. CPU or memory). Such metrics are
|
||||||
@ -127,6 +134,7 @@ type MetricSpec struct {
|
|||||||
// This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag.
|
// This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag.
|
||||||
// +optional
|
// +optional
|
||||||
ContainerResource *ContainerResourceMetricSource `json:"containerResource,omitempty" protobuf:"bytes,7,opt,name=containerResource"`
|
ContainerResource *ContainerResourceMetricSource `json:"containerResource,omitempty" protobuf:"bytes,7,opt,name=containerResource"`
|
||||||
|
|
||||||
// external refers to a global metric that is not associated
|
// external refers to a global metric that is not associated
|
||||||
// with any Kubernetes object. It allows autoscaling based on information
|
// with any Kubernetes object. It allows autoscaling based on information
|
||||||
// coming from components running outside of cluster
|
// coming from components running outside of cluster
|
||||||
@ -146,6 +154,7 @@ type HorizontalPodAutoscalerBehavior struct {
|
|||||||
// No stabilization is used.
|
// No stabilization is used.
|
||||||
// +optional
|
// +optional
|
||||||
ScaleUp *HPAScalingRules `json:"scaleUp,omitempty" protobuf:"bytes,1,opt,name=scaleUp"`
|
ScaleUp *HPAScalingRules `json:"scaleUp,omitempty" protobuf:"bytes,1,opt,name=scaleUp"`
|
||||||
|
|
||||||
// scaleDown is scaling policy for scaling Down.
|
// scaleDown is scaling policy for scaling Down.
|
||||||
// If not set, the default value is to allow to scale down to minReplicas pods, with a
|
// 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
|
// 300 second stabilization window (i.e., the highest recommendation for
|
||||||
@ -173,7 +182,7 @@ const (
|
|||||||
// number of replicas is not set instantly, instead, the safest value from the stabilization
|
// number of replicas is not set instantly, instead, the safest value from the stabilization
|
||||||
// window is chosen.
|
// window is chosen.
|
||||||
type HPAScalingRules struct {
|
type HPAScalingRules struct {
|
||||||
// StabilizationWindowSeconds is the number of seconds for which past recommendations should be
|
// stabilizationWindowSeconds is the number of seconds for which past recommendations should be
|
||||||
// considered while scaling up or scaling down.
|
// 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).
|
// 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:
|
// If not set, use the default values:
|
||||||
@ -181,10 +190,12 @@ type HPAScalingRules struct {
|
|||||||
// - For scale down: 300 (i.e. the stabilization window is 300 seconds long).
|
// - For scale down: 300 (i.e. the stabilization window is 300 seconds long).
|
||||||
// +optional
|
// +optional
|
||||||
StabilizationWindowSeconds *int32 `json:"stabilizationWindowSeconds,omitempty" protobuf:"varint,3,opt,name=stabilizationWindowSeconds"`
|
StabilizationWindowSeconds *int32 `json:"stabilizationWindowSeconds,omitempty" protobuf:"varint,3,opt,name=stabilizationWindowSeconds"`
|
||||||
|
|
||||||
// selectPolicy is used to specify which policy should be used.
|
// selectPolicy is used to specify which policy should be used.
|
||||||
// If not set, the default value MaxPolicySelect is used.
|
// If not set, the default value MaxPolicySelect is used.
|
||||||
// +optional
|
// +optional
|
||||||
SelectPolicy *ScalingPolicySelect `json:"selectPolicy,omitempty" protobuf:"bytes,1,opt,name=selectPolicy"`
|
SelectPolicy *ScalingPolicySelect `json:"selectPolicy,omitempty" protobuf:"bytes,1,opt,name=selectPolicy"`
|
||||||
|
|
||||||
// policies is a list of potential scaling polices which can be used during scaling.
|
// 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
|
// At least one policy must be specified, otherwise the HPAScalingRules will be discarded as invalid
|
||||||
// +optional
|
// +optional
|
||||||
@ -204,12 +215,14 @@ const (
|
|||||||
|
|
||||||
// HPAScalingPolicy is a single policy which must hold true for a specified past interval.
|
// HPAScalingPolicy is a single policy which must hold true for a specified past interval.
|
||||||
type HPAScalingPolicy struct {
|
type HPAScalingPolicy struct {
|
||||||
// Type is used to specify the scaling policy.
|
// type is used to specify the scaling policy.
|
||||||
Type HPAScalingPolicyType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=HPAScalingPolicyType"`
|
Type HPAScalingPolicyType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=HPAScalingPolicyType"`
|
||||||
// Value contains the amount of change which is permitted by the policy.
|
|
||||||
|
// value contains the amount of change which is permitted by the policy.
|
||||||
// It must be greater than zero
|
// It must be greater than zero
|
||||||
Value int32 `json:"value" protobuf:"varint,2,opt,name=value"`
|
Value int32 `json:"value" protobuf:"varint,2,opt,name=value"`
|
||||||
// PeriodSeconds specifies the window of time for which the policy should hold true.
|
|
||||||
|
// 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).
|
// PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min).
|
||||||
PeriodSeconds int32 `json:"periodSeconds" protobuf:"varint,3,opt,name=periodSeconds"`
|
PeriodSeconds int32 `json:"periodSeconds" protobuf:"varint,3,opt,name=periodSeconds"`
|
||||||
}
|
}
|
||||||
@ -251,6 +264,7 @@ type ObjectMetricSource struct {
|
|||||||
DescribedObject CrossVersionObjectReference `json:"describedObject" protobuf:"bytes,1,name=describedObject"`
|
DescribedObject CrossVersionObjectReference `json:"describedObject" protobuf:"bytes,1,name=describedObject"`
|
||||||
// target specifies the target value for the given metric
|
// target specifies the target value for the given metric
|
||||||
Target MetricTarget `json:"target" protobuf:"bytes,2,name=target"`
|
Target MetricTarget `json:"target" protobuf:"bytes,2,name=target"`
|
||||||
|
|
||||||
// metric identifies the target metric by name and selector
|
// metric identifies the target metric by name and selector
|
||||||
Metric MetricIdentifier `json:"metric" protobuf:"bytes,3,name=metric"`
|
Metric MetricIdentifier `json:"metric" protobuf:"bytes,3,name=metric"`
|
||||||
}
|
}
|
||||||
@ -262,6 +276,7 @@ type ObjectMetricSource struct {
|
|||||||
type PodsMetricSource struct {
|
type PodsMetricSource struct {
|
||||||
// metric identifies the target metric by name and selector
|
// metric identifies the target metric by name and selector
|
||||||
Metric MetricIdentifier `json:"metric" protobuf:"bytes,1,name=metric"`
|
Metric MetricIdentifier `json:"metric" protobuf:"bytes,1,name=metric"`
|
||||||
|
|
||||||
// target specifies the target value for the given metric
|
// target specifies the target value for the given metric
|
||||||
Target MetricTarget `json:"target" protobuf:"bytes,2,name=target"`
|
Target MetricTarget `json:"target" protobuf:"bytes,2,name=target"`
|
||||||
}
|
}
|
||||||
@ -276,6 +291,7 @@ type PodsMetricSource struct {
|
|||||||
type ResourceMetricSource struct {
|
type ResourceMetricSource struct {
|
||||||
// name is the name of the resource in question.
|
// name is the name of the resource in question.
|
||||||
Name v1.ResourceName `json:"name" protobuf:"bytes,1,name=name"`
|
Name v1.ResourceName `json:"name" protobuf:"bytes,1,name=name"`
|
||||||
|
|
||||||
// target specifies the target value for the given metric
|
// target specifies the target value for the given metric
|
||||||
Target MetricTarget `json:"target" protobuf:"bytes,2,name=target"`
|
Target MetricTarget `json:"target" protobuf:"bytes,2,name=target"`
|
||||||
}
|
}
|
||||||
@ -290,8 +306,10 @@ type ResourceMetricSource struct {
|
|||||||
type ContainerResourceMetricSource struct {
|
type ContainerResourceMetricSource struct {
|
||||||
// name is the name of the resource in question.
|
// name is the name of the resource in question.
|
||||||
Name v1.ResourceName `json:"name" protobuf:"bytes,1,name=name"`
|
Name v1.ResourceName `json:"name" protobuf:"bytes,1,name=name"`
|
||||||
|
|
||||||
// target specifies the target value for the given metric
|
// target specifies the target value for the given metric
|
||||||
Target MetricTarget `json:"target" protobuf:"bytes,2,name=target"`
|
Target MetricTarget `json:"target" protobuf:"bytes,2,name=target"`
|
||||||
|
|
||||||
// container is the name of the container in the pods of the scaling target
|
// container is the name of the container in the pods of the scaling target
|
||||||
Container string `json:"container" protobuf:"bytes,3,opt,name=container"`
|
Container string `json:"container" protobuf:"bytes,3,opt,name=container"`
|
||||||
}
|
}
|
||||||
@ -302,6 +320,7 @@ type ContainerResourceMetricSource struct {
|
|||||||
type ExternalMetricSource struct {
|
type ExternalMetricSource struct {
|
||||||
// metric identifies the target metric by name and selector
|
// metric identifies the target metric by name and selector
|
||||||
Metric MetricIdentifier `json:"metric" protobuf:"bytes,1,name=metric"`
|
Metric MetricIdentifier `json:"metric" protobuf:"bytes,1,name=metric"`
|
||||||
|
|
||||||
// target specifies the target value for the given metric
|
// target specifies the target value for the given metric
|
||||||
Target MetricTarget `json:"target" protobuf:"bytes,2,name=target"`
|
Target MetricTarget `json:"target" protobuf:"bytes,2,name=target"`
|
||||||
}
|
}
|
||||||
@ -310,6 +329,7 @@ type ExternalMetricSource struct {
|
|||||||
type MetricIdentifier struct {
|
type MetricIdentifier struct {
|
||||||
// name is the name of the given metric
|
// name is the name of the given metric
|
||||||
Name string `json:"name" protobuf:"bytes,1,name=name"`
|
Name string `json:"name" protobuf:"bytes,1,name=name"`
|
||||||
|
|
||||||
// selector is the string-encoded form of a standard kubernetes label selector for the given metric
|
// 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 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.
|
// When unset, just the metricName will be used to gather metrics.
|
||||||
@ -321,13 +341,16 @@ type MetricIdentifier struct {
|
|||||||
type MetricTarget struct {
|
type MetricTarget struct {
|
||||||
// type represents whether the metric type is Utilization, Value, or AverageValue
|
// type represents whether the metric type is Utilization, Value, or AverageValue
|
||||||
Type MetricTargetType `json:"type" protobuf:"bytes,1,name=type"`
|
Type MetricTargetType `json:"type" protobuf:"bytes,1,name=type"`
|
||||||
|
|
||||||
// value is the target value of the metric (as a quantity).
|
// value is the target value of the metric (as a quantity).
|
||||||
// +optional
|
// +optional
|
||||||
Value *resource.Quantity `json:"value,omitempty" protobuf:"bytes,2,opt,name=value"`
|
Value *resource.Quantity `json:"value,omitempty" protobuf:"bytes,2,opt,name=value"`
|
||||||
|
|
||||||
// averageValue is the target value of the average of the
|
// averageValue is the target value of the average of the
|
||||||
// metric across all relevant pods (as a quantity)
|
// metric across all relevant pods (as a quantity)
|
||||||
// +optional
|
// +optional
|
||||||
AverageValue *resource.Quantity `json:"averageValue,omitempty" protobuf:"bytes,3,opt,name=averageValue"`
|
AverageValue *resource.Quantity `json:"averageValue,omitempty" protobuf:"bytes,3,opt,name=averageValue"`
|
||||||
|
|
||||||
// averageUtilization is the target value of the average of the
|
// averageUtilization is the target value of the average of the
|
||||||
// resource metric across all relevant pods, represented as a percentage of
|
// resource metric across all relevant pods, represented as a percentage of
|
||||||
// the requested value of the resource for the pods.
|
// the requested value of the resource for the pods.
|
||||||
@ -399,15 +422,19 @@ const (
|
|||||||
type HorizontalPodAutoscalerCondition struct {
|
type HorizontalPodAutoscalerCondition struct {
|
||||||
// type describes the current condition
|
// type describes the current condition
|
||||||
Type HorizontalPodAutoscalerConditionType `json:"type" protobuf:"bytes,1,name=type"`
|
Type HorizontalPodAutoscalerConditionType `json:"type" protobuf:"bytes,1,name=type"`
|
||||||
|
|
||||||
// status is the status of the condition (True, False, Unknown)
|
// status is the status of the condition (True, False, Unknown)
|
||||||
Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,name=status"`
|
Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,name=status"`
|
||||||
|
|
||||||
// lastTransitionTime is the last time the condition transitioned from
|
// lastTransitionTime is the last time the condition transitioned from
|
||||||
// one status to another
|
// one status to another
|
||||||
// +optional
|
// +optional
|
||||||
LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,3,opt,name=lastTransitionTime"`
|
LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,3,opt,name=lastTransitionTime"`
|
||||||
|
|
||||||
// reason is the reason for the condition's last transition.
|
// reason is the reason for the condition's last transition.
|
||||||
// +optional
|
// +optional
|
||||||
Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"`
|
Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"`
|
||||||
|
|
||||||
// message is a human-readable explanation containing details about
|
// message is a human-readable explanation containing details about
|
||||||
// the transition
|
// the transition
|
||||||
// +optional
|
// +optional
|
||||||
@ -426,6 +453,7 @@ type MetricStatus struct {
|
|||||||
// (for example, hits-per-second on an Ingress object).
|
// (for example, hits-per-second on an Ingress object).
|
||||||
// +optional
|
// +optional
|
||||||
Object *ObjectMetricStatus `json:"object,omitempty" protobuf:"bytes,2,opt,name=object"`
|
Object *ObjectMetricStatus `json:"object,omitempty" protobuf:"bytes,2,opt,name=object"`
|
||||||
|
|
||||||
// pods refers to a metric describing each pod in the current scale target
|
// pods refers to a metric describing each pod in the current scale target
|
||||||
// (for example, transactions-processed-per-second). The values will be
|
// (for example, transactions-processed-per-second). The values will be
|
||||||
// averaged together before being compared to the target value.
|
// averaged together before being compared to the target value.
|
||||||
@ -438,13 +466,15 @@ type MetricStatus struct {
|
|||||||
// to normal per-pod metrics using the "pods" source.
|
// to normal per-pod metrics using the "pods" source.
|
||||||
// +optional
|
// +optional
|
||||||
Resource *ResourceMetricStatus `json:"resource,omitempty" protobuf:"bytes,4,opt,name=resource"`
|
Resource *ResourceMetricStatus `json:"resource,omitempty" protobuf:"bytes,4,opt,name=resource"`
|
||||||
// container resource refers to a resource metric (such as those specified in
|
|
||||||
|
// containerResource refers to a resource metric (such as those specified in
|
||||||
// requests and limits) known to Kubernetes describing a single container in each pod in the
|
// requests and limits) known to Kubernetes describing a single container in each pod in the
|
||||||
// current scale target (e.g. CPU or memory). Such metrics are built in to
|
// 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
|
// Kubernetes, and have special scaling options on top of those available
|
||||||
// to normal per-pod metrics using the "pods" source.
|
// to normal per-pod metrics using the "pods" source.
|
||||||
// +optional
|
// +optional
|
||||||
ContainerResource *ContainerResourceMetricStatus `json:"containerResource,omitempty" protobuf:"bytes,7,opt,name=containerResource"`
|
ContainerResource *ContainerResourceMetricStatus `json:"containerResource,omitempty" protobuf:"bytes,7,opt,name=containerResource"`
|
||||||
|
|
||||||
// external refers to a global metric that is not associated
|
// external refers to a global metric that is not associated
|
||||||
// with any Kubernetes object. It allows autoscaling based on information
|
// with any Kubernetes object. It allows autoscaling based on information
|
||||||
// coming from components running outside of cluster
|
// coming from components running outside of cluster
|
||||||
@ -459,6 +489,7 @@ type MetricStatus struct {
|
|||||||
type ObjectMetricStatus struct {
|
type ObjectMetricStatus struct {
|
||||||
// metric identifies the target metric by name and selector
|
// metric identifies the target metric by name and selector
|
||||||
Metric MetricIdentifier `json:"metric" protobuf:"bytes,1,name=metric"`
|
Metric MetricIdentifier `json:"metric" protobuf:"bytes,1,name=metric"`
|
||||||
|
|
||||||
// current contains the current value for the given metric
|
// current contains the current value for the given metric
|
||||||
Current MetricValueStatus `json:"current" protobuf:"bytes,2,name=current"`
|
Current MetricValueStatus `json:"current" protobuf:"bytes,2,name=current"`
|
||||||
|
|
||||||
@ -470,6 +501,7 @@ type ObjectMetricStatus struct {
|
|||||||
type PodsMetricStatus struct {
|
type PodsMetricStatus struct {
|
||||||
// metric identifies the target metric by name and selector
|
// metric identifies the target metric by name and selector
|
||||||
Metric MetricIdentifier `json:"metric" protobuf:"bytes,1,name=metric"`
|
Metric MetricIdentifier `json:"metric" protobuf:"bytes,1,name=metric"`
|
||||||
|
|
||||||
// current contains the current value for the given metric
|
// current contains the current value for the given metric
|
||||||
Current MetricValueStatus `json:"current" protobuf:"bytes,2,name=current"`
|
Current MetricValueStatus `json:"current" protobuf:"bytes,2,name=current"`
|
||||||
}
|
}
|
||||||
@ -480,8 +512,9 @@ type PodsMetricStatus struct {
|
|||||||
// Kubernetes, and have special scaling options on top of those available to
|
// Kubernetes, and have special scaling options on top of those available to
|
||||||
// normal per-pod metrics using the "pods" source.
|
// normal per-pod metrics using the "pods" source.
|
||||||
type ResourceMetricStatus struct {
|
type ResourceMetricStatus struct {
|
||||||
// Name is the name of the resource in question.
|
// name is the name of the resource in question.
|
||||||
Name v1.ResourceName `json:"name" protobuf:"bytes,1,name=name"`
|
Name v1.ResourceName `json:"name" protobuf:"bytes,1,name=name"`
|
||||||
|
|
||||||
// current contains the current value for the given metric
|
// current contains the current value for the given metric
|
||||||
Current MetricValueStatus `json:"current" protobuf:"bytes,2,name=current"`
|
Current MetricValueStatus `json:"current" protobuf:"bytes,2,name=current"`
|
||||||
}
|
}
|
||||||
@ -492,11 +525,13 @@ type ResourceMetricStatus struct {
|
|||||||
// Kubernetes, and have special scaling options on top of those available to
|
// Kubernetes, and have special scaling options on top of those available to
|
||||||
// normal per-pod metrics using the "pods" source.
|
// normal per-pod metrics using the "pods" source.
|
||||||
type ContainerResourceMetricStatus struct {
|
type ContainerResourceMetricStatus struct {
|
||||||
// Name is the name of the resource in question.
|
// name is the name of the resource in question.
|
||||||
Name v1.ResourceName `json:"name" protobuf:"bytes,1,name=name"`
|
Name v1.ResourceName `json:"name" protobuf:"bytes,1,name=name"`
|
||||||
|
|
||||||
// current contains the current value for the given metric
|
// current contains the current value for the given metric
|
||||||
Current MetricValueStatus `json:"current" protobuf:"bytes,2,name=current"`
|
Current MetricValueStatus `json:"current" protobuf:"bytes,2,name=current"`
|
||||||
// Container is the name of the container in the pods of the scaling target
|
|
||||||
|
// container is the name of the container in the pods of the scaling target
|
||||||
Container string `json:"container" protobuf:"bytes,3,opt,name=container"`
|
Container string `json:"container" protobuf:"bytes,3,opt,name=container"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -505,6 +540,7 @@ type ContainerResourceMetricStatus struct {
|
|||||||
type ExternalMetricStatus struct {
|
type ExternalMetricStatus struct {
|
||||||
// metric identifies the target metric by name and selector
|
// metric identifies the target metric by name and selector
|
||||||
Metric MetricIdentifier `json:"metric" protobuf:"bytes,1,name=metric"`
|
Metric MetricIdentifier `json:"metric" protobuf:"bytes,1,name=metric"`
|
||||||
|
|
||||||
// current contains the current value for the given metric
|
// current contains the current value for the given metric
|
||||||
Current MetricValueStatus `json:"current" protobuf:"bytes,2,name=current"`
|
Current MetricValueStatus `json:"current" protobuf:"bytes,2,name=current"`
|
||||||
}
|
}
|
||||||
@ -514,11 +550,13 @@ type MetricValueStatus struct {
|
|||||||
// value is the current value of the metric (as a quantity).
|
// value is the current value of the metric (as a quantity).
|
||||||
// +optional
|
// +optional
|
||||||
Value *resource.Quantity `json:"value,omitempty" protobuf:"bytes,1,opt,name=value"`
|
Value *resource.Quantity `json:"value,omitempty" protobuf:"bytes,1,opt,name=value"`
|
||||||
|
|
||||||
// averageValue is the current value of the average of the
|
// averageValue is the current value of the average of the
|
||||||
// metric across all relevant pods (as a quantity)
|
// metric across all relevant pods (as a quantity)
|
||||||
// +optional
|
// +optional
|
||||||
AverageValue *resource.Quantity `json:"averageValue,omitempty" protobuf:"bytes,2,opt,name=averageValue"`
|
AverageValue *resource.Quantity `json:"averageValue,omitempty" protobuf:"bytes,2,opt,name=averageValue"`
|
||||||
// currentAverageUtilization is the current value of the average of the
|
|
||||||
|
// averageUtilization is the current value of the average of the
|
||||||
// resource metric across all relevant pods, represented as a percentage of
|
// resource metric across all relevant pods, represented as a percentage of
|
||||||
// the requested value of the resource for the pods.
|
// the requested value of the resource for the pods.
|
||||||
// +optional
|
// +optional
|
||||||
|
@ -40,9 +40,9 @@ func (ContainerResourceMetricSource) SwaggerDoc() map[string]string {
|
|||||||
|
|
||||||
var map_ContainerResourceMetricStatus = map[string]string{
|
var map_ContainerResourceMetricStatus = map[string]string{
|
||||||
"": "ContainerResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing a single container in 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.",
|
"": "ContainerResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing a single container in 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.",
|
||||||
"name": "Name is the name of the resource in question.",
|
"name": "name is the name of the resource in question.",
|
||||||
"current": "current contains the current value for the given metric",
|
"current": "current contains the current value for the given metric",
|
||||||
"container": "Container is the name of the container in the pods of the scaling target",
|
"container": "container is the name of the container in the pods of the scaling target",
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ContainerResourceMetricStatus) SwaggerDoc() map[string]string {
|
func (ContainerResourceMetricStatus) SwaggerDoc() map[string]string {
|
||||||
@ -51,9 +51,9 @@ func (ContainerResourceMetricStatus) SwaggerDoc() map[string]string {
|
|||||||
|
|
||||||
var map_CrossVersionObjectReference = map[string]string{
|
var map_CrossVersionObjectReference = map[string]string{
|
||||||
"": "CrossVersionObjectReference contains enough information to let you identify the referred resource.",
|
"": "CrossVersionObjectReference contains enough information to let you identify the referred resource.",
|
||||||
"kind": "Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
|
"kind": "kind is the kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
|
||||||
"name": "Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names",
|
"name": "name is the name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names",
|
||||||
"apiVersion": "API version of the referent",
|
"apiVersion": "apiVersion is the API version of the referent",
|
||||||
}
|
}
|
||||||
|
|
||||||
func (CrossVersionObjectReference) SwaggerDoc() map[string]string {
|
func (CrossVersionObjectReference) SwaggerDoc() map[string]string {
|
||||||
@ -82,9 +82,9 @@ func (ExternalMetricStatus) SwaggerDoc() map[string]string {
|
|||||||
|
|
||||||
var map_HPAScalingPolicy = map[string]string{
|
var map_HPAScalingPolicy = map[string]string{
|
||||||
"": "HPAScalingPolicy is a single policy which must hold true for a specified past interval.",
|
"": "HPAScalingPolicy is a single policy which must hold true for a specified past interval.",
|
||||||
"type": "Type is used to specify the scaling policy.",
|
"type": "type is used to specify the scaling policy.",
|
||||||
"value": "Value contains the amount of change which is permitted by the policy. It must be greater than zero",
|
"value": "value contains the amount of change which is permitted by the policy. It must be greater than zero",
|
||||||
"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).",
|
"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).",
|
||||||
}
|
}
|
||||||
|
|
||||||
func (HPAScalingPolicy) SwaggerDoc() map[string]string {
|
func (HPAScalingPolicy) SwaggerDoc() map[string]string {
|
||||||
@ -93,7 +93,7 @@ func (HPAScalingPolicy) SwaggerDoc() map[string]string {
|
|||||||
|
|
||||||
var map_HPAScalingRules = map[string]string{
|
var map_HPAScalingRules = map[string]string{
|
||||||
"": "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.",
|
"": "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.",
|
||||||
"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).",
|
"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).",
|
||||||
"selectPolicy": "selectPolicy is used to specify which policy should be used. If not set, the default value MaxPolicySelect is used.",
|
"selectPolicy": "selectPolicy is used to specify which policy should be used. If not set, the default value MaxPolicySelect is used.",
|
||||||
"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",
|
"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",
|
||||||
}
|
}
|
||||||
@ -203,7 +203,7 @@ var map_MetricStatus = map[string]string{
|
|||||||
"object": "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress 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.",
|
"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.",
|
"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.",
|
||||||
"containerResource": "container resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in 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.",
|
"containerResource": "containerResource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in 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.",
|
||||||
"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).",
|
"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).",
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -227,7 +227,7 @@ var map_MetricValueStatus = map[string]string{
|
|||||||
"": "MetricValueStatus holds the current value for a metric",
|
"": "MetricValueStatus holds the current value for a metric",
|
||||||
"value": "value is the current value of the metric (as a quantity).",
|
"value": "value is the current value of the metric (as a quantity).",
|
||||||
"averageValue": "averageValue is the current value of the average of the metric across all relevant pods (as a quantity)",
|
"averageValue": "averageValue is the current value of the average of the metric across all relevant pods (as a quantity)",
|
||||||
"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.",
|
"averageUtilization": "averageUtilization 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.",
|
||||||
}
|
}
|
||||||
|
|
||||||
func (MetricValueStatus) SwaggerDoc() map[string]string {
|
func (MetricValueStatus) SwaggerDoc() map[string]string {
|
||||||
@ -286,7 +286,7 @@ func (ResourceMetricSource) SwaggerDoc() map[string]string {
|
|||||||
|
|
||||||
var map_ResourceMetricStatus = map[string]string{
|
var map_ResourceMetricStatus = map[string]string{
|
||||||
"": "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.",
|
"": "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.",
|
||||||
"name": "Name is the name of the resource in question.",
|
"name": "name is the name of the resource in question.",
|
||||||
"current": "current contains the current value for the given metric",
|
"current": "current contains the current value for the given metric",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -207,7 +207,7 @@ func schema_k8sio_api_autoscaling_v1_CrossVersionObjectReference(ref common.Refe
|
|||||||
Properties: map[string]spec.Schema{
|
Properties: map[string]spec.Schema{
|
||||||
"kind": {
|
"kind": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
|
Description: "kind is the kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
|
||||||
Default: "",
|
Default: "",
|
||||||
Type: []string{"string"},
|
Type: []string{"string"},
|
||||||
Format: "",
|
Format: "",
|
||||||
@ -215,7 +215,7 @@ func schema_k8sio_api_autoscaling_v1_CrossVersionObjectReference(ref common.Refe
|
|||||||
},
|
},
|
||||||
"name": {
|
"name": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names",
|
Description: "name is the name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names",
|
||||||
Default: "",
|
Default: "",
|
||||||
Type: []string{"string"},
|
Type: []string{"string"},
|
||||||
Format: "",
|
Format: "",
|
||||||
@ -223,7 +223,7 @@ func schema_k8sio_api_autoscaling_v1_CrossVersionObjectReference(ref common.Refe
|
|||||||
},
|
},
|
||||||
"apiVersion": {
|
"apiVersion": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "API version of the referent",
|
Description: "apiVersion is the API version of the referent",
|
||||||
Type: []string{"string"},
|
Type: []string{"string"},
|
||||||
Format: "",
|
Format: "",
|
||||||
},
|
},
|
||||||
@ -355,14 +355,14 @@ func schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscaler(ref common.Referenc
|
|||||||
},
|
},
|
||||||
"spec": {
|
"spec": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.",
|
Description: "spec defines the behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.",
|
||||||
Default: map[string]interface{}{},
|
Default: map[string]interface{}{},
|
||||||
Ref: ref("k8s.io/api/autoscaling/v1.HorizontalPodAutoscalerSpec"),
|
Ref: ref("k8s.io/api/autoscaling/v1.HorizontalPodAutoscalerSpec"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"status": {
|
"status": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "current information about the autoscaler.",
|
Description: "status is the current information about the autoscaler.",
|
||||||
Default: map[string]interface{}{},
|
Default: map[string]interface{}{},
|
||||||
Ref: ref("k8s.io/api/autoscaling/v1.HorizontalPodAutoscalerStatus"),
|
Ref: ref("k8s.io/api/autoscaling/v1.HorizontalPodAutoscalerStatus"),
|
||||||
},
|
},
|
||||||
@ -458,7 +458,7 @@ func schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerList(ref common.Refe
|
|||||||
},
|
},
|
||||||
"items": {
|
"items": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "list of horizontal pod autoscaler objects.",
|
Description: "items is the list of horizontal pod autoscaler objects.",
|
||||||
Type: []string{"array"},
|
Type: []string{"array"},
|
||||||
Items: &spec.SchemaOrArray{
|
Items: &spec.SchemaOrArray{
|
||||||
Schema: &spec.Schema{
|
Schema: &spec.Schema{
|
||||||
@ -502,7 +502,7 @@ func schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerSpec(ref common.Refe
|
|||||||
},
|
},
|
||||||
"maxReplicas": {
|
"maxReplicas": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.",
|
Description: "maxReplicas is the upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.",
|
||||||
Default: 0,
|
Default: 0,
|
||||||
Type: []string{"integer"},
|
Type: []string{"integer"},
|
||||||
Format: "int32",
|
Format: "int32",
|
||||||
@ -510,7 +510,7 @@ func schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerSpec(ref common.Refe
|
|||||||
},
|
},
|
||||||
"targetCPUUtilizationPercentage": {
|
"targetCPUUtilizationPercentage": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "target average CPU utilization (represented as a percentage of requested CPU) over all the pods; if not specified the default autoscaling policy will be used.",
|
Description: "targetCPUUtilizationPercentage is the target average CPU utilization (represented as a percentage of requested CPU) over all the pods; if not specified the default autoscaling policy will be used.",
|
||||||
Type: []string{"integer"},
|
Type: []string{"integer"},
|
||||||
Format: "int32",
|
Format: "int32",
|
||||||
},
|
},
|
||||||
@ -533,20 +533,20 @@ func schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerStatus(ref common.Re
|
|||||||
Properties: map[string]spec.Schema{
|
Properties: map[string]spec.Schema{
|
||||||
"observedGeneration": {
|
"observedGeneration": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "most recent generation observed by this autoscaler.",
|
Description: "observedGeneration is the most recent generation observed by this autoscaler.",
|
||||||
Type: []string{"integer"},
|
Type: []string{"integer"},
|
||||||
Format: "int64",
|
Format: "int64",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"lastScaleTime": {
|
"lastScaleTime": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "last time the HorizontalPodAutoscaler scaled the number of pods; used by the autoscaler to control how often the number of pods is changed.",
|
Description: "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.",
|
||||||
Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"),
|
Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"currentReplicas": {
|
"currentReplicas": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "current number of replicas of pods managed by this autoscaler.",
|
Description: "currentReplicas is the current number of replicas of pods managed by this autoscaler.",
|
||||||
Default: 0,
|
Default: 0,
|
||||||
Type: []string{"integer"},
|
Type: []string{"integer"},
|
||||||
Format: "int32",
|
Format: "int32",
|
||||||
@ -554,7 +554,7 @@ func schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerStatus(ref common.Re
|
|||||||
},
|
},
|
||||||
"desiredReplicas": {
|
"desiredReplicas": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "desired number of replicas of pods managed by this autoscaler.",
|
Description: "desiredReplicas is the desired number of replicas of pods managed by this autoscaler.",
|
||||||
Default: 0,
|
Default: 0,
|
||||||
Type: []string{"integer"},
|
Type: []string{"integer"},
|
||||||
Format: "int32",
|
Format: "int32",
|
||||||
@ -562,7 +562,7 @@ func schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscalerStatus(ref common.Re
|
|||||||
},
|
},
|
||||||
"currentCPUUtilizationPercentage": {
|
"currentCPUUtilizationPercentage": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "current average CPU utilization over all pods, represented as a percentage of requested CPU, e.g. 70 means that an average pod is using now 70% of its requested CPU.",
|
Description: "currentCPUUtilizationPercentage is the current average CPU utilization over all pods, represented as a percentage of requested CPU, e.g. 70 means that an average pod is using now 70% of its requested CPU.",
|
||||||
Type: []string{"integer"},
|
Type: []string{"integer"},
|
||||||
Format: "int32",
|
Format: "int32",
|
||||||
},
|
},
|
||||||
@ -612,7 +612,7 @@ func schema_k8sio_api_autoscaling_v1_MetricSpec(ref common.ReferenceCallback) co
|
|||||||
},
|
},
|
||||||
"containerResource": {
|
"containerResource": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "container resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod of 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. This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag.",
|
Description: "containerResource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod of 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. This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag.",
|
||||||
Ref: ref("k8s.io/api/autoscaling/v1.ContainerResourceMetricSource"),
|
Ref: ref("k8s.io/api/autoscaling/v1.ContainerResourceMetricSource"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -667,7 +667,7 @@ func schema_k8sio_api_autoscaling_v1_MetricStatus(ref common.ReferenceCallback)
|
|||||||
},
|
},
|
||||||
"containerResource": {
|
"containerResource": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "container resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in 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.",
|
Description: "containerResource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in 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.",
|
||||||
Ref: ref("k8s.io/api/autoscaling/v1.ContainerResourceMetricStatus"),
|
Ref: ref("k8s.io/api/autoscaling/v1.ContainerResourceMetricStatus"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -965,14 +965,14 @@ func schema_k8sio_api_autoscaling_v1_Scale(ref common.ReferenceCallback) common.
|
|||||||
},
|
},
|
||||||
"spec": {
|
"spec": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.",
|
Description: "spec defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.",
|
||||||
Default: map[string]interface{}{},
|
Default: map[string]interface{}{},
|
||||||
Ref: ref("k8s.io/api/autoscaling/v1.ScaleSpec"),
|
Ref: ref("k8s.io/api/autoscaling/v1.ScaleSpec"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"status": {
|
"status": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only.",
|
Description: "status is the current status of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. Read-only.",
|
||||||
Default: map[string]interface{}{},
|
Default: map[string]interface{}{},
|
||||||
Ref: ref("k8s.io/api/autoscaling/v1.ScaleStatus"),
|
Ref: ref("k8s.io/api/autoscaling/v1.ScaleStatus"),
|
||||||
},
|
},
|
||||||
@ -994,7 +994,7 @@ func schema_k8sio_api_autoscaling_v1_ScaleSpec(ref common.ReferenceCallback) com
|
|||||||
Properties: map[string]spec.Schema{
|
Properties: map[string]spec.Schema{
|
||||||
"replicas": {
|
"replicas": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "desired number of instances for the scaled object.",
|
Description: "replicas is the desired number of instances for the scaled object.",
|
||||||
Type: []string{"integer"},
|
Type: []string{"integer"},
|
||||||
Format: "int32",
|
Format: "int32",
|
||||||
},
|
},
|
||||||
@ -1014,7 +1014,7 @@ func schema_k8sio_api_autoscaling_v1_ScaleStatus(ref common.ReferenceCallback) c
|
|||||||
Properties: map[string]spec.Schema{
|
Properties: map[string]spec.Schema{
|
||||||
"replicas": {
|
"replicas": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "actual number of observed instances of the scaled object.",
|
Description: "replicas is the actual number of observed instances of the scaled object.",
|
||||||
Default: 0,
|
Default: 0,
|
||||||
Type: []string{"integer"},
|
Type: []string{"integer"},
|
||||||
Format: "int32",
|
Format: "int32",
|
||||||
@ -1022,7 +1022,7 @@ func schema_k8sio_api_autoscaling_v1_ScaleStatus(ref common.ReferenceCallback) c
|
|||||||
},
|
},
|
||||||
"selector": {
|
"selector": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "label query over pods that should match the replicas count. This is same as the label selector but in the string format to avoid introspection by clients. The string will be in the same format as the query-param syntax. More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors",
|
Description: "selector is the label query over pods that should match the replicas count. This is same as the label selector but in the string format to avoid introspection by clients. The string will be in the same format as the query-param syntax. More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors",
|
||||||
Type: []string{"string"},
|
Type: []string{"string"},
|
||||||
Format: "",
|
Format: "",
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user