diff --git a/api/openapi-spec/swagger.json b/api/openapi-spec/swagger.json index 84c720a81172..797db970cf5d 100644 --- a/api/openapi-spec/swagger.json +++ b/api/openapi-spec/swagger.json @@ -2238,7 +2238,7 @@ ], "type": "object" }, - "io.k8s.api.autoscaling.v2beta1.ContainerResourceMetricSource": { + "io.k8s.api.autoscaling.v2.ContainerResourceMetricSource": { "description": "ContainerResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set.", "properties": { "container": { @@ -2249,51 +2249,42 @@ "description": "name is the name of the resource in question.", "type": "string" }, - "targetAverageUtilization": { - "description": "targetAverageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods.", - "format": "int32", - "type": "integer" - }, - "targetAverageValue": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity", - "description": "targetAverageValue is the target value of the average of the 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." + "target": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.MetricTarget", + "description": "target specifies the target value for the given metric" } }, "required": [ "name", + "target", "container" ], "type": "object" }, - "io.k8s.api.autoscaling.v2beta1.ContainerResourceMetricStatus": { + "io.k8s.api.autoscaling.v2.ContainerResourceMetricStatus": { "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": { "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" }, - "currentAverageUtilization": { - "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. It will only be present if `targetAverageValue` was set in the corresponding metric specification.", - "format": "int32", - "type": "integer" - }, - "currentAverageValue": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity", - "description": "currentAverageValue is the current value of the average of the 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. It will always be set, regardless of the corresponding metric specification." + "current": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.MetricValueStatus", + "description": "current contains the current value for the given metric" }, "name": { - "description": "name is the name of the resource in question.", + "description": "Name is the name of the resource in question.", "type": "string" } }, "required": [ "name", - "currentAverageValue", + "current", "container" ], "type": "object" }, - "io.k8s.api.autoscaling.v2beta1.CrossVersionObjectReference": { + "io.k8s.api.autoscaling.v2.CrossVersionObjectReference": { "description": "CrossVersionObjectReference contains enough information to let you identify the referred resource.", "properties": { "apiVersion": { @@ -2315,58 +2306,91 @@ ], "type": "object" }, - "io.k8s.api.autoscaling.v2beta1.ExternalMetricSource": { - "description": "ExternalMetricSource indicates how to scale on a metric not associated with any Kubernetes object (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster). Exactly one \"target\" type should be set.", + "io.k8s.api.autoscaling.v2.ExternalMetricSource": { + "description": "ExternalMetricSource indicates how to scale on a metric not associated with any Kubernetes object (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).", "properties": { - "metricName": { - "description": "metricName is the name of the metric in question.", - "type": "string" - }, - "metricSelector": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector", - "description": "metricSelector is used to identify a specific time series within a given metric." - }, - "targetAverageValue": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity", - "description": "targetAverageValue is the target per-pod value of global metric (as a quantity). Mutually exclusive with TargetValue." + "metric": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.MetricIdentifier", + "description": "metric identifies the target metric by name and selector" }, - "targetValue": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity", - "description": "targetValue is the target value of the metric (as a quantity). Mutually exclusive with TargetAverageValue." + "target": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.MetricTarget", + "description": "target specifies the target value for the given metric" } }, "required": [ - "metricName" + "metric", + "target" ], "type": "object" }, - "io.k8s.api.autoscaling.v2beta1.ExternalMetricStatus": { + "io.k8s.api.autoscaling.v2.ExternalMetricStatus": { "description": "ExternalMetricStatus indicates the current value of a global metric not associated with any Kubernetes object.", "properties": { - "currentAverageValue": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity", - "description": "currentAverageValue is the current value of metric averaged over autoscaled pods." + "current": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.MetricValueStatus", + "description": "current contains the current value for the given metric" }, - "currentValue": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity", - "description": "currentValue is the current value of the metric (as a quantity)" + "metric": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.MetricIdentifier", + "description": "metric identifies the target metric by name and selector" + } + }, + "required": [ + "metric", + "current" + ], + "type": "object" + }, + "io.k8s.api.autoscaling.v2.HPAScalingPolicy": { + "description": "HPAScalingPolicy is a single policy which must hold true for a specified past interval.", + "properties": { + "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).", + "format": "int32", + "type": "integer" }, - "metricName": { - "description": "metricName is the name of a metric used for autoscaling in metric system.", + "type": { + "description": "Type is used to specify the scaling policy.", "type": "string" }, - "metricSelector": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector", - "description": "metricSelector is used to identify a specific time series within a given metric." + "value": { + "description": "Value contains the amount of change which is permitted by the policy. It must be greater than zero", + "format": "int32", + "type": "integer" } }, "required": [ - "metricName", - "currentValue" + "type", + "value", + "periodSeconds" ], "type": "object" }, - "io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscaler": { + "io.k8s.api.autoscaling.v2.HPAScalingRules": { + "description": "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.", + "properties": { + "policies": { + "description": "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", + "items": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HPAScalingPolicy" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" + }, + "selectPolicy": { + "description": "selectPolicy is used to specify which policy should be used. If not set, the default value Max is used.", + "type": "string" + }, + "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).", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler": { "description": "HorizontalPodAutoscaler is the configuration for a horizontal pod autoscaler, which automatically manages the replica count of any resource implementing the scale subresource based on the metrics specified.", "properties": { "apiVersion": { @@ -2382,11 +2406,11 @@ "description": "metadata is the standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" }, "spec": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerSpec", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerSpec", "description": "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." }, "status": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerStatus", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerStatus", "description": "status is the current information about the autoscaler." } }, @@ -2395,11 +2419,25 @@ { "group": "autoscaling", "kind": "HorizontalPodAutoscaler", - "version": "v2beta1" + "version": "v2" } ] }, - "io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerCondition": { + "io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerBehavior": { + "description": "HorizontalPodAutoscalerBehavior configures the scaling behavior of the target in both Up and Down directions (scaleUp and scaleDown fields respectively).", + "properties": { + "scaleDown": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HPAScalingRules", + "description": "scaleDown is scaling policy for scaling Down. If not set, the default value is to allow to scale down to minReplicas pods, with a 300 second stabilization window (i.e., the highest recommendation for the last 300sec is used)." + }, + "scaleUp": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HPAScalingRules", + "description": "scaleUp is scaling policy for scaling Up. If not set, the default value is the higher of:\n * increase no more than 4 pods per 60 seconds\n * double the number of pods per 60 seconds\nNo stabilization is used." + } + }, + "type": "object" + }, + "io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerCondition": { "description": "HorizontalPodAutoscalerCondition describes the state of a HorizontalPodAutoscaler at a certain point.", "properties": { "lastTransitionTime": { @@ -2429,8 +2467,8 @@ ], "type": "object" }, - "io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerList": { - "description": "HorizontalPodAutoscaler is a list of horizontal pod autoscaler objects.", + "io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerList": { + "description": "HorizontalPodAutoscalerList is a list of horizontal pod autoscaler objects.", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", @@ -2439,7 +2477,7 @@ "items": { "description": "items is the list of horizontal pod autoscaler objects.", "items": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscaler" + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler" }, "type": "array" }, @@ -2460,24 +2498,29 @@ { "group": "autoscaling", "kind": "HorizontalPodAutoscalerList", - "version": "v2beta1" + "version": "v2" } ] }, - "io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerSpec": { + "io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerSpec": { "description": "HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler.", "properties": { + "behavior": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerBehavior", + "description": "behavior configures the scaling behavior of the target in both Up and Down directions (scaleUp and scaleDown fields respectively). If not set, the default HPAScalingRules for scale up and scale down are used." + }, "maxReplicas": { "description": "maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up. It cannot be less that minReplicas.", "format": "int32", "type": "integer" }, "metrics": { - "description": "metrics contains the specifications for which to use to calculate the desired replica count (the maximum replica count across all metrics will be used). The desired replica count is calculated multiplying the ratio between the target value and the current value by the current number of pods. Ergo, metrics used must decrease as the pod count is increased, and vice-versa. See the individual metric source types for more information about how each type of metric must respond.", + "description": "metrics contains the specifications for which to use to calculate the desired replica count (the maximum replica count across all metrics will be used). The desired replica count is calculated multiplying the ratio between the target value and the current value by the current number of pods. Ergo, metrics used must decrease as the pod count is increased, and vice-versa. See the individual metric source types for more information about how each type of metric must respond. If not set, the default metric will be set to 80% average CPU utilization.", "items": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.MetricSpec" + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.MetricSpec" }, - "type": "array" + "type": "array", + "x-kubernetes-list-type": "atomic" }, "minReplicas": { "description": "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.", @@ -2485,7 +2528,7 @@ "type": "integer" }, "scaleTargetRef": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.CrossVersionObjectReference", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.CrossVersionObjectReference", "description": "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." } }, @@ -2495,22 +2538,29 @@ ], "type": "object" }, - "io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerStatus": { + "io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerStatus": { "description": "HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler.", "properties": { "conditions": { "description": "conditions is the set of conditions required for this autoscaler to scale its target, and indicates whether or not those conditions are met.", "items": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerCondition" + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerCondition" }, - "type": "array" + "type": "array", + "x-kubernetes-list-map-keys": [ + "type" + ], + "x-kubernetes-list-type": "map", + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge" }, "currentMetrics": { "description": "currentMetrics is the last read state of the metrics used by this autoscaler.", "items": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.MetricStatus" + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.MetricStatus" }, - "type": "array" + "type": "array", + "x-kubernetes-list-type": "atomic" }, "currentReplicas": { "description": "currentReplicas is current number of replicas of pods managed by this autoscaler, as last seen by the autoscaler.", @@ -2533,32 +2583,48 @@ } }, "required": [ - "currentReplicas", "desiredReplicas" ], "type": "object" }, - "io.k8s.api.autoscaling.v2beta1.MetricSpec": { + "io.k8s.api.autoscaling.v2.MetricIdentifier": { + "description": "MetricIdentifier defines the name and optionally selector for a metric", + "properties": { + "name": { + "description": "name is the name of the given metric", + "type": "string" + }, + "selector": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector", + "description": "selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics." + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "io.k8s.api.autoscaling.v2.MetricSpec": { "description": "MetricSpec specifies how to scale based on a single metric (only `type` and one other matching field should be set at once).", "properties": { "containerResource": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.ContainerResourceMetricSource", - "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." + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.ContainerResourceMetricSource", + "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." }, "external": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.ExternalMetricSource", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.ExternalMetricSource", "description": "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)." }, "object": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.ObjectMetricSource", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.ObjectMetricSource", "description": "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object)." }, "pods": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.PodsMetricSource", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.PodsMetricSource", "description": "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": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.ResourceMetricSource", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.ResourceMetricSource", "description": "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." }, "type": { @@ -2571,27 +2637,27 @@ ], "type": "object" }, - "io.k8s.api.autoscaling.v2beta1.MetricStatus": { + "io.k8s.api.autoscaling.v2.MetricStatus": { "description": "MetricStatus describes the last-read state of a single metric.", "properties": { "containerResource": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.ContainerResourceMetricStatus", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.ContainerResourceMetricStatus", "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." }, "external": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.ExternalMetricStatus", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.ExternalMetricStatus", "description": "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)." }, "object": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.ObjectMetricStatus", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.ObjectMetricStatus", "description": "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object)." }, "pods": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.PodsMetricStatus", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.PodsMetricStatus", "description": "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": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.ResourceMetricStatus", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.ResourceMetricStatus", "description": "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." }, "type": { @@ -2604,158 +2670,170 @@ ], "type": "object" }, - "io.k8s.api.autoscaling.v2beta1.ObjectMetricSource": { - "description": "ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).", + "io.k8s.api.autoscaling.v2.MetricTarget": { + "description": "MetricTarget defines the target value, average value, or average utilization of a specific metric", "properties": { + "averageUtilization": { + "description": "averageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. Currently only valid for Resource metric source type", + "format": "int32", + "type": "integer" + }, "averageValue": { "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity", "description": "averageValue is the target value of the average of the metric across all relevant pods (as a quantity)" }, - "metricName": { - "description": "metricName is the name of the metric in question.", + "type": { + "description": "type represents whether the metric type is Utilization, Value, or AverageValue", "type": "string" }, - "selector": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector", - "description": "selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping When unset, just the metricName will be used to gather metrics." - }, - "target": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.CrossVersionObjectReference", - "description": "target is the described Kubernetes object." - }, - "targetValue": { + "value": { "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity", - "description": "targetValue is the target value of the metric (as a quantity)." + "description": "value is the target value of the metric (as a quantity)." } }, "required": [ - "target", - "metricName", - "targetValue" + "type" ], "type": "object" }, - "io.k8s.api.autoscaling.v2beta1.ObjectMetricStatus": { - "description": "ObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).", + "io.k8s.api.autoscaling.v2.MetricValueStatus": { + "description": "MetricValueStatus holds the current value for a metric", "properties": { + "averageUtilization": { + "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.", + "format": "int32", + "type": "integer" + }, "averageValue": { "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity", "description": "averageValue is the current value of the average of the metric across all relevant pods (as a quantity)" }, - "currentValue": { + "value": { "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity", - "description": "currentValue is the current value of the metric (as a quantity)." - }, - "metricName": { - "description": "metricName is the name of the metric in question.", - "type": "string" + "description": "value is the current value of the metric (as a quantity)." + } + }, + "type": "object" + }, + "io.k8s.api.autoscaling.v2.ObjectMetricSource": { + "description": "ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).", + "properties": { + "describedObject": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.CrossVersionObjectReference", + "description": "describedObject specifies the descriptions of a object,such as kind,name apiVersion" }, - "selector": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector", - "description": "selector is the string-encoded form of a standard kubernetes label selector for the given metric When set in the ObjectMetricSource, 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." + "metric": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.MetricIdentifier", + "description": "metric identifies the target metric by name and selector" }, "target": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.CrossVersionObjectReference", - "description": "target is the described Kubernetes object." + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.MetricTarget", + "description": "target specifies the target value for the given metric" } }, "required": [ + "describedObject", "target", - "metricName", - "currentValue" + "metric" ], "type": "object" }, - "io.k8s.api.autoscaling.v2beta1.PodsMetricSource": { - "description": "PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", + "io.k8s.api.autoscaling.v2.ObjectMetricStatus": { + "description": "ObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).", "properties": { - "metricName": { - "description": "metricName is the name of the metric in question", - "type": "string" + "current": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.MetricValueStatus", + "description": "current contains the current value for the given metric" }, - "selector": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector", - "description": "selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping When unset, just the metricName will be used to gather metrics." + "describedObject": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.CrossVersionObjectReference", + "description": "DescribedObject specifies the descriptions of a object,such as kind,name apiVersion" }, - "targetAverageValue": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity", - "description": "targetAverageValue is the target value of the average of the metric across all relevant pods (as a quantity)" + "metric": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.MetricIdentifier", + "description": "metric identifies the target metric by name and selector" } }, "required": [ - "metricName", - "targetAverageValue" + "metric", + "current", + "describedObject" ], "type": "object" }, - "io.k8s.api.autoscaling.v2beta1.PodsMetricStatus": { - "description": "PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second).", + "io.k8s.api.autoscaling.v2.PodsMetricSource": { + "description": "PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", "properties": { - "currentAverageValue": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity", - "description": "currentAverageValue is the current value of the average of the metric across all relevant pods (as a quantity)" + "metric": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.MetricIdentifier", + "description": "metric identifies the target metric by name and selector" }, - "metricName": { - "description": "metricName is the name of the metric in question", - "type": "string" + "target": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.MetricTarget", + "description": "target specifies the target value for the given metric" + } + }, + "required": [ + "metric", + "target" + ], + "type": "object" + }, + "io.k8s.api.autoscaling.v2.PodsMetricStatus": { + "description": "PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second).", + "properties": { + "current": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.MetricValueStatus", + "description": "current contains the current value for the given metric" }, - "selector": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector", - "description": "selector is the string-encoded form of a standard kubernetes label selector for the given metric When set in the PodsMetricSource, 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." + "metric": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.MetricIdentifier", + "description": "metric identifies the target metric by name and selector" } }, "required": [ - "metricName", - "currentAverageValue" + "metric", + "current" ], "type": "object" }, - "io.k8s.api.autoscaling.v2beta1.ResourceMetricSource": { + "io.k8s.api.autoscaling.v2.ResourceMetricSource": { "description": "ResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set.", "properties": { "name": { "description": "name is the name of the resource in question.", "type": "string" }, - "targetAverageUtilization": { - "description": "targetAverageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods.", - "format": "int32", - "type": "integer" - }, - "targetAverageValue": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity", - "description": "targetAverageValue is the target value of the average of the 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." + "target": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.MetricTarget", + "description": "target specifies the target value for the given metric" } }, "required": [ - "name" + "name", + "target" ], "type": "object" }, - "io.k8s.api.autoscaling.v2beta1.ResourceMetricStatus": { + "io.k8s.api.autoscaling.v2.ResourceMetricStatus": { "description": "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.", "properties": { - "currentAverageUtilization": { - "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. It will only be present if `targetAverageValue` was set in the corresponding metric specification.", - "format": "int32", - "type": "integer" - }, - "currentAverageValue": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity", - "description": "currentAverageValue is the current value of the average of the 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. It will always be set, regardless of the corresponding metric specification." + "current": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.MetricValueStatus", + "description": "current contains the current value for the given metric" }, "name": { - "description": "name is the name of the resource in question.", + "description": "Name is the name of the resource in question.", "type": "string" } }, "required": [ "name", - "currentAverageValue" + "current" ], "type": "object" }, - "io.k8s.api.autoscaling.v2beta2.ContainerResourceMetricSource": { + "io.k8s.api.autoscaling.v2beta1.ContainerResourceMetricSource": { "description": "ContainerResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set.", "properties": { "container": { @@ -2766,42 +2844,51 @@ "description": "name is the name of the resource in question.", "type": "string" }, - "target": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.MetricTarget", - "description": "target specifies the target value for the given metric" + "targetAverageUtilization": { + "description": "targetAverageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods.", + "format": "int32", + "type": "integer" + }, + "targetAverageValue": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity", + "description": "targetAverageValue is the target value of the average of the 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." } }, "required": [ "name", - "target", "container" ], "type": "object" }, - "io.k8s.api.autoscaling.v2beta2.ContainerResourceMetricStatus": { + "io.k8s.api.autoscaling.v2beta1.ContainerResourceMetricStatus": { "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": { "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" }, - "current": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.MetricValueStatus", - "description": "current contains the current value for the given metric" + "currentAverageUtilization": { + "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. It will only be present if `targetAverageValue` was set in the corresponding metric specification.", + "format": "int32", + "type": "integer" + }, + "currentAverageValue": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity", + "description": "currentAverageValue is the current value of the average of the 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. It will always be set, regardless of the corresponding metric specification." }, "name": { - "description": "Name is the name of the resource in question.", + "description": "name is the name of the resource in question.", "type": "string" } }, "required": [ "name", - "current", + "currentAverageValue", "container" ], "type": "object" }, - "io.k8s.api.autoscaling.v2beta2.CrossVersionObjectReference": { + "io.k8s.api.autoscaling.v2beta1.CrossVersionObjectReference": { "description": "CrossVersionObjectReference contains enough information to let you identify the referred resource.", "properties": { "apiVersion": { @@ -2823,90 +2910,58 @@ ], "type": "object" }, - "io.k8s.api.autoscaling.v2beta2.ExternalMetricSource": { - "description": "ExternalMetricSource indicates how to scale on a metric not associated with any Kubernetes object (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).", + "io.k8s.api.autoscaling.v2beta1.ExternalMetricSource": { + "description": "ExternalMetricSource indicates how to scale on a metric not associated with any Kubernetes object (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster). Exactly one \"target\" type should be set.", "properties": { - "metric": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.MetricIdentifier", - "description": "metric identifies the target metric by name and selector" + "metricName": { + "description": "metricName is the name of the metric in question.", + "type": "string" }, - "target": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.MetricTarget", - "description": "target specifies the target value for the given metric" + "metricSelector": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector", + "description": "metricSelector is used to identify a specific time series within a given metric." + }, + "targetAverageValue": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity", + "description": "targetAverageValue is the target per-pod value of global metric (as a quantity). Mutually exclusive with TargetValue." + }, + "targetValue": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity", + "description": "targetValue is the target value of the metric (as a quantity). Mutually exclusive with TargetAverageValue." } }, "required": [ - "metric", - "target" + "metricName" ], "type": "object" }, - "io.k8s.api.autoscaling.v2beta2.ExternalMetricStatus": { + "io.k8s.api.autoscaling.v2beta1.ExternalMetricStatus": { "description": "ExternalMetricStatus indicates the current value of a global metric not associated with any Kubernetes object.", "properties": { - "current": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.MetricValueStatus", - "description": "current contains the current value for the given metric" + "currentAverageValue": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity", + "description": "currentAverageValue is the current value of metric averaged over autoscaled pods." }, - "metric": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.MetricIdentifier", - "description": "metric identifies the target metric by name and selector" - } - }, - "required": [ - "metric", - "current" - ], - "type": "object" - }, - "io.k8s.api.autoscaling.v2beta2.HPAScalingPolicy": { - "description": "HPAScalingPolicy is a single policy which must hold true for a specified past interval.", - "properties": { - "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).", - "format": "int32", - "type": "integer" + "currentValue": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity", + "description": "currentValue is the current value of the metric (as a quantity)" }, - "type": { - "description": "Type is used to specify the scaling policy.", + "metricName": { + "description": "metricName is the name of a metric used for autoscaling in metric system.", "type": "string" }, - "value": { - "description": "Value contains the amount of change which is permitted by the policy. It must be greater than zero", - "format": "int32", - "type": "integer" + "metricSelector": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector", + "description": "metricSelector is used to identify a specific time series within a given metric." } }, "required": [ - "type", - "value", - "periodSeconds" + "metricName", + "currentValue" ], "type": "object" }, - "io.k8s.api.autoscaling.v2beta2.HPAScalingRules": { - "description": "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.", - "properties": { - "policies": { - "description": "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", - "items": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.HPAScalingPolicy" - }, - "type": "array" - }, - "selectPolicy": { - "description": "selectPolicy is used to specify which policy should be used. If not set, the default value MaxPolicySelect is used.", - "type": "string" - }, - "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).", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscaler": { + "io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscaler": { "description": "HorizontalPodAutoscaler is the configuration for a horizontal pod autoscaler, which automatically manages the replica count of any resource implementing the scale subresource based on the metrics specified.", "properties": { "apiVersion": { @@ -2922,11 +2977,11 @@ "description": "metadata is the standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" }, "spec": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerSpec", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerSpec", "description": "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." }, "status": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerStatus", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerStatus", "description": "status is the current information about the autoscaler." } }, @@ -2935,25 +2990,11 @@ { "group": "autoscaling", "kind": "HorizontalPodAutoscaler", - "version": "v2beta2" + "version": "v2beta1" } ] }, - "io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerBehavior": { - "description": "HorizontalPodAutoscalerBehavior configures the scaling behavior of the target in both Up and Down directions (scaleUp and scaleDown fields respectively).", - "properties": { - "scaleDown": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.HPAScalingRules", - "description": "scaleDown is scaling policy for scaling Down. If not set, the default value is to allow to scale down to minReplicas pods, with a 300 second stabilization window (i.e., the highest recommendation for the last 300sec is used)." - }, - "scaleUp": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.HPAScalingRules", - "description": "scaleUp is scaling policy for scaling Up. If not set, the default value is the higher of:\n * increase no more than 4 pods per 60 seconds\n * double the number of pods per 60 seconds\nNo stabilization is used." - } - }, - "type": "object" - }, - "io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerCondition": { + "io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerCondition": { "description": "HorizontalPodAutoscalerCondition describes the state of a HorizontalPodAutoscaler at a certain point.", "properties": { "lastTransitionTime": { @@ -2983,8 +3024,8 @@ ], "type": "object" }, - "io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerList": { - "description": "HorizontalPodAutoscalerList is a list of horizontal pod autoscaler objects.", + "io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerList": { + "description": "HorizontalPodAutoscaler is a list of horizontal pod autoscaler objects.", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", @@ -2993,7 +3034,7 @@ "items": { "description": "items is the list of horizontal pod autoscaler objects.", "items": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscaler" + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscaler" }, "type": "array" }, @@ -3014,26 +3055,22 @@ { "group": "autoscaling", "kind": "HorizontalPodAutoscalerList", - "version": "v2beta2" + "version": "v2beta1" } ] }, - "io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerSpec": { + "io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerSpec": { "description": "HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler.", "properties": { - "behavior": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerBehavior", - "description": "behavior configures the scaling behavior of the target in both Up and Down directions (scaleUp and scaleDown fields respectively). If not set, the default HPAScalingRules for scale up and scale down are used." - }, "maxReplicas": { "description": "maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up. It cannot be less that minReplicas.", "format": "int32", "type": "integer" }, "metrics": { - "description": "metrics contains the specifications for which to use to calculate the desired replica count (the maximum replica count across all metrics will be used). The desired replica count is calculated multiplying the ratio between the target value and the current value by the current number of pods. Ergo, metrics used must decrease as the pod count is increased, and vice-versa. See the individual metric source types for more information about how each type of metric must respond. If not set, the default metric will be set to 80% average CPU utilization.", + "description": "metrics contains the specifications for which to use to calculate the desired replica count (the maximum replica count across all metrics will be used). The desired replica count is calculated multiplying the ratio between the target value and the current value by the current number of pods. Ergo, metrics used must decrease as the pod count is increased, and vice-versa. See the individual metric source types for more information about how each type of metric must respond.", "items": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.MetricSpec" + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.MetricSpec" }, "type": "array" }, @@ -3043,7 +3080,7 @@ "type": "integer" }, "scaleTargetRef": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.CrossVersionObjectReference", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.CrossVersionObjectReference", "description": "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." } }, @@ -3053,20 +3090,20 @@ ], "type": "object" }, - "io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerStatus": { + "io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerStatus": { "description": "HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler.", "properties": { "conditions": { "description": "conditions is the set of conditions required for this autoscaler to scale its target, and indicates whether or not those conditions are met.", "items": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerCondition" + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerCondition" }, "type": "array" }, "currentMetrics": { "description": "currentMetrics is the last read state of the metrics used by this autoscaler.", "items": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.MetricStatus" + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.MetricStatus" }, "type": "array" }, @@ -3096,44 +3133,27 @@ ], "type": "object" }, - "io.k8s.api.autoscaling.v2beta2.MetricIdentifier": { - "description": "MetricIdentifier defines the name and optionally selector for a metric", - "properties": { - "name": { - "description": "name is the name of the given metric", - "type": "string" - }, - "selector": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector", - "description": "selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics." - } - }, - "required": [ - "name" - ], - "type": "object" - }, - "io.k8s.api.autoscaling.v2beta2.MetricSpec": { + "io.k8s.api.autoscaling.v2beta1.MetricSpec": { "description": "MetricSpec specifies how to scale based on a single metric (only `type` and one other matching field should be set at once).", "properties": { "containerResource": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.ContainerResourceMetricSource", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.ContainerResourceMetricSource", "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." }, "external": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.ExternalMetricSource", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.ExternalMetricSource", "description": "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)." }, "object": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.ObjectMetricSource", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.ObjectMetricSource", "description": "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object)." }, "pods": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.PodsMetricSource", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.PodsMetricSource", "description": "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": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.ResourceMetricSource", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.ResourceMetricSource", "description": "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." }, "type": { @@ -3146,27 +3166,27 @@ ], "type": "object" }, - "io.k8s.api.autoscaling.v2beta2.MetricStatus": { + "io.k8s.api.autoscaling.v2beta1.MetricStatus": { "description": "MetricStatus describes the last-read state of a single metric.", "properties": { "containerResource": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.ContainerResourceMetricStatus", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.ContainerResourceMetricStatus", "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." }, "external": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.ExternalMetricStatus", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.ExternalMetricStatus", "description": "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)." }, "object": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.ObjectMetricStatus", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.ObjectMetricStatus", "description": "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object)." }, "pods": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.PodsMetricStatus", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.PodsMetricStatus", "description": "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": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.ResourceMetricStatus", + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.ResourceMetricStatus", "description": "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." }, "type": { @@ -3179,134 +3199,164 @@ ], "type": "object" }, - "io.k8s.api.autoscaling.v2beta2.MetricTarget": { - "description": "MetricTarget defines the target value, average value, or average utilization of a specific metric", + "io.k8s.api.autoscaling.v2beta1.ObjectMetricSource": { + "description": "ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).", "properties": { - "averageUtilization": { - "description": "averageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. Currently only valid for Resource metric source type", - "format": "int32", - "type": "integer" - }, "averageValue": { "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity", "description": "averageValue is the target value of the average of the metric across all relevant pods (as a quantity)" }, - "type": { - "description": "type represents whether the metric type is Utilization, Value, or AverageValue", + "metricName": { + "description": "metricName is the name of the metric in question.", "type": "string" }, - "value": { + "selector": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector", + "description": "selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping When unset, just the metricName will be used to gather metrics." + }, + "target": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.CrossVersionObjectReference", + "description": "target is the described Kubernetes object." + }, + "targetValue": { "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity", - "description": "value is the target value of the metric (as a quantity)." + "description": "targetValue is the target value of the metric (as a quantity)." } }, "required": [ - "type" + "target", + "metricName", + "targetValue" ], "type": "object" }, - "io.k8s.api.autoscaling.v2beta2.MetricValueStatus": { - "description": "MetricValueStatus holds the current value for a metric", + "io.k8s.api.autoscaling.v2beta1.ObjectMetricStatus": { + "description": "ObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).", "properties": { - "averageUtilization": { - "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.", - "format": "int32", - "type": "integer" - }, "averageValue": { "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity", "description": "averageValue is the current value of the average of the metric across all relevant pods (as a quantity)" }, - "value": { + "currentValue": { "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity", - "description": "value is the current value of the metric (as a quantity)." + "description": "currentValue is the current value of the metric (as a quantity)." + }, + "metricName": { + "description": "metricName is the name of the metric in question.", + "type": "string" + }, + "selector": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector", + "description": "selector is the string-encoded form of a standard kubernetes label selector for the given metric When set in the ObjectMetricSource, 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." + }, + "target": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.CrossVersionObjectReference", + "description": "target is the described Kubernetes object." } }, + "required": [ + "target", + "metricName", + "currentValue" + ], "type": "object" }, - "io.k8s.api.autoscaling.v2beta2.ObjectMetricSource": { - "description": "ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).", + "io.k8s.api.autoscaling.v2beta1.PodsMetricSource": { + "description": "PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", "properties": { - "describedObject": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.CrossVersionObjectReference" + "metricName": { + "description": "metricName is the name of the metric in question", + "type": "string" }, - "metric": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.MetricIdentifier", - "description": "metric identifies the target metric by name and selector" + "selector": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector", + "description": "selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping When unset, just the metricName will be used to gather metrics." }, - "target": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.MetricTarget", - "description": "target specifies the target value for the given metric" + "targetAverageValue": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity", + "description": "targetAverageValue is the target value of the average of the metric across all relevant pods (as a quantity)" } }, "required": [ - "describedObject", - "target", - "metric" + "metricName", + "targetAverageValue" ], "type": "object" }, - "io.k8s.api.autoscaling.v2beta2.ObjectMetricStatus": { - "description": "ObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).", + "io.k8s.api.autoscaling.v2beta1.PodsMetricStatus": { + "description": "PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second).", "properties": { - "current": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.MetricValueStatus", - "description": "current contains the current value for the given metric" + "currentAverageValue": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity", + "description": "currentAverageValue is the current value of the average of the metric across all relevant pods (as a quantity)" }, - "describedObject": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.CrossVersionObjectReference" + "metricName": { + "description": "metricName is the name of the metric in question", + "type": "string" }, - "metric": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.MetricIdentifier", - "description": "metric identifies the target metric by name and selector" + "selector": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector", + "description": "selector is the string-encoded form of a standard kubernetes label selector for the given metric When set in the PodsMetricSource, 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." } }, "required": [ - "metric", - "current", - "describedObject" + "metricName", + "currentAverageValue" ], "type": "object" }, - "io.k8s.api.autoscaling.v2beta2.PodsMetricSource": { - "description": "PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", + "io.k8s.api.autoscaling.v2beta1.ResourceMetricSource": { + "description": "ResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set.", "properties": { - "metric": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.MetricIdentifier", - "description": "metric identifies the target metric by name and selector" + "name": { + "description": "name is the name of the resource in question.", + "type": "string" }, - "target": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.MetricTarget", - "description": "target specifies the target value for the given metric" + "targetAverageUtilization": { + "description": "targetAverageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods.", + "format": "int32", + "type": "integer" + }, + "targetAverageValue": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity", + "description": "targetAverageValue is the target value of the average of the 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." } }, "required": [ - "metric", - "target" + "name" ], "type": "object" }, - "io.k8s.api.autoscaling.v2beta2.PodsMetricStatus": { - "description": "PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second).", + "io.k8s.api.autoscaling.v2beta1.ResourceMetricStatus": { + "description": "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.", "properties": { - "current": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.MetricValueStatus", - "description": "current contains the current value for the given metric" + "currentAverageUtilization": { + "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. It will only be present if `targetAverageValue` was set in the corresponding metric specification.", + "format": "int32", + "type": "integer" }, - "metric": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.MetricIdentifier", - "description": "metric identifies the target metric by name and selector" + "currentAverageValue": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity", + "description": "currentAverageValue is the current value of the average of the 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. It will always be set, regardless of the corresponding metric specification." + }, + "name": { + "description": "name is the name of the resource in question.", + "type": "string" } }, "required": [ - "metric", - "current" + "name", + "currentAverageValue" ], "type": "object" }, - "io.k8s.api.autoscaling.v2beta2.ResourceMetricSource": { - "description": "ResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set.", + "io.k8s.api.autoscaling.v2beta2.ContainerResourceMetricSource": { + "description": "ContainerResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set.", "properties": { + "container": { + "description": "container is the name of the container in the pods of the scaling target", + "type": "string" + }, "name": { "description": "name is the name of the resource in question.", "type": "string" @@ -3318,13 +3368,18 @@ }, "required": [ "name", - "target" + "target", + "container" ], "type": "object" }, - "io.k8s.api.autoscaling.v2beta2.ResourceMetricStatus": { - "description": "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.", + "io.k8s.api.autoscaling.v2beta2.ContainerResourceMetricStatus": { + "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": { + "container": { + "description": "Container is the name of the container in the pods of the scaling target", + "type": "string" + }, "current": { "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.MetricValueStatus", "description": "current contains the current value for the given metric" @@ -3336,143 +3391,118 @@ }, "required": [ "name", - "current" + "current", + "container" ], "type": "object" }, - "io.k8s.api.batch.v1.CronJob": { - "description": "CronJob represents the configuration of a single cron job.", + "io.k8s.api.autoscaling.v2beta2.CrossVersionObjectReference": { + "description": "CrossVersionObjectReference contains enough information to let you identify the referred resource.", "properties": { "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "description": "API version of the referent", "type": "string" }, "kind": { - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "description": "Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\"", "type": "string" }, - "metadata": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta", - "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" - }, - "spec": { - "$ref": "#/definitions/io.k8s.api.batch.v1.CronJobSpec", - "description": "Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" - }, - "status": { - "$ref": "#/definitions/io.k8s.api.batch.v1.CronJobStatus", - "description": "Current status of a cron job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" + "name": { + "description": "Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names", + "type": "string" } }, - "type": "object", - "x-kubernetes-group-version-kind": [ - { - "group": "batch", - "kind": "CronJob", - "version": "v1" - } - ] + "required": [ + "kind", + "name" + ], + "type": "object" }, - "io.k8s.api.batch.v1.CronJobList": { - "description": "CronJobList is a collection of cron jobs.", + "io.k8s.api.autoscaling.v2beta2.ExternalMetricSource": { + "description": "ExternalMetricSource indicates how to scale on a metric not associated with any Kubernetes object (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).", "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "items is the list of CronJobs.", - "items": { - "$ref": "#/definitions/io.k8s.api.batch.v1.CronJob" - }, - "type": "array" - }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - "type": "string" + "metric": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.MetricIdentifier", + "description": "metric identifies the target metric by name and selector" }, - "metadata": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta", - "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + "target": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.MetricTarget", + "description": "target specifies the target value for the given metric" } }, "required": [ - "items" + "metric", + "target" ], - "type": "object", - "x-kubernetes-group-version-kind": [ - { - "group": "batch", - "kind": "CronJobList", - "version": "v1" - } - ] + "type": "object" }, - "io.k8s.api.batch.v1.CronJobSpec": { - "description": "CronJobSpec describes how the job execution will look like and when it will actually run.", + "io.k8s.api.autoscaling.v2beta2.ExternalMetricStatus": { + "description": "ExternalMetricStatus indicates the current value of a global metric not associated with any Kubernetes object.", "properties": { - "concurrencyPolicy": { - "description": "Specifies how to treat concurrent executions of a Job. Valid values are: - \"Allow\" (default): allows CronJobs to run concurrently; - \"Forbid\": forbids concurrent runs, skipping next run if previous run hasn't finished yet; - \"Replace\": cancels currently running job and replaces it with a new one", - "type": "string" + "current": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.MetricValueStatus", + "description": "current contains the current value for the given metric" }, - "failedJobsHistoryLimit": { - "description": "The number of failed finished jobs to retain. Value must be non-negative integer. Defaults to 1.", + "metric": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.MetricIdentifier", + "description": "metric identifies the target metric by name and selector" + } + }, + "required": [ + "metric", + "current" + ], + "type": "object" + }, + "io.k8s.api.autoscaling.v2beta2.HPAScalingPolicy": { + "description": "HPAScalingPolicy is a single policy which must hold true for a specified past interval.", + "properties": { + "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).", "format": "int32", "type": "integer" }, - "jobTemplate": { - "$ref": "#/definitions/io.k8s.api.batch.v1.JobTemplateSpec", - "description": "Specifies the job that will be created when executing a CronJob." - }, - "schedule": { - "description": "The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.", + "type": { + "description": "Type is used to specify the scaling policy.", "type": "string" }, - "startingDeadlineSeconds": { - "description": "Optional deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones.", - "format": "int64", - "type": "integer" - }, - "successfulJobsHistoryLimit": { - "description": "The number of successful finished jobs to retain. Value must be non-negative integer. Defaults to 3.", + "value": { + "description": "Value contains the amount of change which is permitted by the policy. It must be greater than zero", "format": "int32", "type": "integer" - }, - "suspend": { - "description": "This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false.", - "type": "boolean" } }, "required": [ - "schedule", - "jobTemplate" + "type", + "value", + "periodSeconds" ], "type": "object" }, - "io.k8s.api.batch.v1.CronJobStatus": { - "description": "CronJobStatus represents the current state of a cron job.", + "io.k8s.api.autoscaling.v2beta2.HPAScalingRules": { + "description": "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.", "properties": { - "active": { - "description": "A list of pointers to currently running jobs.", + "policies": { + "description": "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", "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.ObjectReference" + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.HPAScalingPolicy" }, - "type": "array", - "x-kubernetes-list-type": "atomic" + "type": "array" }, - "lastScheduleTime": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time", - "description": "Information when was the last time the job was successfully scheduled." + "selectPolicy": { + "description": "selectPolicy is used to specify which policy should be used. If not set, the default value MaxPolicySelect is used.", + "type": "string" }, - "lastSuccessfulTime": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time", - "description": "Information when was the last time the job successfully completed." + "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).", + "format": "int32", + "type": "integer" } }, "type": "object" }, - "io.k8s.api.batch.v1.Job": { - "description": "Job represents the configuration of a single job.", + "io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscaler": { + "description": "HorizontalPodAutoscaler is the configuration for a horizontal pod autoscaler, which automatically manages the replica count of any resource implementing the scale subresource based on the metrics specified.", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", @@ -3484,51 +3514,61 @@ }, "metadata": { "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta", - "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + "description": "metadata is the standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" }, "spec": { - "$ref": "#/definitions/io.k8s.api.batch.v1.JobSpec", - "description": "Specification of the desired behavior of a job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerSpec", + "description": "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." }, "status": { - "$ref": "#/definitions/io.k8s.api.batch.v1.JobStatus", - "description": "Current status of a job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerStatus", + "description": "status is the current information about the autoscaler." } }, "type": "object", "x-kubernetes-group-version-kind": [ { - "group": "batch", - "kind": "Job", - "version": "v1" + "group": "autoscaling", + "kind": "HorizontalPodAutoscaler", + "version": "v2beta2" } ] }, - "io.k8s.api.batch.v1.JobCondition": { - "description": "JobCondition describes current state of a job.", + "io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerBehavior": { + "description": "HorizontalPodAutoscalerBehavior configures the scaling behavior of the target in both Up and Down directions (scaleUp and scaleDown fields respectively).", "properties": { - "lastProbeTime": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time", - "description": "Last time the condition was checked." + "scaleDown": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.HPAScalingRules", + "description": "scaleDown is scaling policy for scaling Down. If not set, the default value is to allow to scale down to minReplicas pods, with a 300 second stabilization window (i.e., the highest recommendation for the last 300sec is used)." }, + "scaleUp": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.HPAScalingRules", + "description": "scaleUp is scaling policy for scaling Up. If not set, the default value is the higher of:\n * increase no more than 4 pods per 60 seconds\n * double the number of pods per 60 seconds\nNo stabilization is used." + } + }, + "type": "object" + }, + "io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerCondition": { + "description": "HorizontalPodAutoscalerCondition describes the state of a HorizontalPodAutoscaler at a certain point.", + "properties": { "lastTransitionTime": { "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time", - "description": "Last time the condition transit from one status to another." + "description": "lastTransitionTime is the last time the condition transitioned from one status to another" }, "message": { - "description": "Human readable message indicating details about last transition.", + "description": "message is a human-readable explanation containing details about the transition", "type": "string" }, "reason": { - "description": "(brief) reason for the condition's last transition.", + "description": "reason is the reason for the condition's last transition.", "type": "string" }, "status": { - "description": "Status of the condition, one of True, False, Unknown.", + "description": "status is the status of the condition (True, False, Unknown)", "type": "string" }, "type": { - "description": "Type of job condition, Complete or Failed.", + "description": "type describes the current condition", "type": "string" } }, @@ -3538,17 +3578,17 @@ ], "type": "object" }, - "io.k8s.api.batch.v1.JobList": { - "description": "JobList is a collection of jobs.", + "io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerList": { + "description": "HorizontalPodAutoscalerList is a list of horizontal pod autoscaler objects.", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", "type": "string" }, "items": { - "description": "items is the list of Jobs.", + "description": "items is the list of horizontal pod autoscaler objects.", "items": { - "$ref": "#/definitions/io.k8s.api.batch.v1.Job" + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscaler" }, "type": "array" }, @@ -3558,7 +3598,7 @@ }, "metadata": { "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta", - "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + "description": "metadata is the standard list metadata." } }, "required": [ @@ -3567,155 +3607,335 @@ "type": "object", "x-kubernetes-group-version-kind": [ { - "group": "batch", - "kind": "JobList", - "version": "v1" + "group": "autoscaling", + "kind": "HorizontalPodAutoscalerList", + "version": "v2beta2" } ] }, - "io.k8s.api.batch.v1.JobSpec": { - "description": "JobSpec describes how the job execution will look like.", + "io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerSpec": { + "description": "HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler.", "properties": { - "activeDeadlineSeconds": { - "description": "Specifies the duration in seconds relative to the startTime that the job may be continuously active before the system tries to terminate it; value must be positive integer. If a Job is suspended (at creation or through an update), this timer will effectively be stopped and reset when the Job is resumed again.", - "format": "int64", - "type": "integer" - }, - "backoffLimit": { - "description": "Specifies the number of retries before marking this job failed. Defaults to 6", - "format": "int32", - "type": "integer" - }, - "completionMode": { - "description": "CompletionMode specifies how Pod completions are tracked. It can be `NonIndexed` (default) or `Indexed`.\n\n`NonIndexed` means that the Job is considered complete when there have been .spec.completions successfully completed Pods. Each Pod completion is homologous to each other.\n\n`Indexed` means that the Pods of a Job get an associated completion index from 0 to (.spec.completions - 1), available in the annotation batch.kubernetes.io/job-completion-index. The Job is considered complete when there is one successfully completed Pod for each index. When value is `Indexed`, .spec.completions must be specified and `.spec.parallelism` must be less than or equal to 10^5. In addition, The Pod name takes the form `$(job-name)-$(index)-$(random-string)`, the Pod hostname takes the form `$(job-name)-$(index)`.\n\nThis field is beta-level. More completion modes can be added in the future. If the Job controller observes a mode that it doesn't recognize, the controller skips updates for the Job.", - "type": "string" + "behavior": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerBehavior", + "description": "behavior configures the scaling behavior of the target in both Up and Down directions (scaleUp and scaleDown fields respectively). If not set, the default HPAScalingRules for scale up and scale down are used." }, - "completions": { - "description": "Specifies the desired number of successfully finished pods the job should be run with. Setting to nil means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/", + "maxReplicas": { + "description": "maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up. It cannot be less that minReplicas.", "format": "int32", "type": "integer" }, - "manualSelector": { - "description": "manualSelector controls generation of pod labels and pod selectors. Leave `manualSelector` unset unless you are certain what you are doing. When false or unset, the system pick labels unique to this job and appends those labels to the pod template. When true, the user is responsible for picking unique labels and specifying the selector. Failure to pick a unique label may cause this and other jobs to not function correctly. However, You may see `manualSelector=true` in jobs that were created with the old `extensions/v1beta1` API. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/#specifying-your-own-pod-selector", - "type": "boolean" + "metrics": { + "description": "metrics contains the specifications for which to use to calculate the desired replica count (the maximum replica count across all metrics will be used). The desired replica count is calculated multiplying the ratio between the target value and the current value by the current number of pods. Ergo, metrics used must decrease as the pod count is increased, and vice-versa. See the individual metric source types for more information about how each type of metric must respond. If not set, the default metric will be set to 80% average CPU utilization.", + "items": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.MetricSpec" + }, + "type": "array" }, - "parallelism": { - "description": "Specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism), i.e. when the work left to do is less than max parallelism. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/", + "minReplicas": { + "description": "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.", "format": "int32", "type": "integer" }, - "selector": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector", - "description": "A label query over pods that should match the pod count. Normally, the system sets this field for you. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors" - }, - "suspend": { - "description": "Suspend specifies whether the Job controller should create Pods or not. If a Job is created with suspend set to true, no Pods are created by the Job controller. If a Job is suspended after creation (i.e. the flag goes from false to true), the Job controller will delete all active Pods associated with this Job. Users must design their workload to gracefully handle this. Suspending a Job will reset the StartTime field of the Job, effectively resetting the ActiveDeadlineSeconds timer too. Defaults to false.\n\nThis field is beta-level, gated by SuspendJob feature flag (enabled by default).", - "type": "boolean" - }, - "template": { - "$ref": "#/definitions/io.k8s.api.core.v1.PodTemplateSpec", - "description": "Describes the pod that will be created when executing a job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/" - }, - "ttlSecondsAfterFinished": { - "description": "ttlSecondsAfterFinished limits the lifetime of a Job that has finished execution (either Complete or Failed). If this field is set, ttlSecondsAfterFinished after the Job finishes, it is eligible to be automatically deleted. When the Job is being deleted, its lifecycle guarantees (e.g. finalizers) will be honored. If this field is unset, the Job won't be automatically deleted. If this field is set to zero, the Job becomes eligible to be deleted immediately after it finishes.", - "format": "int32", - "type": "integer" + "scaleTargetRef": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.CrossVersionObjectReference", + "description": "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." } }, "required": [ - "template" + "scaleTargetRef", + "maxReplicas" ], "type": "object" }, - "io.k8s.api.batch.v1.JobStatus": { - "description": "JobStatus represents the current state of a Job.", + "io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerStatus": { + "description": "HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler.", "properties": { - "active": { - "description": "The number of pending and running pods.", - "format": "int32", - "type": "integer" - }, - "completedIndexes": { - "description": "CompletedIndexes holds the completed indexes when .spec.completionMode = \"Indexed\" in a text format. The indexes are represented as decimal integers separated by commas. The numbers are listed in increasing order. Three or more consecutive numbers are compressed and represented by the first and last element of the series, separated by a hyphen. For example, if the completed indexes are 1, 3, 4, 5 and 7, they are represented as \"1,3-5,7\".", - "type": "string" - }, - "completionTime": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time", - "description": "Represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. The completion time is only set when the job finishes successfully." - }, "conditions": { - "description": "The latest available observations of an object's current state. When a Job fails, one of the conditions will have type \"Failed\" and status true. When a Job is suspended, one of the conditions will have type \"Suspended\" and status true; when the Job is resumed, the status of this condition will become false. When a Job is completed, one of the conditions will have type \"Complete\" and status true. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/", + "description": "conditions is the set of conditions required for this autoscaler to scale its target, and indicates whether or not those conditions are met.", "items": { - "$ref": "#/definitions/io.k8s.api.batch.v1.JobCondition" + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerCondition" }, - "type": "array", - "x-kubernetes-list-type": "atomic", - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge" + "type": "array" }, - "failed": { - "description": "The number of pods which reached phase Failed.", + "currentMetrics": { + "description": "currentMetrics is the last read state of the metrics used by this autoscaler.", + "items": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.MetricStatus" + }, + "type": "array" + }, + "currentReplicas": { + "description": "currentReplicas is current number of replicas of pods managed by this autoscaler, as last seen by the autoscaler.", "format": "int32", "type": "integer" }, - "ready": { - "description": "The number of pods which have a Ready condition.\n\nThis field is alpha-level. The job controller populates the field when the feature gate JobReadyPods is enabled (disabled by default).", + "desiredReplicas": { + "description": "desiredReplicas is the desired number of replicas of pods managed by this autoscaler, as last calculated by the autoscaler.", "format": "int32", "type": "integer" }, - "startTime": { + "lastScaleTime": { "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time", - "description": "Represents time when the job controller started processing a job. When a Job is created in the suspended state, this field is not set until the first time it is resumed. This field is reset every time a Job is resumed from suspension. It is represented in RFC3339 form and is in UTC." + "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." }, - "succeeded": { - "description": "The number of pods which reached phase Succeeded.", + "observedGeneration": { + "description": "observedGeneration is the most recent generation observed by this autoscaler.", + "format": "int64", + "type": "integer" + } + }, + "required": [ + "currentReplicas", + "desiredReplicas" + ], + "type": "object" + }, + "io.k8s.api.autoscaling.v2beta2.MetricIdentifier": { + "description": "MetricIdentifier defines the name and optionally selector for a metric", + "properties": { + "name": { + "description": "name is the name of the given metric", + "type": "string" + }, + "selector": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector", + "description": "selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics." + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "io.k8s.api.autoscaling.v2beta2.MetricSpec": { + "description": "MetricSpec specifies how to scale based on a single metric (only `type` and one other matching field should be set at once).", + "properties": { + "containerResource": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.ContainerResourceMetricSource", + "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." + }, + "external": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.ExternalMetricSource", + "description": "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)." + }, + "object": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.ObjectMetricSource", + "description": "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object)." + }, + "pods": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.PodsMetricSource", + "description": "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": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.ResourceMetricSource", + "description": "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." + }, + "type": { + "description": "type is the type of metric source. It should be one of \"ContainerResource\", \"External\", \"Object\", \"Pods\" or \"Resource\", each mapping to a matching field in the object. Note: \"ContainerResource\" type is available on when the feature-gate HPAContainerMetrics is enabled", + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + "io.k8s.api.autoscaling.v2beta2.MetricStatus": { + "description": "MetricStatus describes the last-read state of a single metric.", + "properties": { + "containerResource": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.ContainerResourceMetricStatus", + "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." + }, + "external": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.ExternalMetricStatus", + "description": "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)." + }, + "object": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.ObjectMetricStatus", + "description": "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object)." + }, + "pods": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.PodsMetricStatus", + "description": "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": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.ResourceMetricStatus", + "description": "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." + }, + "type": { + "description": "type is the type of metric source. It will be one of \"ContainerResource\", \"External\", \"Object\", \"Pods\" or \"Resource\", each corresponds to a matching field in the object. Note: \"ContainerResource\" type is available on when the feature-gate HPAContainerMetrics is enabled", + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + "io.k8s.api.autoscaling.v2beta2.MetricTarget": { + "description": "MetricTarget defines the target value, average value, or average utilization of a specific metric", + "properties": { + "averageUtilization": { + "description": "averageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. Currently only valid for Resource metric source type", "format": "int32", "type": "integer" }, - "uncountedTerminatedPods": { - "$ref": "#/definitions/io.k8s.api.batch.v1.UncountedTerminatedPods", - "description": "UncountedTerminatedPods holds the UIDs of Pods that have terminated but the job controller hasn't yet accounted for in the status counters.\n\nThe job controller creates pods with a finalizer. When a pod terminates (succeeded or failed), the controller does three steps to account for it in the job status: (1) Add the pod UID to the arrays in this field. (2) Remove the pod finalizer. (3) Remove the pod UID from the arrays while increasing the corresponding\n counter.\n\nThis field is beta-level. The job controller only makes use of this field when the feature gate JobTrackingWithFinalizers is enabled (enabled by default). Old jobs might not be tracked using this field, in which case the field remains null." + "averageValue": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity", + "description": "averageValue is the target value of the average of the metric across all relevant pods (as a quantity)" + }, + "type": { + "description": "type represents whether the metric type is Utilization, Value, or AverageValue", + "type": "string" + }, + "value": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity", + "description": "value is the target value of the metric (as a quantity)." } }, + "required": [ + "type" + ], "type": "object" }, - "io.k8s.api.batch.v1.JobTemplateSpec": { - "description": "JobTemplateSpec describes the data a Job should have when created from a template", + "io.k8s.api.autoscaling.v2beta2.MetricValueStatus": { + "description": "MetricValueStatus holds the current value for a metric", "properties": { - "metadata": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta", - "description": "Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + "averageUtilization": { + "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.", + "format": "int32", + "type": "integer" }, - "spec": { - "$ref": "#/definitions/io.k8s.api.batch.v1.JobSpec", - "description": "Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" + "averageValue": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity", + "description": "averageValue is the current value of the average of the metric across all relevant pods (as a quantity)" + }, + "value": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity", + "description": "value is the current value of the metric (as a quantity)." } }, "type": "object" }, - "io.k8s.api.batch.v1.UncountedTerminatedPods": { - "description": "UncountedTerminatedPods holds UIDs of Pods that have terminated but haven't been accounted in Job status counters.", + "io.k8s.api.autoscaling.v2beta2.ObjectMetricSource": { + "description": "ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).", "properties": { - "failed": { - "description": "Failed holds UIDs of failed Pods.", - "items": { - "type": "string" - }, - "type": "array", - "x-kubernetes-list-type": "set" + "describedObject": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.CrossVersionObjectReference" }, - "succeeded": { - "description": "Succeeded holds UIDs of succeeded Pods.", - "items": { - "type": "string" - }, - "type": "array", - "x-kubernetes-list-type": "set" + "metric": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.MetricIdentifier", + "description": "metric identifies the target metric by name and selector" + }, + "target": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.MetricTarget", + "description": "target specifies the target value for the given metric" } }, + "required": [ + "describedObject", + "target", + "metric" + ], "type": "object" }, - "io.k8s.api.batch.v1beta1.CronJob": { + "io.k8s.api.autoscaling.v2beta2.ObjectMetricStatus": { + "description": "ObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).", + "properties": { + "current": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.MetricValueStatus", + "description": "current contains the current value for the given metric" + }, + "describedObject": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.CrossVersionObjectReference" + }, + "metric": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.MetricIdentifier", + "description": "metric identifies the target metric by name and selector" + } + }, + "required": [ + "metric", + "current", + "describedObject" + ], + "type": "object" + }, + "io.k8s.api.autoscaling.v2beta2.PodsMetricSource": { + "description": "PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", + "properties": { + "metric": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.MetricIdentifier", + "description": "metric identifies the target metric by name and selector" + }, + "target": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.MetricTarget", + "description": "target specifies the target value for the given metric" + } + }, + "required": [ + "metric", + "target" + ], + "type": "object" + }, + "io.k8s.api.autoscaling.v2beta2.PodsMetricStatus": { + "description": "PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second).", + "properties": { + "current": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.MetricValueStatus", + "description": "current contains the current value for the given metric" + }, + "metric": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.MetricIdentifier", + "description": "metric identifies the target metric by name and selector" + } + }, + "required": [ + "metric", + "current" + ], + "type": "object" + }, + "io.k8s.api.autoscaling.v2beta2.ResourceMetricSource": { + "description": "ResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set.", + "properties": { + "name": { + "description": "name is the name of the resource in question.", + "type": "string" + }, + "target": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.MetricTarget", + "description": "target specifies the target value for the given metric" + } + }, + "required": [ + "name", + "target" + ], + "type": "object" + }, + "io.k8s.api.autoscaling.v2beta2.ResourceMetricStatus": { + "description": "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.", + "properties": { + "current": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta2.MetricValueStatus", + "description": "current contains the current value for the given metric" + }, + "name": { + "description": "Name is the name of the resource in question.", + "type": "string" + } + }, + "required": [ + "name", + "current" + ], + "type": "object" + }, + "io.k8s.api.batch.v1.CronJob": { "description": "CronJob represents the configuration of a single cron job.", "properties": { "apiVersion": { @@ -3731,11 +3951,11 @@ "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" }, "spec": { - "$ref": "#/definitions/io.k8s.api.batch.v1beta1.CronJobSpec", + "$ref": "#/definitions/io.k8s.api.batch.v1.CronJobSpec", "description": "Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" }, "status": { - "$ref": "#/definitions/io.k8s.api.batch.v1beta1.CronJobStatus", + "$ref": "#/definitions/io.k8s.api.batch.v1.CronJobStatus", "description": "Current status of a cron job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" } }, @@ -3744,11 +3964,11 @@ { "group": "batch", "kind": "CronJob", - "version": "v1beta1" + "version": "v1" } ] }, - "io.k8s.api.batch.v1beta1.CronJobList": { + "io.k8s.api.batch.v1.CronJobList": { "description": "CronJobList is a collection of cron jobs.", "properties": { "apiVersion": { @@ -3758,7 +3978,7 @@ "items": { "description": "items is the list of CronJobs.", "items": { - "$ref": "#/definitions/io.k8s.api.batch.v1beta1.CronJob" + "$ref": "#/definitions/io.k8s.api.batch.v1.CronJob" }, "type": "array" }, @@ -3779,11 +3999,11 @@ { "group": "batch", "kind": "CronJobList", - "version": "v1beta1" + "version": "v1" } ] }, - "io.k8s.api.batch.v1beta1.CronJobSpec": { + "io.k8s.api.batch.v1.CronJobSpec": { "description": "CronJobSpec describes how the job execution will look like and when it will actually run.", "properties": { "concurrencyPolicy": { @@ -3791,12 +4011,12 @@ "type": "string" }, "failedJobsHistoryLimit": { - "description": "The number of failed finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.", + "description": "The number of failed finished jobs to retain. Value must be non-negative integer. Defaults to 1.", "format": "int32", "type": "integer" }, "jobTemplate": { - "$ref": "#/definitions/io.k8s.api.batch.v1beta1.JobTemplateSpec", + "$ref": "#/definitions/io.k8s.api.batch.v1.JobTemplateSpec", "description": "Specifies the job that will be created when executing a CronJob." }, "schedule": { @@ -3809,7 +4029,7 @@ "type": "integer" }, "successfulJobsHistoryLimit": { - "description": "The number of successful finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. Defaults to 3.", + "description": "The number of successful finished jobs to retain. Value must be non-negative integer. Defaults to 3.", "format": "int32", "type": "integer" }, @@ -3824,7 +4044,7 @@ ], "type": "object" }, - "io.k8s.api.batch.v1beta1.CronJobStatus": { + "io.k8s.api.batch.v1.CronJobStatus": { "description": "CronJobStatus represents the current state of a cron job.", "properties": { "active": { @@ -3846,22 +4066,8 @@ }, "type": "object" }, - "io.k8s.api.batch.v1beta1.JobTemplateSpec": { - "description": "JobTemplateSpec describes the data a Job should have when created from a template", - "properties": { - "metadata": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta", - "description": "Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" - }, - "spec": { - "$ref": "#/definitions/io.k8s.api.batch.v1.JobSpec", - "description": "Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" - } - }, - "type": "object" - }, - "io.k8s.api.certificates.v1.CertificateSigningRequest": { - "description": "CertificateSigningRequest objects provide a mechanism to obtain x509 certificates by submitting a certificate signing request, and having it asynchronously approved and issued.\n\nKubelets use this API to obtain:\n 1. client certificates to authenticate to kube-apiserver (with the \"kubernetes.io/kube-apiserver-client-kubelet\" signerName).\n 2. serving certificates for TLS endpoints kube-apiserver can connect to securely (with the \"kubernetes.io/kubelet-serving\" signerName).\n\nThis API can be used to request client certificates to authenticate to kube-apiserver (with the \"kubernetes.io/kube-apiserver-client\" signerName), or to obtain certificates from custom non-Kubernetes signers.", + "io.k8s.api.batch.v1.Job": { + "description": "Job represents the configuration of a single job.", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", @@ -3872,54 +4078,52 @@ "type": "string" }, "metadata": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta", + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" }, "spec": { - "$ref": "#/definitions/io.k8s.api.certificates.v1.CertificateSigningRequestSpec", - "description": "spec contains the certificate request, and is immutable after creation. Only the request, signerName, expirationSeconds, and usages fields can be set on creation. Other fields are derived by Kubernetes and cannot be modified by users." + "$ref": "#/definitions/io.k8s.api.batch.v1.JobSpec", + "description": "Specification of the desired behavior of a job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" }, "status": { - "$ref": "#/definitions/io.k8s.api.certificates.v1.CertificateSigningRequestStatus", - "description": "status contains information about whether the request is approved or denied, and the certificate issued by the signer, or the failure condition indicating signer failure." + "$ref": "#/definitions/io.k8s.api.batch.v1.JobStatus", + "description": "Current status of a job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" } }, - "required": [ - "spec" - ], "type": "object", "x-kubernetes-group-version-kind": [ { - "group": "certificates.k8s.io", - "kind": "CertificateSigningRequest", + "group": "batch", + "kind": "Job", "version": "v1" } ] }, - "io.k8s.api.certificates.v1.CertificateSigningRequestCondition": { - "description": "CertificateSigningRequestCondition describes a condition of a CertificateSigningRequest object", + "io.k8s.api.batch.v1.JobCondition": { + "description": "JobCondition describes current state of a job.", "properties": { - "lastTransitionTime": { + "lastProbeTime": { "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time", - "description": "lastTransitionTime is the time the condition last transitioned from one status to another. If unset, when a new condition type is added or an existing condition's status is changed, the server defaults this to the current time." + "description": "Last time the condition was checked." }, - "lastUpdateTime": { + "lastTransitionTime": { "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time", - "description": "lastUpdateTime is the time of the last update to this condition" + "description": "Last time the condition transit from one status to another." }, "message": { - "description": "message contains a human readable message with details about the request state", + "description": "Human readable message indicating details about last transition.", "type": "string" }, "reason": { - "description": "reason indicates a brief reason for the request state", + "description": "(brief) reason for the condition's last transition.", "type": "string" }, "status": { - "description": "status of the condition, one of True, False, Unknown. Approved, Denied, and Failed conditions may not be \"False\" or \"Unknown\".", + "description": "Status of the condition, one of True, False, Unknown.", "type": "string" }, "type": { - "description": "type of the condition. Known conditions are \"Approved\", \"Denied\", and \"Failed\".\n\nAn \"Approved\" condition is added via the /approval subresource, indicating the request was approved and should be issued by the signer.\n\nA \"Denied\" condition is added via the /approval subresource, indicating the request was denied and should not be issued by the signer.\n\nA \"Failed\" condition is added via the /status subresource, indicating the signer failed to issue the certificate.\n\nApproved and Denied conditions are mutually exclusive. Approved, Denied, and Failed conditions cannot be removed once added.\n\nOnly one condition of a given type is allowed.", + "description": "Type of job condition, Complete or Failed.", "type": "string" } }, @@ -3929,17 +4133,17 @@ ], "type": "object" }, - "io.k8s.api.certificates.v1.CertificateSigningRequestList": { - "description": "CertificateSigningRequestList is a collection of CertificateSigningRequest objects", + "io.k8s.api.batch.v1.JobList": { + "description": "JobList is a collection of jobs.", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", "type": "string" }, "items": { - "description": "items is a collection of CertificateSigningRequest objects", + "description": "items is the list of Jobs.", "items": { - "$ref": "#/definitions/io.k8s.api.certificates.v1.CertificateSigningRequest" + "$ref": "#/definitions/io.k8s.api.batch.v1.Job" }, "type": "array" }, @@ -3948,7 +4152,8 @@ "type": "string" }, "metadata": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta", + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" } }, "required": [ @@ -3957,90 +4162,480 @@ "type": "object", "x-kubernetes-group-version-kind": [ { - "group": "certificates.k8s.io", - "kind": "CertificateSigningRequestList", + "group": "batch", + "kind": "JobList", "version": "v1" } ] }, - "io.k8s.api.certificates.v1.CertificateSigningRequestSpec": { - "description": "CertificateSigningRequestSpec contains the certificate request.", + "io.k8s.api.batch.v1.JobSpec": { + "description": "JobSpec describes how the job execution will look like.", "properties": { - "expirationSeconds": { - "description": "expirationSeconds is the requested duration of validity of the issued certificate. The certificate signer may issue a certificate with a different validity duration so a client must check the delta between the notBefore and and notAfter fields in the issued certificate to determine the actual duration.\n\nThe v1.22+ in-tree implementations of the well-known Kubernetes signers will honor this field as long as the requested duration is not greater than the maximum duration they will honor per the --cluster-signing-duration CLI flag to the Kubernetes controller manager.\n\nCertificate signers may not honor this field for various reasons:\n\n 1. Old signer that is unaware of the field (such as the in-tree\n implementations prior to v1.22)\n 2. Signer whose configured maximum is shorter than the requested duration\n 3. Signer whose configured minimum is longer than the requested duration\n\nThe minimum valid value for expirationSeconds is 600, i.e. 10 minutes.\n\nAs of v1.22, this field is beta and is controlled via the CSRDuration feature gate.", + "activeDeadlineSeconds": { + "description": "Specifies the duration in seconds relative to the startTime that the job may be continuously active before the system tries to terminate it; value must be positive integer. If a Job is suspended (at creation or through an update), this timer will effectively be stopped and reset when the Job is resumed again.", + "format": "int64", + "type": "integer" + }, + "backoffLimit": { + "description": "Specifies the number of retries before marking this job failed. Defaults to 6", "format": "int32", "type": "integer" }, - "extra": { - "additionalProperties": { - "items": { - "type": "string" - }, - "type": "array" - }, - "description": "extra contains extra attributes of the user that created the CertificateSigningRequest. Populated by the API server on creation and immutable.", - "type": "object" + "completionMode": { + "description": "CompletionMode specifies how Pod completions are tracked. It can be `NonIndexed` (default) or `Indexed`.\n\n`NonIndexed` means that the Job is considered complete when there have been .spec.completions successfully completed Pods. Each Pod completion is homologous to each other.\n\n`Indexed` means that the Pods of a Job get an associated completion index from 0 to (.spec.completions - 1), available in the annotation batch.kubernetes.io/job-completion-index. The Job is considered complete when there is one successfully completed Pod for each index. When value is `Indexed`, .spec.completions must be specified and `.spec.parallelism` must be less than or equal to 10^5. In addition, The Pod name takes the form `$(job-name)-$(index)-$(random-string)`, the Pod hostname takes the form `$(job-name)-$(index)`.\n\nThis field is beta-level. More completion modes can be added in the future. If the Job controller observes a mode that it doesn't recognize, the controller skips updates for the Job.", + "type": "string" }, - "groups": { - "description": "groups contains group membership of the user that created the CertificateSigningRequest. Populated by the API server on creation and immutable.", - "items": { - "type": "string" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" + "completions": { + "description": "Specifies the desired number of successfully finished pods the job should be run with. Setting to nil means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/", + "format": "int32", + "type": "integer" }, - "request": { - "description": "request contains an x509 certificate signing request encoded in a \"CERTIFICATE REQUEST\" PEM block. When serialized as JSON or YAML, the data is additionally base64-encoded.", - "format": "byte", - "type": "string", - "x-kubernetes-list-type": "atomic" + "manualSelector": { + "description": "manualSelector controls generation of pod labels and pod selectors. Leave `manualSelector` unset unless you are certain what you are doing. When false or unset, the system pick labels unique to this job and appends those labels to the pod template. When true, the user is responsible for picking unique labels and specifying the selector. Failure to pick a unique label may cause this and other jobs to not function correctly. However, You may see `manualSelector=true` in jobs that were created with the old `extensions/v1beta1` API. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/#specifying-your-own-pod-selector", + "type": "boolean" }, - "signerName": { - "description": "signerName indicates the requested signer, and is a qualified name.\n\nList/watch requests for CertificateSigningRequests can filter on this field using a \"spec.signerName=NAME\" fieldSelector.\n\nWell-known Kubernetes signers are:\n 1. \"kubernetes.io/kube-apiserver-client\": issues client certificates that can be used to authenticate to kube-apiserver.\n Requests for this signer are never auto-approved by kube-controller-manager, can be issued by the \"csrsigning\" controller in kube-controller-manager.\n 2. \"kubernetes.io/kube-apiserver-client-kubelet\": issues client certificates that kubelets use to authenticate to kube-apiserver.\n Requests for this signer can be auto-approved by the \"csrapproving\" controller in kube-controller-manager, and can be issued by the \"csrsigning\" controller in kube-controller-manager.\n 3. \"kubernetes.io/kubelet-serving\" issues serving certificates that kubelets use to serve TLS endpoints, which kube-apiserver can connect to securely.\n Requests for this signer are never auto-approved by kube-controller-manager, and can be issued by the \"csrsigning\" controller in kube-controller-manager.\n\nMore details are available at https://k8s.io/docs/reference/access-authn-authz/certificate-signing-requests/#kubernetes-signers\n\nCustom signerNames can also be specified. The signer defines:\n 1. Trust distribution: how trust (CA bundles) are distributed.\n 2. Permitted subjects: and behavior when a disallowed subject is requested.\n 3. Required, permitted, or forbidden x509 extensions in the request (including whether subjectAltNames are allowed, which types, restrictions on allowed values) and behavior when a disallowed extension is requested.\n 4. Required, permitted, or forbidden key usages / extended key usages.\n 5. Expiration/certificate lifetime: whether it is fixed by the signer, configurable by the admin.\n 6. Whether or not requests for CA certificates are allowed.", - "type": "string" + "parallelism": { + "description": "Specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism), i.e. when the work left to do is less than max parallelism. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/", + "format": "int32", + "type": "integer" }, - "uid": { - "description": "uid contains the uid of the user that created the CertificateSigningRequest. Populated by the API server on creation and immutable.", - "type": "string" + "selector": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector", + "description": "A label query over pods that should match the pod count. Normally, the system sets this field for you. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors" }, - "usages": { - "description": "usages specifies a set of key usages requested in the issued certificate.\n\nRequests for TLS client certificates typically request: \"digital signature\", \"key encipherment\", \"client auth\".\n\nRequests for TLS serving certificates typically request: \"key encipherment\", \"digital signature\", \"server auth\".\n\nValid values are:\n \"signing\", \"digital signature\", \"content commitment\",\n \"key encipherment\", \"key agreement\", \"data encipherment\",\n \"cert sign\", \"crl sign\", \"encipher only\", \"decipher only\", \"any\",\n \"server auth\", \"client auth\",\n \"code signing\", \"email protection\", \"s/mime\",\n \"ipsec end system\", \"ipsec tunnel\", \"ipsec user\",\n \"timestamping\", \"ocsp signing\", \"microsoft sgc\", \"netscape sgc\"", - "items": { - "type": "string" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" + "suspend": { + "description": "Suspend specifies whether the Job controller should create Pods or not. If a Job is created with suspend set to true, no Pods are created by the Job controller. If a Job is suspended after creation (i.e. the flag goes from false to true), the Job controller will delete all active Pods associated with this Job. Users must design their workload to gracefully handle this. Suspending a Job will reset the StartTime field of the Job, effectively resetting the ActiveDeadlineSeconds timer too. Defaults to false.\n\nThis field is beta-level, gated by SuspendJob feature flag (enabled by default).", + "type": "boolean" }, - "username": { - "description": "username contains the name of the user that created the CertificateSigningRequest. Populated by the API server on creation and immutable.", - "type": "string" + "template": { + "$ref": "#/definitions/io.k8s.api.core.v1.PodTemplateSpec", + "description": "Describes the pod that will be created when executing a job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/" + }, + "ttlSecondsAfterFinished": { + "description": "ttlSecondsAfterFinished limits the lifetime of a Job that has finished execution (either Complete or Failed). If this field is set, ttlSecondsAfterFinished after the Job finishes, it is eligible to be automatically deleted. When the Job is being deleted, its lifecycle guarantees (e.g. finalizers) will be honored. If this field is unset, the Job won't be automatically deleted. If this field is set to zero, the Job becomes eligible to be deleted immediately after it finishes.", + "format": "int32", + "type": "integer" } }, "required": [ - "request", - "signerName" + "template" ], "type": "object" }, - "io.k8s.api.certificates.v1.CertificateSigningRequestStatus": { - "description": "CertificateSigningRequestStatus contains conditions used to indicate approved/denied/failed status of the request, and the issued certificate.", + "io.k8s.api.batch.v1.JobStatus": { + "description": "JobStatus represents the current state of a Job.", "properties": { - "certificate": { - "description": "certificate is populated with an issued certificate by the signer after an Approved condition is present. This field is set via the /status subresource. Once populated, this field is immutable.\n\nIf the certificate signing request is denied, a condition of type \"Denied\" is added and this field remains empty. If the signer cannot issue the certificate, a condition of type \"Failed\" is added and this field remains empty.\n\nValidation requirements:\n 1. certificate must contain one or more PEM blocks.\n 2. All PEM blocks must have the \"CERTIFICATE\" label, contain no headers, and the encoded data\n must be a BER-encoded ASN.1 Certificate structure as described in section 4 of RFC5280.\n 3. Non-PEM content may appear before or after the \"CERTIFICATE\" PEM blocks and is unvalidated,\n to allow for explanatory text as described in section 5.2 of RFC7468.\n\nIf more than one PEM block is present, and the definition of the requested spec.signerName does not indicate otherwise, the first block is the issued certificate, and subsequent blocks should be treated as intermediate certificates and presented in TLS handshakes.\n\nThe certificate is encoded in PEM format.\n\nWhen serialized as JSON or YAML, the data is additionally base64-encoded, so it consists of:\n\n base64(\n -----BEGIN CERTIFICATE-----\n ...\n -----END CERTIFICATE-----\n )", - "format": "byte", - "type": "string", - "x-kubernetes-list-type": "atomic" + "active": { + "description": "The number of pending and running pods.", + "format": "int32", + "type": "integer" + }, + "completedIndexes": { + "description": "CompletedIndexes holds the completed indexes when .spec.completionMode = \"Indexed\" in a text format. The indexes are represented as decimal integers separated by commas. The numbers are listed in increasing order. Three or more consecutive numbers are compressed and represented by the first and last element of the series, separated by a hyphen. For example, if the completed indexes are 1, 3, 4, 5 and 7, they are represented as \"1,3-5,7\".", + "type": "string" + }, + "completionTime": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time", + "description": "Represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. The completion time is only set when the job finishes successfully." }, "conditions": { - "description": "conditions applied to the request. Known conditions are \"Approved\", \"Denied\", and \"Failed\".", + "description": "The latest available observations of an object's current state. When a Job fails, one of the conditions will have type \"Failed\" and status true. When a Job is suspended, one of the conditions will have type \"Suspended\" and status true; when the Job is resumed, the status of this condition will become false. When a Job is completed, one of the conditions will have type \"Complete\" and status true. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/", "items": { - "$ref": "#/definitions/io.k8s.api.certificates.v1.CertificateSigningRequestCondition" + "$ref": "#/definitions/io.k8s.api.batch.v1.JobCondition" }, "type": "array", - "x-kubernetes-list-map-keys": [ - "type" - ], - "x-kubernetes-list-type": "map" + "x-kubernetes-list-type": "atomic", + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge" + }, + "failed": { + "description": "The number of pods which reached phase Failed.", + "format": "int32", + "type": "integer" + }, + "ready": { + "description": "The number of pods which have a Ready condition.\n\nThis field is alpha-level. The job controller populates the field when the feature gate JobReadyPods is enabled (disabled by default).", + "format": "int32", + "type": "integer" + }, + "startTime": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time", + "description": "Represents time when the job controller started processing a job. When a Job is created in the suspended state, this field is not set until the first time it is resumed. This field is reset every time a Job is resumed from suspension. It is represented in RFC3339 form and is in UTC." + }, + "succeeded": { + "description": "The number of pods which reached phase Succeeded.", + "format": "int32", + "type": "integer" + }, + "uncountedTerminatedPods": { + "$ref": "#/definitions/io.k8s.api.batch.v1.UncountedTerminatedPods", + "description": "UncountedTerminatedPods holds the UIDs of Pods that have terminated but the job controller hasn't yet accounted for in the status counters.\n\nThe job controller creates pods with a finalizer. When a pod terminates (succeeded or failed), the controller does three steps to account for it in the job status: (1) Add the pod UID to the arrays in this field. (2) Remove the pod finalizer. (3) Remove the pod UID from the arrays while increasing the corresponding\n counter.\n\nThis field is beta-level. The job controller only makes use of this field when the feature gate JobTrackingWithFinalizers is enabled (enabled by default). Old jobs might not be tracked using this field, in which case the field remains null." + } + }, + "type": "object" + }, + "io.k8s.api.batch.v1.JobTemplateSpec": { + "description": "JobTemplateSpec describes the data a Job should have when created from a template", + "properties": { + "metadata": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta", + "description": "Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + }, + "spec": { + "$ref": "#/definitions/io.k8s.api.batch.v1.JobSpec", + "description": "Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" + } + }, + "type": "object" + }, + "io.k8s.api.batch.v1.UncountedTerminatedPods": { + "description": "UncountedTerminatedPods holds UIDs of Pods that have terminated but haven't been accounted in Job status counters.", + "properties": { + "failed": { + "description": "Failed holds UIDs of failed Pods.", + "items": { + "type": "string" + }, + "type": "array", + "x-kubernetes-list-type": "set" + }, + "succeeded": { + "description": "Succeeded holds UIDs of succeeded Pods.", + "items": { + "type": "string" + }, + "type": "array", + "x-kubernetes-list-type": "set" + } + }, + "type": "object" + }, + "io.k8s.api.batch.v1beta1.CronJob": { + "description": "CronJob represents the configuration of a single cron job.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta", + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + }, + "spec": { + "$ref": "#/definitions/io.k8s.api.batch.v1beta1.CronJobSpec", + "description": "Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" + }, + "status": { + "$ref": "#/definitions/io.k8s.api.batch.v1beta1.CronJobStatus", + "description": "Current status of a cron job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" + } + }, + "type": "object", + "x-kubernetes-group-version-kind": [ + { + "group": "batch", + "kind": "CronJob", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.batch.v1beta1.CronJobList": { + "description": "CronJobList is a collection of cron jobs.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "items is the list of CronJobs.", + "items": { + "$ref": "#/definitions/io.k8s.api.batch.v1beta1.CronJob" + }, + "type": "array" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta", + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + } + }, + "required": [ + "items" + ], + "type": "object", + "x-kubernetes-group-version-kind": [ + { + "group": "batch", + "kind": "CronJobList", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.batch.v1beta1.CronJobSpec": { + "description": "CronJobSpec describes how the job execution will look like and when it will actually run.", + "properties": { + "concurrencyPolicy": { + "description": "Specifies how to treat concurrent executions of a Job. Valid values are: - \"Allow\" (default): allows CronJobs to run concurrently; - \"Forbid\": forbids concurrent runs, skipping next run if previous run hasn't finished yet; - \"Replace\": cancels currently running job and replaces it with a new one", + "type": "string" + }, + "failedJobsHistoryLimit": { + "description": "The number of failed finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.", + "format": "int32", + "type": "integer" + }, + "jobTemplate": { + "$ref": "#/definitions/io.k8s.api.batch.v1beta1.JobTemplateSpec", + "description": "Specifies the job that will be created when executing a CronJob." + }, + "schedule": { + "description": "The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.", + "type": "string" + }, + "startingDeadlineSeconds": { + "description": "Optional deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones.", + "format": "int64", + "type": "integer" + }, + "successfulJobsHistoryLimit": { + "description": "The number of successful finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. Defaults to 3.", + "format": "int32", + "type": "integer" + }, + "suspend": { + "description": "This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false.", + "type": "boolean" + } + }, + "required": [ + "schedule", + "jobTemplate" + ], + "type": "object" + }, + "io.k8s.api.batch.v1beta1.CronJobStatus": { + "description": "CronJobStatus represents the current state of a cron job.", + "properties": { + "active": { + "description": "A list of pointers to currently running jobs.", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.ObjectReference" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" + }, + "lastScheduleTime": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time", + "description": "Information when was the last time the job was successfully scheduled." + }, + "lastSuccessfulTime": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time", + "description": "Information when was the last time the job successfully completed." + } + }, + "type": "object" + }, + "io.k8s.api.batch.v1beta1.JobTemplateSpec": { + "description": "JobTemplateSpec describes the data a Job should have when created from a template", + "properties": { + "metadata": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta", + "description": "Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + }, + "spec": { + "$ref": "#/definitions/io.k8s.api.batch.v1.JobSpec", + "description": "Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" + } + }, + "type": "object" + }, + "io.k8s.api.certificates.v1.CertificateSigningRequest": { + "description": "CertificateSigningRequest objects provide a mechanism to obtain x509 certificates by submitting a certificate signing request, and having it asynchronously approved and issued.\n\nKubelets use this API to obtain:\n 1. client certificates to authenticate to kube-apiserver (with the \"kubernetes.io/kube-apiserver-client-kubelet\" signerName).\n 2. serving certificates for TLS endpoints kube-apiserver can connect to securely (with the \"kubernetes.io/kubelet-serving\" signerName).\n\nThis API can be used to request client certificates to authenticate to kube-apiserver (with the \"kubernetes.io/kube-apiserver-client\" signerName), or to obtain certificates from custom non-Kubernetes signers.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/io.k8s.api.certificates.v1.CertificateSigningRequestSpec", + "description": "spec contains the certificate request, and is immutable after creation. Only the request, signerName, expirationSeconds, and usages fields can be set on creation. Other fields are derived by Kubernetes and cannot be modified by users." + }, + "status": { + "$ref": "#/definitions/io.k8s.api.certificates.v1.CertificateSigningRequestStatus", + "description": "status contains information about whether the request is approved or denied, and the certificate issued by the signer, or the failure condition indicating signer failure." + } + }, + "required": [ + "spec" + ], + "type": "object", + "x-kubernetes-group-version-kind": [ + { + "group": "certificates.k8s.io", + "kind": "CertificateSigningRequest", + "version": "v1" + } + ] + }, + "io.k8s.api.certificates.v1.CertificateSigningRequestCondition": { + "description": "CertificateSigningRequestCondition describes a condition of a CertificateSigningRequest object", + "properties": { + "lastTransitionTime": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time", + "description": "lastTransitionTime is the time the condition last transitioned from one status to another. If unset, when a new condition type is added or an existing condition's status is changed, the server defaults this to the current time." + }, + "lastUpdateTime": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time", + "description": "lastUpdateTime is the time of the last update to this condition" + }, + "message": { + "description": "message contains a human readable message with details about the request state", + "type": "string" + }, + "reason": { + "description": "reason indicates a brief reason for the request state", + "type": "string" + }, + "status": { + "description": "status of the condition, one of True, False, Unknown. Approved, Denied, and Failed conditions may not be \"False\" or \"Unknown\".", + "type": "string" + }, + "type": { + "description": "type of the condition. Known conditions are \"Approved\", \"Denied\", and \"Failed\".\n\nAn \"Approved\" condition is added via the /approval subresource, indicating the request was approved and should be issued by the signer.\n\nA \"Denied\" condition is added via the /approval subresource, indicating the request was denied and should not be issued by the signer.\n\nA \"Failed\" condition is added via the /status subresource, indicating the signer failed to issue the certificate.\n\nApproved and Denied conditions are mutually exclusive. Approved, Denied, and Failed conditions cannot be removed once added.\n\nOnly one condition of a given type is allowed.", + "type": "string" + } + }, + "required": [ + "type", + "status" + ], + "type": "object" + }, + "io.k8s.api.certificates.v1.CertificateSigningRequestList": { + "description": "CertificateSigningRequestList is a collection of CertificateSigningRequest objects", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "items is a collection of CertificateSigningRequest objects", + "items": { + "$ref": "#/definitions/io.k8s.api.certificates.v1.CertificateSigningRequest" + }, + "type": "array" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "required": [ + "items" + ], + "type": "object", + "x-kubernetes-group-version-kind": [ + { + "group": "certificates.k8s.io", + "kind": "CertificateSigningRequestList", + "version": "v1" + } + ] + }, + "io.k8s.api.certificates.v1.CertificateSigningRequestSpec": { + "description": "CertificateSigningRequestSpec contains the certificate request.", + "properties": { + "expirationSeconds": { + "description": "expirationSeconds is the requested duration of validity of the issued certificate. The certificate signer may issue a certificate with a different validity duration so a client must check the delta between the notBefore and and notAfter fields in the issued certificate to determine the actual duration.\n\nThe v1.22+ in-tree implementations of the well-known Kubernetes signers will honor this field as long as the requested duration is not greater than the maximum duration they will honor per the --cluster-signing-duration CLI flag to the Kubernetes controller manager.\n\nCertificate signers may not honor this field for various reasons:\n\n 1. Old signer that is unaware of the field (such as the in-tree\n implementations prior to v1.22)\n 2. Signer whose configured maximum is shorter than the requested duration\n 3. Signer whose configured minimum is longer than the requested duration\n\nThe minimum valid value for expirationSeconds is 600, i.e. 10 minutes.\n\nAs of v1.22, this field is beta and is controlled via the CSRDuration feature gate.", + "format": "int32", + "type": "integer" + }, + "extra": { + "additionalProperties": { + "items": { + "type": "string" + }, + "type": "array" + }, + "description": "extra contains extra attributes of the user that created the CertificateSigningRequest. Populated by the API server on creation and immutable.", + "type": "object" + }, + "groups": { + "description": "groups contains group membership of the user that created the CertificateSigningRequest. Populated by the API server on creation and immutable.", + "items": { + "type": "string" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" + }, + "request": { + "description": "request contains an x509 certificate signing request encoded in a \"CERTIFICATE REQUEST\" PEM block. When serialized as JSON or YAML, the data is additionally base64-encoded.", + "format": "byte", + "type": "string", + "x-kubernetes-list-type": "atomic" + }, + "signerName": { + "description": "signerName indicates the requested signer, and is a qualified name.\n\nList/watch requests for CertificateSigningRequests can filter on this field using a \"spec.signerName=NAME\" fieldSelector.\n\nWell-known Kubernetes signers are:\n 1. \"kubernetes.io/kube-apiserver-client\": issues client certificates that can be used to authenticate to kube-apiserver.\n Requests for this signer are never auto-approved by kube-controller-manager, can be issued by the \"csrsigning\" controller in kube-controller-manager.\n 2. \"kubernetes.io/kube-apiserver-client-kubelet\": issues client certificates that kubelets use to authenticate to kube-apiserver.\n Requests for this signer can be auto-approved by the \"csrapproving\" controller in kube-controller-manager, and can be issued by the \"csrsigning\" controller in kube-controller-manager.\n 3. \"kubernetes.io/kubelet-serving\" issues serving certificates that kubelets use to serve TLS endpoints, which kube-apiserver can connect to securely.\n Requests for this signer are never auto-approved by kube-controller-manager, and can be issued by the \"csrsigning\" controller in kube-controller-manager.\n\nMore details are available at https://k8s.io/docs/reference/access-authn-authz/certificate-signing-requests/#kubernetes-signers\n\nCustom signerNames can also be specified. The signer defines:\n 1. Trust distribution: how trust (CA bundles) are distributed.\n 2. Permitted subjects: and behavior when a disallowed subject is requested.\n 3. Required, permitted, or forbidden x509 extensions in the request (including whether subjectAltNames are allowed, which types, restrictions on allowed values) and behavior when a disallowed extension is requested.\n 4. Required, permitted, or forbidden key usages / extended key usages.\n 5. Expiration/certificate lifetime: whether it is fixed by the signer, configurable by the admin.\n 6. Whether or not requests for CA certificates are allowed.", + "type": "string" + }, + "uid": { + "description": "uid contains the uid of the user that created the CertificateSigningRequest. Populated by the API server on creation and immutable.", + "type": "string" + }, + "usages": { + "description": "usages specifies a set of key usages requested in the issued certificate.\n\nRequests for TLS client certificates typically request: \"digital signature\", \"key encipherment\", \"client auth\".\n\nRequests for TLS serving certificates typically request: \"key encipherment\", \"digital signature\", \"server auth\".\n\nValid values are:\n \"signing\", \"digital signature\", \"content commitment\",\n \"key encipherment\", \"key agreement\", \"data encipherment\",\n \"cert sign\", \"crl sign\", \"encipher only\", \"decipher only\", \"any\",\n \"server auth\", \"client auth\",\n \"code signing\", \"email protection\", \"s/mime\",\n \"ipsec end system\", \"ipsec tunnel\", \"ipsec user\",\n \"timestamping\", \"ocsp signing\", \"microsoft sgc\", \"netscape sgc\"", + "items": { + "type": "string" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" + }, + "username": { + "description": "username contains the name of the user that created the CertificateSigningRequest. Populated by the API server on creation and immutable.", + "type": "string" + } + }, + "required": [ + "request", + "signerName" + ], + "type": "object" + }, + "io.k8s.api.certificates.v1.CertificateSigningRequestStatus": { + "description": "CertificateSigningRequestStatus contains conditions used to indicate approved/denied/failed status of the request, and the issued certificate.", + "properties": { + "certificate": { + "description": "certificate is populated with an issued certificate by the signer after an Approved condition is present. This field is set via the /status subresource. Once populated, this field is immutable.\n\nIf the certificate signing request is denied, a condition of type \"Denied\" is added and this field remains empty. If the signer cannot issue the certificate, a condition of type \"Failed\" is added and this field remains empty.\n\nValidation requirements:\n 1. certificate must contain one or more PEM blocks.\n 2. All PEM blocks must have the \"CERTIFICATE\" label, contain no headers, and the encoded data\n must be a BER-encoded ASN.1 Certificate structure as described in section 4 of RFC5280.\n 3. Non-PEM content may appear before or after the \"CERTIFICATE\" PEM blocks and is unvalidated,\n to allow for explanatory text as described in section 5.2 of RFC7468.\n\nIf more than one PEM block is present, and the definition of the requested spec.signerName does not indicate otherwise, the first block is the issued certificate, and subsequent blocks should be treated as intermediate certificates and presented in TLS handshakes.\n\nThe certificate is encoded in PEM format.\n\nWhen serialized as JSON or YAML, the data is additionally base64-encoded, so it consists of:\n\n base64(\n -----BEGIN CERTIFICATE-----\n ...\n -----END CERTIFICATE-----\n )", + "format": "byte", + "type": "string", + "x-kubernetes-list-type": "atomic" + }, + "conditions": { + "description": "conditions applied to the request. Known conditions are \"Approved\", \"Denied\", and \"Failed\".", + "items": { + "$ref": "#/definitions/io.k8s.api.certificates.v1.CertificateSigningRequestCondition" + }, + "type": "array", + "x-kubernetes-list-map-keys": [ + "type" + ], + "x-kubernetes-list-type": "map" } }, "type": "object" @@ -15489,6 +16084,11 @@ "kind": "DeleteOptions", "version": "v1" }, + { + "group": "autoscaling", + "kind": "DeleteOptions", + "version": "v2" + }, { "group": "autoscaling", "kind": "DeleteOptions", @@ -16161,6 +16761,11 @@ "kind": "WatchEvent", "version": "v1" }, + { + "group": "autoscaling", + "kind": "WatchEvent", + "version": "v2" + }, { "group": "autoscaling", "kind": "WatchEvent", @@ -47243,19 +47848,1237 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.authorization.v1.LocalSubjectAccessReview" + "$ref": "#/definitions/io.k8s.api.authorization.v1.LocalSubjectAccessReview" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/io.k8s.api.authorization.v1.LocalSubjectAccessReview" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/io.k8s.api.authorization.v1.LocalSubjectAccessReview" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "authorization_v1" + ], + "x-kubernetes-action": "post", + "x-kubernetes-group-version-kind": { + "group": "authorization.k8s.io", + "kind": "LocalSubjectAccessReview", + "version": "v1" + } + } + }, + "/apis/authorization.k8s.io/v1/selfsubjectaccessreviews": { + "parameters": [ + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", + "in": "query", + "name": "fieldManager", + "type": "string", + "uniqueItems": true + }, + { + "description": "If 'true', then the output is pretty printed.", + "in": "query", + "name": "pretty", + "type": "string", + "uniqueItems": true + } + ], + "post": { + "consumes": [ + "*/*" + ], + "description": "create a SelfSubjectAccessReview", + "operationId": "createAuthorizationV1SelfSubjectAccessReview", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/io.k8s.api.authorization.v1.SelfSubjectAccessReview" + } + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.authorization.v1.SelfSubjectAccessReview" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/io.k8s.api.authorization.v1.SelfSubjectAccessReview" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/io.k8s.api.authorization.v1.SelfSubjectAccessReview" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "authorization_v1" + ], + "x-kubernetes-action": "post", + "x-kubernetes-group-version-kind": { + "group": "authorization.k8s.io", + "kind": "SelfSubjectAccessReview", + "version": "v1" + } + } + }, + "/apis/authorization.k8s.io/v1/selfsubjectrulesreviews": { + "parameters": [ + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", + "in": "query", + "name": "fieldManager", + "type": "string", + "uniqueItems": true + }, + { + "description": "If 'true', then the output is pretty printed.", + "in": "query", + "name": "pretty", + "type": "string", + "uniqueItems": true + } + ], + "post": { + "consumes": [ + "*/*" + ], + "description": "create a SelfSubjectRulesReview", + "operationId": "createAuthorizationV1SelfSubjectRulesReview", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/io.k8s.api.authorization.v1.SelfSubjectRulesReview" + } + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.authorization.v1.SelfSubjectRulesReview" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/io.k8s.api.authorization.v1.SelfSubjectRulesReview" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/io.k8s.api.authorization.v1.SelfSubjectRulesReview" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "authorization_v1" + ], + "x-kubernetes-action": "post", + "x-kubernetes-group-version-kind": { + "group": "authorization.k8s.io", + "kind": "SelfSubjectRulesReview", + "version": "v1" + } + } + }, + "/apis/authorization.k8s.io/v1/subjectaccessreviews": { + "parameters": [ + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", + "in": "query", + "name": "fieldManager", + "type": "string", + "uniqueItems": true + }, + { + "description": "If 'true', then the output is pretty printed.", + "in": "query", + "name": "pretty", + "type": "string", + "uniqueItems": true + } + ], + "post": { + "consumes": [ + "*/*" + ], + "description": "create a SubjectAccessReview", + "operationId": "createAuthorizationV1SubjectAccessReview", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/io.k8s.api.authorization.v1.SubjectAccessReview" + } + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.authorization.v1.SubjectAccessReview" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/io.k8s.api.authorization.v1.SubjectAccessReview" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/io.k8s.api.authorization.v1.SubjectAccessReview" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "authorization_v1" + ], + "x-kubernetes-action": "post", + "x-kubernetes-group-version-kind": { + "group": "authorization.k8s.io", + "kind": "SubjectAccessReview", + "version": "v1" + } + } + }, + "/apis/autoscaling/": { + "get": { + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "description": "get information of a group", + "operationId": "getAutoscalingAPIGroup", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIGroup" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "autoscaling" + ] + } + }, + "/apis/autoscaling/v1/": { + "get": { + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "description": "get available resources", + "operationId": "getAutoscalingV1APIResources", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "autoscaling_v1" + ] + } + }, + "/apis/autoscaling/v1/horizontalpodautoscalers": { + "get": { + "consumes": [ + "*/*" + ], + "description": "list or watch objects of kind HorizontalPodAutoscaler", + "operationId": "listAutoscalingV1HorizontalPodAutoscalerForAllNamespaces", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerList" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "autoscaling_v1" + ], + "x-kubernetes-action": "list", + "x-kubernetes-group-version-kind": { + "group": "autoscaling", + "kind": "HorizontalPodAutoscaler", + "version": "v1" + } + }, + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "type": "integer", + "uniqueItems": true + }, + { + "description": "If 'true', then the output is pretty printed.", + "in": "query", + "name": "pretty", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "type": "string", + "uniqueItems": true + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "type": "boolean", + "uniqueItems": true + } + ] + }, + "/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers": { + "delete": { + "consumes": [ + "*/*" + ], + "description": "delete collection of HorizontalPodAutoscaler", + "operationId": "deleteAutoscalingV1CollectionNamespacedHorizontalPodAutoscaler", + "parameters": [ + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + } + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "type": "string", + "uniqueItems": true + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "in": "query", + "name": "gracePeriodSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "in": "query", + "name": "orphanDependents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", + "in": "query", + "name": "propagationPolicy", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "type": "string", + "uniqueItems": true + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "type": "integer", + "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "autoscaling_v1" + ], + "x-kubernetes-action": "deletecollection", + "x-kubernetes-group-version-kind": { + "group": "autoscaling", + "kind": "HorizontalPodAutoscaler", + "version": "v1" + } + }, + "get": { + "consumes": [ + "*/*" + ], + "description": "list or watch objects of kind HorizontalPodAutoscaler", + "operationId": "listAutoscalingV1NamespacedHorizontalPodAutoscaler", + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "type": "integer", + "uniqueItems": true + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "type": "string", + "uniqueItems": true + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "type": "boolean", + "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerList" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "autoscaling_v1" + ], + "x-kubernetes-action": "list", + "x-kubernetes-group-version-kind": { + "group": "autoscaling", + "kind": "HorizontalPodAutoscaler", + "version": "v1" + } + }, + "parameters": [ + { + "description": "object name and auth scope, such as for teams and projects", + "in": "path", + "name": "namespace", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "description": "If 'true', then the output is pretty printed.", + "in": "query", + "name": "pretty", + "type": "string", + "uniqueItems": true + } + ], + "post": { + "consumes": [ + "*/*" + ], + "description": "create a HorizontalPodAutoscaler", + "operationId": "createAutoscalingV1NamespacedHorizontalPodAutoscaler", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" + } + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", + "in": "query", + "name": "fieldManager", + "type": "string", + "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "autoscaling_v1" + ], + "x-kubernetes-action": "post", + "x-kubernetes-group-version-kind": { + "group": "autoscaling", + "kind": "HorizontalPodAutoscaler", + "version": "v1" + } + } + }, + "/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}": { + "delete": { + "consumes": [ + "*/*" + ], + "description": "delete a HorizontalPodAutoscaler", + "operationId": "deleteAutoscalingV1NamespacedHorizontalPodAutoscaler", + "parameters": [ + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + } + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "in": "query", + "name": "gracePeriodSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "in": "query", + "name": "orphanDependents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", + "in": "query", + "name": "propagationPolicy", + "type": "string", + "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "autoscaling_v1" + ], + "x-kubernetes-action": "delete", + "x-kubernetes-group-version-kind": { + "group": "autoscaling", + "kind": "HorizontalPodAutoscaler", + "version": "v1" + } + }, + "get": { + "consumes": [ + "*/*" + ], + "description": "read the specified HorizontalPodAutoscaler", + "operationId": "readAutoscalingV1NamespacedHorizontalPodAutoscaler", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "autoscaling_v1" + ], + "x-kubernetes-action": "get", + "x-kubernetes-group-version-kind": { + "group": "autoscaling", + "kind": "HorizontalPodAutoscaler", + "version": "v1" + } + }, + "parameters": [ + { + "description": "name of the HorizontalPodAutoscaler", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "description": "object name and auth scope, such as for teams and projects", + "in": "path", + "name": "namespace", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "description": "If 'true', then the output is pretty printed.", + "in": "query", + "name": "pretty", + "type": "string", + "uniqueItems": true + } + ], + "patch": { + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json", + "application/apply-patch+yaml" + ], + "description": "partially update the specified HorizontalPodAutoscaler", + "operationId": "patchAutoscalingV1NamespacedHorizontalPodAutoscaler", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" + } + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).", + "in": "query", + "name": "fieldManager", + "type": "string", + "uniqueItems": true + }, + { + "description": "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.", + "in": "query", + "name": "force", + "type": "boolean", + "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "autoscaling_v1" + ], + "x-kubernetes-action": "patch", + "x-kubernetes-group-version-kind": { + "group": "autoscaling", + "kind": "HorizontalPodAutoscaler", + "version": "v1" + } + }, + "put": { + "consumes": [ + "*/*" + ], + "description": "replace the specified HorizontalPodAutoscaler", + "operationId": "replaceAutoscalingV1NamespacedHorizontalPodAutoscaler", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" + } + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", + "in": "query", + "name": "fieldManager", + "type": "string", + "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "autoscaling_v1" + ], + "x-kubernetes-action": "put", + "x-kubernetes-group-version-kind": { + "group": "autoscaling", + "kind": "HorizontalPodAutoscaler", + "version": "v1" + } + } + }, + "/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status": { + "get": { + "consumes": [ + "*/*" + ], + "description": "read status of the specified HorizontalPodAutoscaler", + "operationId": "readAutoscalingV1NamespacedHorizontalPodAutoscalerStatus", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "autoscaling_v1" + ], + "x-kubernetes-action": "get", + "x-kubernetes-group-version-kind": { + "group": "autoscaling", + "kind": "HorizontalPodAutoscaler", + "version": "v1" + } + }, + "parameters": [ + { + "description": "name of the HorizontalPodAutoscaler", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "description": "object name and auth scope, such as for teams and projects", + "in": "path", + "name": "namespace", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "description": "If 'true', then the output is pretty printed.", + "in": "query", + "name": "pretty", + "type": "string", + "uniqueItems": true + } + ], + "patch": { + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json", + "application/apply-patch+yaml" + ], + "description": "partially update status of the specified HorizontalPodAutoscaler", + "operationId": "patchAutoscalingV1NamespacedHorizontalPodAutoscalerStatus", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" + } + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).", + "in": "query", + "name": "fieldManager", + "type": "string", + "uniqueItems": true + }, + { + "description": "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.", + "in": "query", + "name": "force", + "type": "boolean", + "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "autoscaling_v1" + ], + "x-kubernetes-action": "patch", + "x-kubernetes-group-version-kind": { + "group": "autoscaling", + "kind": "HorizontalPodAutoscaler", + "version": "v1" + } + }, + "put": { + "consumes": [ + "*/*" + ], + "description": "replace status of the specified HorizontalPodAutoscaler", + "operationId": "replaceAutoscalingV1NamespacedHorizontalPodAutoscalerStatus", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" + } + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", + "in": "query", + "name": "fieldManager", + "type": "string", + "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.authorization.v1.LocalSubjectAccessReview" - } - }, - "202": { - "description": "Accepted", - "schema": { - "$ref": "#/definitions/io.k8s.api.authorization.v1.LocalSubjectAccessReview" + "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" } }, "401": { @@ -47266,78 +49089,35 @@ "https" ], "tags": [ - "authorization_v1" + "autoscaling_v1" ], - "x-kubernetes-action": "post", + "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { - "group": "authorization.k8s.io", - "kind": "LocalSubjectAccessReview", + "group": "autoscaling", + "kind": "HorizontalPodAutoscaler", "version": "v1" } } }, - "/apis/authorization.k8s.io/v1/selfsubjectaccessreviews": { - "parameters": [ - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", - "in": "query", - "name": "fieldManager", - "type": "string", - "uniqueItems": true - }, - { - "description": "If 'true', then the output is pretty printed.", - "in": "query", - "name": "pretty", - "type": "string", - "uniqueItems": true - } - ], - "post": { + "/apis/autoscaling/v1/watch/horizontalpodautoscalers": { + "get": { "consumes": [ "*/*" ], - "description": "create a SelfSubjectAccessReview", - "operationId": "createAuthorizationV1SelfSubjectAccessReview", - "parameters": [ - { - "in": "body", - "name": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.authorization.v1.SelfSubjectAccessReview" - } - } - ], + "description": "watch individual changes to a list of HorizontalPodAutoscaler. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchAutoscalingV1HorizontalPodAutoscalerListForAllNamespaces", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.authorization.v1.SelfSubjectAccessReview" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/io.k8s.api.authorization.v1.SelfSubjectAccessReview" - } - }, - "202": { - "description": "Accepted", - "schema": { - "$ref": "#/definitions/io.k8s.api.authorization.v1.SelfSubjectAccessReview" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" } }, "401": { @@ -47348,78 +49128,107 @@ "https" ], "tags": [ - "authorization_v1" + "autoscaling_v1" ], - "x-kubernetes-action": "post", + "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { - "group": "authorization.k8s.io", - "kind": "SelfSubjectAccessReview", + "group": "autoscaling", + "kind": "HorizontalPodAutoscaler", "version": "v1" } - } - }, - "/apis/authorization.k8s.io/v1/selfsubjectrulesreviews": { + }, "parameters": [ { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", "in": "query", - "name": "dryRun", + "name": "allowWatchBookmarks", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", "type": "string", "uniqueItems": true }, { - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "in": "query", - "name": "fieldManager", + "name": "fieldSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", "type": "string", "uniqueItems": true }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "type": "integer", + "uniqueItems": true + }, { "description": "If 'true', then the output is pretty printed.", "in": "query", "name": "pretty", "type": "string", "uniqueItems": true + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "type": "string", + "uniqueItems": true + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "type": "boolean", + "uniqueItems": true } - ], - "post": { + ] + }, + "/apis/autoscaling/v1/watch/namespaces/{namespace}/horizontalpodautoscalers": { + "get": { "consumes": [ "*/*" ], - "description": "create a SelfSubjectRulesReview", - "operationId": "createAuthorizationV1SelfSubjectRulesReview", - "parameters": [ - { - "in": "body", - "name": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.authorization.v1.SelfSubjectRulesReview" - } - } - ], + "description": "watch individual changes to a list of HorizontalPodAutoscaler. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchAutoscalingV1NamespacedHorizontalPodAutoscalerList", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.authorization.v1.SelfSubjectRulesReview" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/io.k8s.api.authorization.v1.SelfSubjectRulesReview" - } - }, - "202": { - "description": "Accepted", - "schema": { - "$ref": "#/definitions/io.k8s.api.authorization.v1.SelfSubjectRulesReview" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" } }, "401": { @@ -47430,29 +49239,56 @@ "https" ], "tags": [ - "authorization_v1" + "autoscaling_v1" ], - "x-kubernetes-action": "post", + "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { - "group": "authorization.k8s.io", - "kind": "SelfSubjectRulesReview", + "group": "autoscaling", + "kind": "HorizontalPodAutoscaler", "version": "v1" } - } - }, - "/apis/authorization.k8s.io/v1/subjectaccessreviews": { + }, "parameters": [ { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", "in": "query", - "name": "dryRun", + "name": "allowWatchBookmarks", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", "type": "string", "uniqueItems": true }, { - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "in": "query", - "name": "fieldManager", + "name": "fieldSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "type": "integer", + "uniqueItems": true + }, + { + "description": "object name and auth scope, such as for teams and projects", + "in": "path", + "name": "namespace", + "required": true, "type": "string", "uniqueItems": true }, @@ -47462,46 +49298,56 @@ "name": "pretty", "type": "string", "uniqueItems": true + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "type": "string", + "uniqueItems": true + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "type": "boolean", + "uniqueItems": true } - ], - "post": { + ] + }, + "/apis/autoscaling/v1/watch/namespaces/{namespace}/horizontalpodautoscalers/{name}": { + "get": { "consumes": [ "*/*" ], - "description": "create a SubjectAccessReview", - "operationId": "createAuthorizationV1SubjectAccessReview", - "parameters": [ - { - "in": "body", - "name": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.authorization.v1.SubjectAccessReview" - } - } - ], + "description": "watch changes to an object of kind HorizontalPodAutoscaler. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", + "operationId": "watchAutoscalingV1NamespacedHorizontalPodAutoscaler", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.authorization.v1.SubjectAccessReview" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/io.k8s.api.authorization.v1.SubjectAccessReview" - } - }, - "202": { - "description": "Accepted", - "schema": { - "$ref": "#/definitions/io.k8s.api.authorization.v1.SubjectAccessReview" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" } }, "401": { @@ -47512,50 +49358,105 @@ "https" ], "tags": [ - "authorization_v1" + "autoscaling_v1" ], - "x-kubernetes-action": "post", + "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { - "group": "authorization.k8s.io", - "kind": "SubjectAccessReview", + "group": "autoscaling", + "kind": "HorizontalPodAutoscaler", "version": "v1" } - } - }, - "/apis/autoscaling/": { - "get": { - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "description": "get information of a group", - "operationId": "getAutoscalingAPIGroup", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIGroup" - } - }, - "401": { - "description": "Unauthorized" - } + }, + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "type": "boolean", + "uniqueItems": true }, - "schemes": [ - "https" - ], - "tags": [ - "autoscaling" - ] - } + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "type": "integer", + "uniqueItems": true + }, + { + "description": "name of the HorizontalPodAutoscaler", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "description": "object name and auth scope, such as for teams and projects", + "in": "path", + "name": "namespace", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "description": "If 'true', then the output is pretty printed.", + "in": "query", + "name": "pretty", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "type": "string", + "uniqueItems": true + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "type": "boolean", + "uniqueItems": true + } + ] }, - "/apis/autoscaling/v1/": { + "/apis/autoscaling/v2/": { "get": { "consumes": [ "application/json", @@ -47563,7 +49464,7 @@ "application/vnd.kubernetes.protobuf" ], "description": "get available resources", - "operationId": "getAutoscalingV1APIResources", + "operationId": "getAutoscalingV2APIResources", "produces": [ "application/json", "application/yaml", @@ -47584,17 +49485,17 @@ "https" ], "tags": [ - "autoscaling_v1" + "autoscaling_v2" ] } }, - "/apis/autoscaling/v1/horizontalpodautoscalers": { + "/apis/autoscaling/v2/horizontalpodautoscalers": { "get": { "consumes": [ "*/*" ], "description": "list or watch objects of kind HorizontalPodAutoscaler", - "operationId": "listAutoscalingV1HorizontalPodAutoscalerForAllNamespaces", + "operationId": "listAutoscalingV2HorizontalPodAutoscalerForAllNamespaces", "produces": [ "application/json", "application/yaml", @@ -47606,7 +49507,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerList" + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerList" } }, "401": { @@ -47617,13 +49518,13 @@ "https" ], "tags": [ - "autoscaling_v1" + "autoscaling_v2" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "autoscaling", "kind": "HorizontalPodAutoscaler", - "version": "v1" + "version": "v2" } }, "parameters": [ @@ -47699,13 +49600,13 @@ } ] }, - "/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers": { + "/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers": { "delete": { "consumes": [ "*/*" ], "description": "delete collection of HorizontalPodAutoscaler", - "operationId": "deleteAutoscalingV1CollectionNamespacedHorizontalPodAutoscaler", + "operationId": "deleteAutoscalingV2CollectionNamespacedHorizontalPodAutoscaler", "parameters": [ { "in": "body", @@ -47812,13 +49713,13 @@ "https" ], "tags": [ - "autoscaling_v1" + "autoscaling_v2" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { "group": "autoscaling", "kind": "HorizontalPodAutoscaler", - "version": "v1" + "version": "v2" } }, "get": { @@ -47826,7 +49727,7 @@ "*/*" ], "description": "list or watch objects of kind HorizontalPodAutoscaler", - "operationId": "listAutoscalingV1NamespacedHorizontalPodAutoscaler", + "operationId": "listAutoscalingV2NamespacedHorizontalPodAutoscaler", "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -47903,7 +49804,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerList" + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerList" } }, "401": { @@ -47914,13 +49815,13 @@ "https" ], "tags": [ - "autoscaling_v1" + "autoscaling_v2" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "autoscaling", "kind": "HorizontalPodAutoscaler", - "version": "v1" + "version": "v2" } }, "parameters": [ @@ -47945,14 +49846,14 @@ "*/*" ], "description": "create a HorizontalPodAutoscaler", - "operationId": "createAutoscalingV1NamespacedHorizontalPodAutoscaler", + "operationId": "createAutoscalingV2NamespacedHorizontalPodAutoscaler", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler" } }, { @@ -47979,19 +49880,19 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler" } }, "401": { @@ -48002,23 +49903,23 @@ "https" ], "tags": [ - "autoscaling_v1" + "autoscaling_v2" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { "group": "autoscaling", "kind": "HorizontalPodAutoscaler", - "version": "v1" + "version": "v2" } } }, - "/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}": { + "/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}": { "delete": { "consumes": [ "*/*" ], "description": "delete a HorizontalPodAutoscaler", - "operationId": "deleteAutoscalingV1NamespacedHorizontalPodAutoscaler", + "operationId": "deleteAutoscalingV2NamespacedHorizontalPodAutoscaler", "parameters": [ { "in": "body", @@ -48082,13 +49983,13 @@ "https" ], "tags": [ - "autoscaling_v1" + "autoscaling_v2" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { "group": "autoscaling", "kind": "HorizontalPodAutoscaler", - "version": "v1" + "version": "v2" } }, "get": { @@ -48096,7 +49997,7 @@ "*/*" ], "description": "read the specified HorizontalPodAutoscaler", - "operationId": "readAutoscalingV1NamespacedHorizontalPodAutoscaler", + "operationId": "readAutoscalingV2NamespacedHorizontalPodAutoscaler", "produces": [ "application/json", "application/yaml", @@ -48106,7 +50007,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler" } }, "401": { @@ -48117,13 +50018,13 @@ "https" ], "tags": [ - "autoscaling_v1" + "autoscaling_v2" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "autoscaling", "kind": "HorizontalPodAutoscaler", - "version": "v1" + "version": "v2" } }, "parameters": [ @@ -48159,7 +50060,7 @@ "application/apply-patch+yaml" ], "description": "partially update the specified HorizontalPodAutoscaler", - "operationId": "patchAutoscalingV1NamespacedHorizontalPodAutoscaler", + "operationId": "patchAutoscalingV2NamespacedHorizontalPodAutoscaler", "parameters": [ { "in": "body", @@ -48200,13 +50101,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler" } }, "401": { @@ -48217,13 +50118,13 @@ "https" ], "tags": [ - "autoscaling_v1" + "autoscaling_v2" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "autoscaling", "kind": "HorizontalPodAutoscaler", - "version": "v1" + "version": "v2" } }, "put": { @@ -48231,14 +50132,14 @@ "*/*" ], "description": "replace the specified HorizontalPodAutoscaler", - "operationId": "replaceAutoscalingV1NamespacedHorizontalPodAutoscaler", + "operationId": "replaceAutoscalingV2NamespacedHorizontalPodAutoscaler", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler" } }, { @@ -48265,13 +50166,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler" } }, "401": { @@ -48282,23 +50183,23 @@ "https" ], "tags": [ - "autoscaling_v1" + "autoscaling_v2" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "autoscaling", "kind": "HorizontalPodAutoscaler", - "version": "v1" + "version": "v2" } } }, - "/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status": { + "/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status": { "get": { "consumes": [ "*/*" ], "description": "read status of the specified HorizontalPodAutoscaler", - "operationId": "readAutoscalingV1NamespacedHorizontalPodAutoscalerStatus", + "operationId": "readAutoscalingV2NamespacedHorizontalPodAutoscalerStatus", "produces": [ "application/json", "application/yaml", @@ -48308,7 +50209,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler" } }, "401": { @@ -48319,13 +50220,13 @@ "https" ], "tags": [ - "autoscaling_v1" + "autoscaling_v2" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "autoscaling", "kind": "HorizontalPodAutoscaler", - "version": "v1" + "version": "v2" } }, "parameters": [ @@ -48361,7 +50262,7 @@ "application/apply-patch+yaml" ], "description": "partially update status of the specified HorizontalPodAutoscaler", - "operationId": "patchAutoscalingV1NamespacedHorizontalPodAutoscalerStatus", + "operationId": "patchAutoscalingV2NamespacedHorizontalPodAutoscalerStatus", "parameters": [ { "in": "body", @@ -48402,13 +50303,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler" } }, "401": { @@ -48419,13 +50320,13 @@ "https" ], "tags": [ - "autoscaling_v1" + "autoscaling_v2" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "autoscaling", "kind": "HorizontalPodAutoscaler", - "version": "v1" + "version": "v2" } }, "put": { @@ -48433,14 +50334,14 @@ "*/*" ], "description": "replace status of the specified HorizontalPodAutoscaler", - "operationId": "replaceAutoscalingV1NamespacedHorizontalPodAutoscalerStatus", + "operationId": "replaceAutoscalingV2NamespacedHorizontalPodAutoscalerStatus", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler" } }, { @@ -48467,13 +50368,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler" } }, "401": { @@ -48484,23 +50385,23 @@ "https" ], "tags": [ - "autoscaling_v1" + "autoscaling_v2" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "autoscaling", "kind": "HorizontalPodAutoscaler", - "version": "v1" + "version": "v2" } } }, - "/apis/autoscaling/v1/watch/horizontalpodautoscalers": { + "/apis/autoscaling/v2/watch/horizontalpodautoscalers": { "get": { "consumes": [ "*/*" ], "description": "watch individual changes to a list of HorizontalPodAutoscaler. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchAutoscalingV1HorizontalPodAutoscalerListForAllNamespaces", + "operationId": "watchAutoscalingV2HorizontalPodAutoscalerListForAllNamespaces", "produces": [ "application/json", "application/yaml", @@ -48523,13 +50424,13 @@ "https" ], "tags": [ - "autoscaling_v1" + "autoscaling_v2" ], "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "autoscaling", "kind": "HorizontalPodAutoscaler", - "version": "v1" + "version": "v2" } }, "parameters": [ @@ -48605,13 +50506,13 @@ } ] }, - "/apis/autoscaling/v1/watch/namespaces/{namespace}/horizontalpodautoscalers": { + "/apis/autoscaling/v2/watch/namespaces/{namespace}/horizontalpodautoscalers": { "get": { "consumes": [ "*/*" ], "description": "watch individual changes to a list of HorizontalPodAutoscaler. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchAutoscalingV1NamespacedHorizontalPodAutoscalerList", + "operationId": "watchAutoscalingV2NamespacedHorizontalPodAutoscalerList", "produces": [ "application/json", "application/yaml", @@ -48634,13 +50535,13 @@ "https" ], "tags": [ - "autoscaling_v1" + "autoscaling_v2" ], "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "autoscaling", "kind": "HorizontalPodAutoscaler", - "version": "v1" + "version": "v2" } }, "parameters": [ @@ -48724,13 +50625,13 @@ } ] }, - "/apis/autoscaling/v1/watch/namespaces/{namespace}/horizontalpodautoscalers/{name}": { + "/apis/autoscaling/v2/watch/namespaces/{namespace}/horizontalpodautoscalers/{name}": { "get": { "consumes": [ "*/*" ], "description": "watch changes to an object of kind HorizontalPodAutoscaler. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchAutoscalingV1NamespacedHorizontalPodAutoscaler", + "operationId": "watchAutoscalingV2NamespacedHorizontalPodAutoscaler", "produces": [ "application/json", "application/yaml", @@ -48753,13 +50654,13 @@ "https" ], "tags": [ - "autoscaling_v1" + "autoscaling_v2" ], "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { "group": "autoscaling", "kind": "HorizontalPodAutoscaler", - "version": "v1" + "version": "v2" } }, "parameters": [ diff --git a/cmd/kube-apiserver/app/aggregator.go b/cmd/kube-apiserver/app/aggregator.go index b00077cbf68a..581d236c857e 100644 --- a/cmd/kube-apiserver/app/aggregator.go +++ b/cmd/kube-apiserver/app/aggregator.go @@ -251,6 +251,7 @@ var apiVersionPriorities = map[schema.GroupVersion]priority{ {Group: "authentication.k8s.io", Version: "v1"}: {group: 17700, version: 15}, {Group: "authorization.k8s.io", Version: "v1"}: {group: 17600, version: 15}, {Group: "autoscaling", Version: "v1"}: {group: 17500, version: 15}, + {Group: "autoscaling", Version: "v2"}: {group: 17500, version: 30}, {Group: "autoscaling", Version: "v2beta1"}: {group: 17500, version: 9}, {Group: "autoscaling", Version: "v2beta2"}: {group: 17500, version: 1}, {Group: "batch", Version: "v1"}: {group: 17400, version: 15}, diff --git a/hack/lib/init.sh b/hack/lib/init.sh index 6beb2cf3d25b..f31141b87577 100755 --- a/hack/lib/init.sh +++ b/hack/lib/init.sh @@ -76,6 +76,7 @@ authentication.k8s.io/v1beta1 \ authorization.k8s.io/v1 \ authorization.k8s.io/v1beta1 \ autoscaling/v1 \ +autoscaling/v2 \ autoscaling/v2beta1 \ autoscaling/v2beta2 \ batch/v1 \ diff --git a/pkg/api/testing/defaulting_test.go b/pkg/api/testing/defaulting_test.go index ffd9882cc355..45385eecc1b1 100644 --- a/pkg/api/testing/defaulting_test.go +++ b/pkg/api/testing/defaulting_test.go @@ -77,6 +77,8 @@ func TestDefaulting(t *testing.T) { {Group: "apps", Version: "v1", Kind: "StatefulSetList"}: {}, {Group: "autoscaling", Version: "v1", Kind: "HorizontalPodAutoscaler"}: {}, {Group: "autoscaling", Version: "v1", Kind: "HorizontalPodAutoscalerList"}: {}, + {Group: "autoscaling", Version: "v2", Kind: "HorizontalPodAutoscaler"}: {}, + {Group: "autoscaling", Version: "v2", Kind: "HorizontalPodAutoscalerList"}: {}, {Group: "autoscaling", Version: "v2beta1", Kind: "HorizontalPodAutoscaler"}: {}, {Group: "autoscaling", Version: "v2beta1", Kind: "HorizontalPodAutoscalerList"}: {}, {Group: "autoscaling", Version: "v2beta2", Kind: "HorizontalPodAutoscaler"}: {}, diff --git a/pkg/apis/autoscaling/install/install.go b/pkg/apis/autoscaling/install/install.go index b2c52ed7cc0b..3740aee3155a 100644 --- a/pkg/apis/autoscaling/install/install.go +++ b/pkg/apis/autoscaling/install/install.go @@ -24,6 +24,7 @@ import ( "k8s.io/kubernetes/pkg/api/legacyscheme" "k8s.io/kubernetes/pkg/apis/autoscaling" "k8s.io/kubernetes/pkg/apis/autoscaling/v1" + "k8s.io/kubernetes/pkg/apis/autoscaling/v2" "k8s.io/kubernetes/pkg/apis/autoscaling/v2beta1" "k8s.io/kubernetes/pkg/apis/autoscaling/v2beta2" ) @@ -36,7 +37,9 @@ func init() { func Install(scheme *runtime.Scheme) { utilruntime.Must(autoscaling.AddToScheme(scheme)) utilruntime.Must(v2beta2.AddToScheme(scheme)) + utilruntime.Must(v2.AddToScheme(scheme)) utilruntime.Must(v2beta1.AddToScheme(scheme)) utilruntime.Must(v1.AddToScheme(scheme)) - utilruntime.Must(scheme.SetVersionPriority(v1.SchemeGroupVersion, v2beta1.SchemeGroupVersion, v2beta2.SchemeGroupVersion)) + // TODO: move v2 to the front of the list in 1.24 + utilruntime.Must(scheme.SetVersionPriority(v1.SchemeGroupVersion, v2.SchemeGroupVersion, v2beta1.SchemeGroupVersion, v2beta2.SchemeGroupVersion)) } diff --git a/pkg/apis/autoscaling/v2/conversion.go b/pkg/apis/autoscaling/v2/conversion.go index 3a555e8c8721..fc159fb24e57 100644 --- a/pkg/apis/autoscaling/v2/conversion.go +++ b/pkg/apis/autoscaling/v2/conversion.go @@ -1,5 +1,5 @@ /* -Copyright 2020 The Kubernetes Authors. +Copyright 2021 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,29 +14,29 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v2beta2 +package v2 import ( - autoscalingv2beta2 "k8s.io/api/autoscaling/v2beta2" + autoscalingv2 "k8s.io/api/autoscaling/v2" "k8s.io/apimachinery/pkg/conversion" "k8s.io/kubernetes/pkg/apis/autoscaling" ) -func Convert_autoscaling_HorizontalPodAutoscaler_To_v2beta2_HorizontalPodAutoscaler(in *autoscaling.HorizontalPodAutoscaler, out *autoscalingv2beta2.HorizontalPodAutoscaler, s conversion.Scope) error { - if err := autoConvert_autoscaling_HorizontalPodAutoscaler_To_v2beta2_HorizontalPodAutoscaler(in, out, s); err != nil { +func Convert_autoscaling_HorizontalPodAutoscaler_To_v2_HorizontalPodAutoscaler(in *autoscaling.HorizontalPodAutoscaler, out *autoscalingv2.HorizontalPodAutoscaler, s conversion.Scope) error { + if err := autoConvert_autoscaling_HorizontalPodAutoscaler_To_v2_HorizontalPodAutoscaler(in, out, s); err != nil { return err } - // v2beta2 round-trips to internal without any serialized annotations, make sure any from other versions don't get serialized + // v2 round-trips to internal without any serialized annotations, make sure any from other versions don't get serialized out.Annotations, _ = autoscaling.DropRoundTripHorizontalPodAutoscalerAnnotations(out.Annotations) return nil } -func Convert_v2beta2_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler(in *autoscalingv2beta2.HorizontalPodAutoscaler, out *autoscaling.HorizontalPodAutoscaler, s conversion.Scope) error { - if err := autoConvert_v2beta2_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler(in, out, s); err != nil { +func Convert_v2_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler(in *autoscalingv2.HorizontalPodAutoscaler, out *autoscaling.HorizontalPodAutoscaler, s conversion.Scope) error { + if err := autoConvert_v2_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler(in, out, s); err != nil { return err } - // v2beta2 round-trips to internal without any serialized annotations, make sure any from other versions don't get serialized + // v2 round-trips to internal without any serialized annotations, make sure any from other versions don't get serialized out.Annotations, _ = autoscaling.DropRoundTripHorizontalPodAutoscalerAnnotations(out.Annotations) return nil } diff --git a/pkg/apis/autoscaling/v2/defaults.go b/pkg/apis/autoscaling/v2/defaults.go index a688bfa60705..29e7c998f46b 100644 --- a/pkg/apis/autoscaling/v2/defaults.go +++ b/pkg/apis/autoscaling/v2/defaults.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright 2021 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,10 +14,10 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v2beta2 +package v2 import ( - autoscalingv2beta2 "k8s.io/api/autoscaling/v2beta2" + autoscalingv2 "k8s.io/api/autoscaling/v2" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubernetes/pkg/apis/autoscaling" @@ -29,18 +29,18 @@ var ( scaleUpLimitMinimumPods int32 = 4 scaleUpPeriod int32 = 15 scaleUpStabilizationSeconds int32 - maxPolicy = autoscalingv2beta2.MaxPolicySelect - defaultHPAScaleUpRules = autoscalingv2beta2.HPAScalingRules{ + maxPolicy = autoscalingv2.MaxChangePolicySelect + defaultHPAScaleUpRules = autoscalingv2.HPAScalingRules{ StabilizationWindowSeconds: &scaleUpStabilizationSeconds, SelectPolicy: &maxPolicy, - Policies: []autoscalingv2beta2.HPAScalingPolicy{ + Policies: []autoscalingv2.HPAScalingPolicy{ { - Type: autoscalingv2beta2.PodsScalingPolicy, + Type: autoscalingv2.PodsScalingPolicy, Value: scaleUpLimitMinimumPods, PeriodSeconds: scaleUpPeriod, }, { - Type: autoscalingv2beta2.PercentScalingPolicy, + Type: autoscalingv2.PercentScalingPolicy, Value: scaleUpLimitPercent, PeriodSeconds: scaleUpPeriod, }, @@ -49,14 +49,13 @@ var ( scaleDownPeriod int32 = 15 // Currently we can set the downscaleStabilizationWindow from the command line // So we can not rewrite the command line option from here - scaleDownStabilizationSeconds *int32 = nil - scaleDownLimitPercent int32 = 100 - defaultHPAScaleDownRules = autoscalingv2beta2.HPAScalingRules{ - StabilizationWindowSeconds: scaleDownStabilizationSeconds, + scaleDownLimitPercent int32 = 100 + defaultHPAScaleDownRules = autoscalingv2.HPAScalingRules{ + StabilizationWindowSeconds: nil, SelectPolicy: &maxPolicy, - Policies: []autoscalingv2beta2.HPAScalingPolicy{ + Policies: []autoscalingv2.HPAScalingPolicy{ { - Type: autoscalingv2beta2.PercentScalingPolicy, + Type: autoscalingv2.PercentScalingPolicy, Value: scaleDownLimitPercent, PeriodSeconds: scaleDownPeriod, }, @@ -68,7 +67,7 @@ func addDefaultingFuncs(scheme *runtime.Scheme) error { return RegisterDefaults(scheme) } -func SetDefaults_HorizontalPodAutoscaler(obj *autoscalingv2beta2.HorizontalPodAutoscaler) { +func SetDefaults_HorizontalPodAutoscaler(obj *autoscalingv2.HorizontalPodAutoscaler) { if obj.Spec.MinReplicas == nil { minReplicas := int32(1) obj.Spec.MinReplicas = &minReplicas @@ -76,13 +75,13 @@ func SetDefaults_HorizontalPodAutoscaler(obj *autoscalingv2beta2.HorizontalPodAu if len(obj.Spec.Metrics) == 0 { utilizationDefaultVal := int32(autoscaling.DefaultCPUUtilization) - obj.Spec.Metrics = []autoscalingv2beta2.MetricSpec{ + obj.Spec.Metrics = []autoscalingv2.MetricSpec{ { - Type: autoscalingv2beta2.ResourceMetricSourceType, - Resource: &autoscalingv2beta2.ResourceMetricSource{ + Type: autoscalingv2.ResourceMetricSourceType, + Resource: &autoscalingv2.ResourceMetricSource{ Name: v1.ResourceCPU, - Target: autoscalingv2beta2.MetricTarget{ - Type: autoscalingv2beta2.UtilizationMetricType, + Target: autoscalingv2.MetricTarget{ + Type: autoscalingv2.UtilizationMetricType, AverageUtilization: &utilizationDefaultVal, }, }, @@ -93,7 +92,7 @@ func SetDefaults_HorizontalPodAutoscaler(obj *autoscalingv2beta2.HorizontalPodAu } // SetDefaults_HorizontalPodAutoscalerBehavior fills the behavior if it is not null -func SetDefaults_HorizontalPodAutoscalerBehavior(obj *autoscalingv2beta2.HorizontalPodAutoscaler) { +func SetDefaults_HorizontalPodAutoscalerBehavior(obj *autoscalingv2.HorizontalPodAutoscaler) { // if behavior is specified, we should fill all the 'nil' values with the default ones if obj.Spec.Behavior != nil { obj.Spec.Behavior.ScaleUp = GenerateHPAScaleUpRules(obj.Spec.Behavior.ScaleUp) @@ -103,7 +102,7 @@ func SetDefaults_HorizontalPodAutoscalerBehavior(obj *autoscalingv2beta2.Horizon // GenerateHPAScaleUpRules returns a fully-initialized HPAScalingRules value // We guarantee that no pointer in the structure will have the 'nil' value -func GenerateHPAScaleUpRules(scalingRules *autoscalingv2beta2.HPAScalingRules) *autoscalingv2beta2.HPAScalingRules { +func GenerateHPAScaleUpRules(scalingRules *autoscalingv2.HPAScalingRules) *autoscalingv2.HPAScalingRules { defaultScalingRules := defaultHPAScaleUpRules.DeepCopy() return copyHPAScalingRules(scalingRules, defaultScalingRules) } @@ -111,13 +110,13 @@ func GenerateHPAScaleUpRules(scalingRules *autoscalingv2beta2.HPAScalingRules) * // GenerateHPAScaleDownRules returns a fully-initialized HPAScalingRules value // We guarantee that no pointer in the structure will have the 'nil' value // EXCEPT StabilizationWindowSeconds, for reasoning check the comment for defaultHPAScaleDownRules -func GenerateHPAScaleDownRules(scalingRules *autoscalingv2beta2.HPAScalingRules) *autoscalingv2beta2.HPAScalingRules { +func GenerateHPAScaleDownRules(scalingRules *autoscalingv2.HPAScalingRules) *autoscalingv2.HPAScalingRules { defaultScalingRules := defaultHPAScaleDownRules.DeepCopy() return copyHPAScalingRules(scalingRules, defaultScalingRules) } // copyHPAScalingRules copies all non-`nil` fields in HPA constraint structure -func copyHPAScalingRules(from, to *autoscalingv2beta2.HPAScalingRules) *autoscalingv2beta2.HPAScalingRules { +func copyHPAScalingRules(from, to *autoscalingv2.HPAScalingRules) *autoscalingv2.HPAScalingRules { if from == nil { return to } diff --git a/pkg/apis/autoscaling/v2/defaults_test.go b/pkg/apis/autoscaling/v2/defaults_test.go index 728e2af4ba95..e1f7cd13bf80 100644 --- a/pkg/apis/autoscaling/v2/defaults_test.go +++ b/pkg/apis/autoscaling/v2/defaults_test.go @@ -1,5 +1,5 @@ /* -Copyright 2017 The Kubernetes Authors. +Copyright 2021 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v2beta2_test +package v2_test import ( "reflect" @@ -25,11 +25,11 @@ import ( "k8s.io/kubernetes/pkg/api/legacyscheme" "github.com/stretchr/testify/assert" - autoscalingv2 "k8s.io/api/autoscaling/v2beta2" + autoscalingv2 "k8s.io/api/autoscaling/v2" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/apis/autoscaling" _ "k8s.io/kubernetes/pkg/apis/autoscaling/install" - . "k8s.io/kubernetes/pkg/apis/autoscaling/v2beta2" + . "k8s.io/kubernetes/pkg/apis/autoscaling/v2" _ "k8s.io/kubernetes/pkg/apis/core/install" utilpointer "k8s.io/utils/pointer" ) @@ -48,8 +48,8 @@ func TestGenerateScaleDownRules(t *testing.T) { expectedSelectPolicy string annotation string } - maxPolicy := autoscalingv2.MaxPolicySelect - minPolicy := autoscalingv2.MinPolicySelect + maxPolicy := autoscalingv2.MaxChangePolicySelect + minPolicy := autoscalingv2.MinChangePolicySelect tests := []TestCase{ { annotation: "Default values", @@ -57,7 +57,7 @@ func TestGenerateScaleDownRules(t *testing.T) { {Type: autoscalingv2.PercentScalingPolicy, Value: 100, PeriodSeconds: 15}, }, expectedStabilization: nil, - expectedSelectPolicy: string(autoscalingv2.MaxPolicySelect), + expectedSelectPolicy: string(autoscalingv2.MaxChangePolicySelect), }, { annotation: "All parameters are specified", @@ -72,7 +72,7 @@ func TestGenerateScaleDownRules(t *testing.T) { {Type: autoscalingv2.PercentScalingPolicy, Value: 3, PeriodSeconds: 4}, }, expectedStabilization: utilpointer.Int32Ptr(25), - expectedSelectPolicy: string(autoscalingv2.MaxPolicySelect), + expectedSelectPolicy: string(autoscalingv2.MaxChangePolicySelect), }, { annotation: "Percent policy is specified", @@ -83,7 +83,7 @@ func TestGenerateScaleDownRules(t *testing.T) { {Type: autoscalingv2.PercentScalingPolicy, Value: 1, PeriodSeconds: 2}, }, expectedStabilization: nil, - expectedSelectPolicy: string(autoscalingv2.MinPolicySelect), + expectedSelectPolicy: string(autoscalingv2.MinChangePolicySelect), }, { annotation: "Pods policy is specified", @@ -93,7 +93,7 @@ func TestGenerateScaleDownRules(t *testing.T) { {Type: autoscalingv2.PodsScalingPolicy, Value: 3, PeriodSeconds: 4}, }, expectedStabilization: nil, - expectedSelectPolicy: string(autoscalingv2.MaxPolicySelect), + expectedSelectPolicy: string(autoscalingv2.MaxChangePolicySelect), }, } for _, tc := range tests { @@ -138,8 +138,8 @@ func TestGenerateScaleUpRules(t *testing.T) { expectedSelectPolicy string annotation string } - maxPolicy := autoscalingv2.MaxPolicySelect - minPolicy := autoscalingv2.MinPolicySelect + maxPolicy := autoscalingv2.MaxChangePolicySelect + minPolicy := autoscalingv2.MinChangePolicySelect tests := []TestCase{ { annotation: "Default values", @@ -148,7 +148,7 @@ func TestGenerateScaleUpRules(t *testing.T) { {Type: autoscalingv2.PercentScalingPolicy, Value: 100, PeriodSeconds: 15}, }, expectedStabilization: utilpointer.Int32Ptr(0), - expectedSelectPolicy: string(autoscalingv2.MaxPolicySelect), + expectedSelectPolicy: string(autoscalingv2.MaxChangePolicySelect), }, { annotation: "All parameters are specified", @@ -163,7 +163,7 @@ func TestGenerateScaleUpRules(t *testing.T) { {Type: autoscalingv2.PercentScalingPolicy, Value: 3, PeriodSeconds: 4}, }, expectedStabilization: utilpointer.Int32Ptr(25), - expectedSelectPolicy: string(autoscalingv2.MaxPolicySelect), + expectedSelectPolicy: string(autoscalingv2.MaxChangePolicySelect), }, { annotation: "Pod policy is specified", @@ -174,7 +174,7 @@ func TestGenerateScaleUpRules(t *testing.T) { {Type: autoscalingv2.PodsScalingPolicy, Value: 1, PeriodSeconds: 2}, }, expectedStabilization: utilpointer.Int32Ptr(0), - expectedSelectPolicy: string(autoscalingv2.MinPolicySelect), + expectedSelectPolicy: string(autoscalingv2.MinChangePolicySelect), }, { annotation: "Percent policy is specified", @@ -184,7 +184,7 @@ func TestGenerateScaleUpRules(t *testing.T) { {Type: autoscalingv2.PercentScalingPolicy, Value: 7, PeriodSeconds: 10}, }, expectedStabilization: utilpointer.Int32Ptr(0), - expectedSelectPolicy: string(autoscalingv2.MaxPolicySelect), + expectedSelectPolicy: string(autoscalingv2.MaxChangePolicySelect), }, { annotation: "Pod policy and stabilization window are specified", @@ -195,7 +195,7 @@ func TestGenerateScaleUpRules(t *testing.T) { {Type: autoscalingv2.PodsScalingPolicy, Value: 4, PeriodSeconds: 2}, }, expectedStabilization: utilpointer.Int32Ptr(25), - expectedSelectPolicy: string(autoscalingv2.MaxPolicySelect), + expectedSelectPolicy: string(autoscalingv2.MaxChangePolicySelect), }, { annotation: "Percent policy and stabilization window are specified", @@ -206,7 +206,7 @@ func TestGenerateScaleUpRules(t *testing.T) { {Type: autoscalingv2.PercentScalingPolicy, Value: 7, PeriodSeconds: 60}, }, expectedStabilization: utilpointer.Int32Ptr(25), - expectedSelectPolicy: string(autoscalingv2.MaxPolicySelect), + expectedSelectPolicy: string(autoscalingv2.MaxChangePolicySelect), }, } for _, tc := range tests { diff --git a/pkg/apis/autoscaling/v2/doc.go b/pkg/apis/autoscaling/v2/doc.go index c7283aa40bb5..e508c7a54508 100644 --- a/pkg/apis/autoscaling/v2/doc.go +++ b/pkg/apis/autoscaling/v2/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright 2021 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -15,8 +15,8 @@ limitations under the License. */ // +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/autoscaling -// +k8s:conversion-gen-external-types=k8s.io/api/autoscaling/v2beta2 +// +k8s:conversion-gen-external-types=k8s.io/api/autoscaling/v2 // +k8s:defaulter-gen=TypeMeta -// +k8s:defaulter-gen-input=../../../../vendor/k8s.io/api/autoscaling/v2beta2 +// +k8s:defaulter-gen-input=k8s.io/api/autoscaling/v2 -package v2beta2 // import "k8s.io/kubernetes/pkg/apis/autoscaling/v2beta2" +package v2 // import "k8s.io/kubernetes/pkg/apis/autoscaling/v2" diff --git a/pkg/apis/autoscaling/v2/register.go b/pkg/apis/autoscaling/v2/register.go index fc86de007e99..c7d807cf408c 100644 --- a/pkg/apis/autoscaling/v2/register.go +++ b/pkg/apis/autoscaling/v2/register.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright 2021 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,10 +14,10 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v2beta2 +package v2 import ( - autoscalingv2beta2 "k8s.io/api/autoscaling/v2beta2" + autoscalingv2 "k8s.io/api/autoscaling/v2" "k8s.io/apimachinery/pkg/runtime/schema" ) @@ -25,7 +25,7 @@ import ( const GroupName = "autoscaling" // SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v2beta2"} +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v2"} // Resource takes an unqualified resource and returns a Group qualified GroupResource func Resource(resource string) schema.GroupResource { @@ -33,7 +33,7 @@ func Resource(resource string) schema.GroupResource { } var ( - localSchemeBuilder = &autoscalingv2beta2.SchemeBuilder + localSchemeBuilder = &autoscalingv2.SchemeBuilder AddToScheme = localSchemeBuilder.AddToScheme ) diff --git a/pkg/apis/autoscaling/v2/zz_generated.conversion.go b/pkg/apis/autoscaling/v2/zz_generated.conversion.go index ce94a2e64447..52fc7ad4debc 100644 --- a/pkg/apis/autoscaling/v2/zz_generated.conversion.go +++ b/pkg/apis/autoscaling/v2/zz_generated.conversion.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated /* @@ -18,12 +19,12 @@ limitations under the License. // Code generated by conversion-gen. DO NOT EDIT. -package v2beta2 +package v2 import ( unsafe "unsafe" - v2beta2 "k8s.io/api/autoscaling/v2beta2" + v2 "k8s.io/api/autoscaling/v2" v1 "k8s.io/api/core/v1" resource "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -40,482 +41,482 @@ func init() { // RegisterConversions adds conversion functions to the given scheme. // Public to allow building arbitrary schemes. func RegisterConversions(s *runtime.Scheme) error { - if err := s.AddGeneratedConversionFunc((*v2beta2.ContainerResourceMetricSource)(nil), (*autoscaling.ContainerResourceMetricSource)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v2beta2_ContainerResourceMetricSource_To_autoscaling_ContainerResourceMetricSource(a.(*v2beta2.ContainerResourceMetricSource), b.(*autoscaling.ContainerResourceMetricSource), scope) + if err := s.AddGeneratedConversionFunc((*v2.ContainerResourceMetricSource)(nil), (*autoscaling.ContainerResourceMetricSource)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v2_ContainerResourceMetricSource_To_autoscaling_ContainerResourceMetricSource(a.(*v2.ContainerResourceMetricSource), b.(*autoscaling.ContainerResourceMetricSource), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*autoscaling.ContainerResourceMetricSource)(nil), (*v2beta2.ContainerResourceMetricSource)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_autoscaling_ContainerResourceMetricSource_To_v2beta2_ContainerResourceMetricSource(a.(*autoscaling.ContainerResourceMetricSource), b.(*v2beta2.ContainerResourceMetricSource), scope) + if err := s.AddGeneratedConversionFunc((*autoscaling.ContainerResourceMetricSource)(nil), (*v2.ContainerResourceMetricSource)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_autoscaling_ContainerResourceMetricSource_To_v2_ContainerResourceMetricSource(a.(*autoscaling.ContainerResourceMetricSource), b.(*v2.ContainerResourceMetricSource), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v2beta2.ContainerResourceMetricStatus)(nil), (*autoscaling.ContainerResourceMetricStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v2beta2_ContainerResourceMetricStatus_To_autoscaling_ContainerResourceMetricStatus(a.(*v2beta2.ContainerResourceMetricStatus), b.(*autoscaling.ContainerResourceMetricStatus), scope) + if err := s.AddGeneratedConversionFunc((*v2.ContainerResourceMetricStatus)(nil), (*autoscaling.ContainerResourceMetricStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v2_ContainerResourceMetricStatus_To_autoscaling_ContainerResourceMetricStatus(a.(*v2.ContainerResourceMetricStatus), b.(*autoscaling.ContainerResourceMetricStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*autoscaling.ContainerResourceMetricStatus)(nil), (*v2beta2.ContainerResourceMetricStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_autoscaling_ContainerResourceMetricStatus_To_v2beta2_ContainerResourceMetricStatus(a.(*autoscaling.ContainerResourceMetricStatus), b.(*v2beta2.ContainerResourceMetricStatus), scope) + if err := s.AddGeneratedConversionFunc((*autoscaling.ContainerResourceMetricStatus)(nil), (*v2.ContainerResourceMetricStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_autoscaling_ContainerResourceMetricStatus_To_v2_ContainerResourceMetricStatus(a.(*autoscaling.ContainerResourceMetricStatus), b.(*v2.ContainerResourceMetricStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v2beta2.CrossVersionObjectReference)(nil), (*autoscaling.CrossVersionObjectReference)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v2beta2_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(a.(*v2beta2.CrossVersionObjectReference), b.(*autoscaling.CrossVersionObjectReference), scope) + if err := s.AddGeneratedConversionFunc((*v2.CrossVersionObjectReference)(nil), (*autoscaling.CrossVersionObjectReference)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v2_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(a.(*v2.CrossVersionObjectReference), b.(*autoscaling.CrossVersionObjectReference), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*autoscaling.CrossVersionObjectReference)(nil), (*v2beta2.CrossVersionObjectReference)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_autoscaling_CrossVersionObjectReference_To_v2beta2_CrossVersionObjectReference(a.(*autoscaling.CrossVersionObjectReference), b.(*v2beta2.CrossVersionObjectReference), scope) + if err := s.AddGeneratedConversionFunc((*autoscaling.CrossVersionObjectReference)(nil), (*v2.CrossVersionObjectReference)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_autoscaling_CrossVersionObjectReference_To_v2_CrossVersionObjectReference(a.(*autoscaling.CrossVersionObjectReference), b.(*v2.CrossVersionObjectReference), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v2beta2.ExternalMetricSource)(nil), (*autoscaling.ExternalMetricSource)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v2beta2_ExternalMetricSource_To_autoscaling_ExternalMetricSource(a.(*v2beta2.ExternalMetricSource), b.(*autoscaling.ExternalMetricSource), scope) + if err := s.AddGeneratedConversionFunc((*v2.ExternalMetricSource)(nil), (*autoscaling.ExternalMetricSource)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v2_ExternalMetricSource_To_autoscaling_ExternalMetricSource(a.(*v2.ExternalMetricSource), b.(*autoscaling.ExternalMetricSource), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*autoscaling.ExternalMetricSource)(nil), (*v2beta2.ExternalMetricSource)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_autoscaling_ExternalMetricSource_To_v2beta2_ExternalMetricSource(a.(*autoscaling.ExternalMetricSource), b.(*v2beta2.ExternalMetricSource), scope) + if err := s.AddGeneratedConversionFunc((*autoscaling.ExternalMetricSource)(nil), (*v2.ExternalMetricSource)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_autoscaling_ExternalMetricSource_To_v2_ExternalMetricSource(a.(*autoscaling.ExternalMetricSource), b.(*v2.ExternalMetricSource), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v2beta2.ExternalMetricStatus)(nil), (*autoscaling.ExternalMetricStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v2beta2_ExternalMetricStatus_To_autoscaling_ExternalMetricStatus(a.(*v2beta2.ExternalMetricStatus), b.(*autoscaling.ExternalMetricStatus), scope) + if err := s.AddGeneratedConversionFunc((*v2.ExternalMetricStatus)(nil), (*autoscaling.ExternalMetricStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v2_ExternalMetricStatus_To_autoscaling_ExternalMetricStatus(a.(*v2.ExternalMetricStatus), b.(*autoscaling.ExternalMetricStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*autoscaling.ExternalMetricStatus)(nil), (*v2beta2.ExternalMetricStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_autoscaling_ExternalMetricStatus_To_v2beta2_ExternalMetricStatus(a.(*autoscaling.ExternalMetricStatus), b.(*v2beta2.ExternalMetricStatus), scope) + if err := s.AddGeneratedConversionFunc((*autoscaling.ExternalMetricStatus)(nil), (*v2.ExternalMetricStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_autoscaling_ExternalMetricStatus_To_v2_ExternalMetricStatus(a.(*autoscaling.ExternalMetricStatus), b.(*v2.ExternalMetricStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v2beta2.HPAScalingPolicy)(nil), (*autoscaling.HPAScalingPolicy)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v2beta2_HPAScalingPolicy_To_autoscaling_HPAScalingPolicy(a.(*v2beta2.HPAScalingPolicy), b.(*autoscaling.HPAScalingPolicy), scope) + if err := s.AddGeneratedConversionFunc((*v2.HPAScalingPolicy)(nil), (*autoscaling.HPAScalingPolicy)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v2_HPAScalingPolicy_To_autoscaling_HPAScalingPolicy(a.(*v2.HPAScalingPolicy), b.(*autoscaling.HPAScalingPolicy), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*autoscaling.HPAScalingPolicy)(nil), (*v2beta2.HPAScalingPolicy)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_autoscaling_HPAScalingPolicy_To_v2beta2_HPAScalingPolicy(a.(*autoscaling.HPAScalingPolicy), b.(*v2beta2.HPAScalingPolicy), scope) + if err := s.AddGeneratedConversionFunc((*autoscaling.HPAScalingPolicy)(nil), (*v2.HPAScalingPolicy)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_autoscaling_HPAScalingPolicy_To_v2_HPAScalingPolicy(a.(*autoscaling.HPAScalingPolicy), b.(*v2.HPAScalingPolicy), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v2beta2.HPAScalingRules)(nil), (*autoscaling.HPAScalingRules)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v2beta2_HPAScalingRules_To_autoscaling_HPAScalingRules(a.(*v2beta2.HPAScalingRules), b.(*autoscaling.HPAScalingRules), scope) + if err := s.AddGeneratedConversionFunc((*v2.HPAScalingRules)(nil), (*autoscaling.HPAScalingRules)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v2_HPAScalingRules_To_autoscaling_HPAScalingRules(a.(*v2.HPAScalingRules), b.(*autoscaling.HPAScalingRules), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*autoscaling.HPAScalingRules)(nil), (*v2beta2.HPAScalingRules)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_autoscaling_HPAScalingRules_To_v2beta2_HPAScalingRules(a.(*autoscaling.HPAScalingRules), b.(*v2beta2.HPAScalingRules), scope) + if err := s.AddGeneratedConversionFunc((*autoscaling.HPAScalingRules)(nil), (*v2.HPAScalingRules)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_autoscaling_HPAScalingRules_To_v2_HPAScalingRules(a.(*autoscaling.HPAScalingRules), b.(*v2.HPAScalingRules), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v2beta2.HorizontalPodAutoscalerBehavior)(nil), (*autoscaling.HorizontalPodAutoscalerBehavior)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v2beta2_HorizontalPodAutoscalerBehavior_To_autoscaling_HorizontalPodAutoscalerBehavior(a.(*v2beta2.HorizontalPodAutoscalerBehavior), b.(*autoscaling.HorizontalPodAutoscalerBehavior), scope) + if err := s.AddGeneratedConversionFunc((*v2.HorizontalPodAutoscalerBehavior)(nil), (*autoscaling.HorizontalPodAutoscalerBehavior)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v2_HorizontalPodAutoscalerBehavior_To_autoscaling_HorizontalPodAutoscalerBehavior(a.(*v2.HorizontalPodAutoscalerBehavior), b.(*autoscaling.HorizontalPodAutoscalerBehavior), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*autoscaling.HorizontalPodAutoscalerBehavior)(nil), (*v2beta2.HorizontalPodAutoscalerBehavior)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_autoscaling_HorizontalPodAutoscalerBehavior_To_v2beta2_HorizontalPodAutoscalerBehavior(a.(*autoscaling.HorizontalPodAutoscalerBehavior), b.(*v2beta2.HorizontalPodAutoscalerBehavior), scope) + if err := s.AddGeneratedConversionFunc((*autoscaling.HorizontalPodAutoscalerBehavior)(nil), (*v2.HorizontalPodAutoscalerBehavior)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_autoscaling_HorizontalPodAutoscalerBehavior_To_v2_HorizontalPodAutoscalerBehavior(a.(*autoscaling.HorizontalPodAutoscalerBehavior), b.(*v2.HorizontalPodAutoscalerBehavior), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v2beta2.HorizontalPodAutoscalerCondition)(nil), (*autoscaling.HorizontalPodAutoscalerCondition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v2beta2_HorizontalPodAutoscalerCondition_To_autoscaling_HorizontalPodAutoscalerCondition(a.(*v2beta2.HorizontalPodAutoscalerCondition), b.(*autoscaling.HorizontalPodAutoscalerCondition), scope) + if err := s.AddGeneratedConversionFunc((*v2.HorizontalPodAutoscalerCondition)(nil), (*autoscaling.HorizontalPodAutoscalerCondition)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v2_HorizontalPodAutoscalerCondition_To_autoscaling_HorizontalPodAutoscalerCondition(a.(*v2.HorizontalPodAutoscalerCondition), b.(*autoscaling.HorizontalPodAutoscalerCondition), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*autoscaling.HorizontalPodAutoscalerCondition)(nil), (*v2beta2.HorizontalPodAutoscalerCondition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_autoscaling_HorizontalPodAutoscalerCondition_To_v2beta2_HorizontalPodAutoscalerCondition(a.(*autoscaling.HorizontalPodAutoscalerCondition), b.(*v2beta2.HorizontalPodAutoscalerCondition), scope) + if err := s.AddGeneratedConversionFunc((*autoscaling.HorizontalPodAutoscalerCondition)(nil), (*v2.HorizontalPodAutoscalerCondition)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_autoscaling_HorizontalPodAutoscalerCondition_To_v2_HorizontalPodAutoscalerCondition(a.(*autoscaling.HorizontalPodAutoscalerCondition), b.(*v2.HorizontalPodAutoscalerCondition), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v2beta2.HorizontalPodAutoscalerList)(nil), (*autoscaling.HorizontalPodAutoscalerList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v2beta2_HorizontalPodAutoscalerList_To_autoscaling_HorizontalPodAutoscalerList(a.(*v2beta2.HorizontalPodAutoscalerList), b.(*autoscaling.HorizontalPodAutoscalerList), scope) + if err := s.AddGeneratedConversionFunc((*v2.HorizontalPodAutoscalerList)(nil), (*autoscaling.HorizontalPodAutoscalerList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v2_HorizontalPodAutoscalerList_To_autoscaling_HorizontalPodAutoscalerList(a.(*v2.HorizontalPodAutoscalerList), b.(*autoscaling.HorizontalPodAutoscalerList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*autoscaling.HorizontalPodAutoscalerList)(nil), (*v2beta2.HorizontalPodAutoscalerList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_autoscaling_HorizontalPodAutoscalerList_To_v2beta2_HorizontalPodAutoscalerList(a.(*autoscaling.HorizontalPodAutoscalerList), b.(*v2beta2.HorizontalPodAutoscalerList), scope) + if err := s.AddGeneratedConversionFunc((*autoscaling.HorizontalPodAutoscalerList)(nil), (*v2.HorizontalPodAutoscalerList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_autoscaling_HorizontalPodAutoscalerList_To_v2_HorizontalPodAutoscalerList(a.(*autoscaling.HorizontalPodAutoscalerList), b.(*v2.HorizontalPodAutoscalerList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v2beta2.HorizontalPodAutoscalerSpec)(nil), (*autoscaling.HorizontalPodAutoscalerSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v2beta2_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec(a.(*v2beta2.HorizontalPodAutoscalerSpec), b.(*autoscaling.HorizontalPodAutoscalerSpec), scope) + if err := s.AddGeneratedConversionFunc((*v2.HorizontalPodAutoscalerSpec)(nil), (*autoscaling.HorizontalPodAutoscalerSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v2_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec(a.(*v2.HorizontalPodAutoscalerSpec), b.(*autoscaling.HorizontalPodAutoscalerSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*autoscaling.HorizontalPodAutoscalerSpec)(nil), (*v2beta2.HorizontalPodAutoscalerSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_autoscaling_HorizontalPodAutoscalerSpec_To_v2beta2_HorizontalPodAutoscalerSpec(a.(*autoscaling.HorizontalPodAutoscalerSpec), b.(*v2beta2.HorizontalPodAutoscalerSpec), scope) + if err := s.AddGeneratedConversionFunc((*autoscaling.HorizontalPodAutoscalerSpec)(nil), (*v2.HorizontalPodAutoscalerSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_autoscaling_HorizontalPodAutoscalerSpec_To_v2_HorizontalPodAutoscalerSpec(a.(*autoscaling.HorizontalPodAutoscalerSpec), b.(*v2.HorizontalPodAutoscalerSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v2beta2.HorizontalPodAutoscalerStatus)(nil), (*autoscaling.HorizontalPodAutoscalerStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v2beta2_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus(a.(*v2beta2.HorizontalPodAutoscalerStatus), b.(*autoscaling.HorizontalPodAutoscalerStatus), scope) + if err := s.AddGeneratedConversionFunc((*v2.HorizontalPodAutoscalerStatus)(nil), (*autoscaling.HorizontalPodAutoscalerStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v2_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus(a.(*v2.HorizontalPodAutoscalerStatus), b.(*autoscaling.HorizontalPodAutoscalerStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*autoscaling.HorizontalPodAutoscalerStatus)(nil), (*v2beta2.HorizontalPodAutoscalerStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_autoscaling_HorizontalPodAutoscalerStatus_To_v2beta2_HorizontalPodAutoscalerStatus(a.(*autoscaling.HorizontalPodAutoscalerStatus), b.(*v2beta2.HorizontalPodAutoscalerStatus), scope) + if err := s.AddGeneratedConversionFunc((*autoscaling.HorizontalPodAutoscalerStatus)(nil), (*v2.HorizontalPodAutoscalerStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_autoscaling_HorizontalPodAutoscalerStatus_To_v2_HorizontalPodAutoscalerStatus(a.(*autoscaling.HorizontalPodAutoscalerStatus), b.(*v2.HorizontalPodAutoscalerStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v2beta2.MetricIdentifier)(nil), (*autoscaling.MetricIdentifier)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v2beta2_MetricIdentifier_To_autoscaling_MetricIdentifier(a.(*v2beta2.MetricIdentifier), b.(*autoscaling.MetricIdentifier), scope) + if err := s.AddGeneratedConversionFunc((*v2.MetricIdentifier)(nil), (*autoscaling.MetricIdentifier)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v2_MetricIdentifier_To_autoscaling_MetricIdentifier(a.(*v2.MetricIdentifier), b.(*autoscaling.MetricIdentifier), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*autoscaling.MetricIdentifier)(nil), (*v2beta2.MetricIdentifier)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_autoscaling_MetricIdentifier_To_v2beta2_MetricIdentifier(a.(*autoscaling.MetricIdentifier), b.(*v2beta2.MetricIdentifier), scope) + if err := s.AddGeneratedConversionFunc((*autoscaling.MetricIdentifier)(nil), (*v2.MetricIdentifier)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_autoscaling_MetricIdentifier_To_v2_MetricIdentifier(a.(*autoscaling.MetricIdentifier), b.(*v2.MetricIdentifier), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v2beta2.MetricSpec)(nil), (*autoscaling.MetricSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v2beta2_MetricSpec_To_autoscaling_MetricSpec(a.(*v2beta2.MetricSpec), b.(*autoscaling.MetricSpec), scope) + if err := s.AddGeneratedConversionFunc((*v2.MetricSpec)(nil), (*autoscaling.MetricSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v2_MetricSpec_To_autoscaling_MetricSpec(a.(*v2.MetricSpec), b.(*autoscaling.MetricSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*autoscaling.MetricSpec)(nil), (*v2beta2.MetricSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_autoscaling_MetricSpec_To_v2beta2_MetricSpec(a.(*autoscaling.MetricSpec), b.(*v2beta2.MetricSpec), scope) + if err := s.AddGeneratedConversionFunc((*autoscaling.MetricSpec)(nil), (*v2.MetricSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_autoscaling_MetricSpec_To_v2_MetricSpec(a.(*autoscaling.MetricSpec), b.(*v2.MetricSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v2beta2.MetricStatus)(nil), (*autoscaling.MetricStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v2beta2_MetricStatus_To_autoscaling_MetricStatus(a.(*v2beta2.MetricStatus), b.(*autoscaling.MetricStatus), scope) + if err := s.AddGeneratedConversionFunc((*v2.MetricStatus)(nil), (*autoscaling.MetricStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v2_MetricStatus_To_autoscaling_MetricStatus(a.(*v2.MetricStatus), b.(*autoscaling.MetricStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*autoscaling.MetricStatus)(nil), (*v2beta2.MetricStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_autoscaling_MetricStatus_To_v2beta2_MetricStatus(a.(*autoscaling.MetricStatus), b.(*v2beta2.MetricStatus), scope) + if err := s.AddGeneratedConversionFunc((*autoscaling.MetricStatus)(nil), (*v2.MetricStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_autoscaling_MetricStatus_To_v2_MetricStatus(a.(*autoscaling.MetricStatus), b.(*v2.MetricStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v2beta2.MetricTarget)(nil), (*autoscaling.MetricTarget)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v2beta2_MetricTarget_To_autoscaling_MetricTarget(a.(*v2beta2.MetricTarget), b.(*autoscaling.MetricTarget), scope) + if err := s.AddGeneratedConversionFunc((*v2.MetricTarget)(nil), (*autoscaling.MetricTarget)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v2_MetricTarget_To_autoscaling_MetricTarget(a.(*v2.MetricTarget), b.(*autoscaling.MetricTarget), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*autoscaling.MetricTarget)(nil), (*v2beta2.MetricTarget)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_autoscaling_MetricTarget_To_v2beta2_MetricTarget(a.(*autoscaling.MetricTarget), b.(*v2beta2.MetricTarget), scope) + if err := s.AddGeneratedConversionFunc((*autoscaling.MetricTarget)(nil), (*v2.MetricTarget)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_autoscaling_MetricTarget_To_v2_MetricTarget(a.(*autoscaling.MetricTarget), b.(*v2.MetricTarget), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v2beta2.MetricValueStatus)(nil), (*autoscaling.MetricValueStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v2beta2_MetricValueStatus_To_autoscaling_MetricValueStatus(a.(*v2beta2.MetricValueStatus), b.(*autoscaling.MetricValueStatus), scope) + if err := s.AddGeneratedConversionFunc((*v2.MetricValueStatus)(nil), (*autoscaling.MetricValueStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v2_MetricValueStatus_To_autoscaling_MetricValueStatus(a.(*v2.MetricValueStatus), b.(*autoscaling.MetricValueStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*autoscaling.MetricValueStatus)(nil), (*v2beta2.MetricValueStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_autoscaling_MetricValueStatus_To_v2beta2_MetricValueStatus(a.(*autoscaling.MetricValueStatus), b.(*v2beta2.MetricValueStatus), scope) + if err := s.AddGeneratedConversionFunc((*autoscaling.MetricValueStatus)(nil), (*v2.MetricValueStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_autoscaling_MetricValueStatus_To_v2_MetricValueStatus(a.(*autoscaling.MetricValueStatus), b.(*v2.MetricValueStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v2beta2.ObjectMetricSource)(nil), (*autoscaling.ObjectMetricSource)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v2beta2_ObjectMetricSource_To_autoscaling_ObjectMetricSource(a.(*v2beta2.ObjectMetricSource), b.(*autoscaling.ObjectMetricSource), scope) + if err := s.AddGeneratedConversionFunc((*v2.ObjectMetricSource)(nil), (*autoscaling.ObjectMetricSource)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v2_ObjectMetricSource_To_autoscaling_ObjectMetricSource(a.(*v2.ObjectMetricSource), b.(*autoscaling.ObjectMetricSource), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*autoscaling.ObjectMetricSource)(nil), (*v2beta2.ObjectMetricSource)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_autoscaling_ObjectMetricSource_To_v2beta2_ObjectMetricSource(a.(*autoscaling.ObjectMetricSource), b.(*v2beta2.ObjectMetricSource), scope) + if err := s.AddGeneratedConversionFunc((*autoscaling.ObjectMetricSource)(nil), (*v2.ObjectMetricSource)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_autoscaling_ObjectMetricSource_To_v2_ObjectMetricSource(a.(*autoscaling.ObjectMetricSource), b.(*v2.ObjectMetricSource), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v2beta2.ObjectMetricStatus)(nil), (*autoscaling.ObjectMetricStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v2beta2_ObjectMetricStatus_To_autoscaling_ObjectMetricStatus(a.(*v2beta2.ObjectMetricStatus), b.(*autoscaling.ObjectMetricStatus), scope) + if err := s.AddGeneratedConversionFunc((*v2.ObjectMetricStatus)(nil), (*autoscaling.ObjectMetricStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v2_ObjectMetricStatus_To_autoscaling_ObjectMetricStatus(a.(*v2.ObjectMetricStatus), b.(*autoscaling.ObjectMetricStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*autoscaling.ObjectMetricStatus)(nil), (*v2beta2.ObjectMetricStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_autoscaling_ObjectMetricStatus_To_v2beta2_ObjectMetricStatus(a.(*autoscaling.ObjectMetricStatus), b.(*v2beta2.ObjectMetricStatus), scope) + if err := s.AddGeneratedConversionFunc((*autoscaling.ObjectMetricStatus)(nil), (*v2.ObjectMetricStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_autoscaling_ObjectMetricStatus_To_v2_ObjectMetricStatus(a.(*autoscaling.ObjectMetricStatus), b.(*v2.ObjectMetricStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v2beta2.PodsMetricSource)(nil), (*autoscaling.PodsMetricSource)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v2beta2_PodsMetricSource_To_autoscaling_PodsMetricSource(a.(*v2beta2.PodsMetricSource), b.(*autoscaling.PodsMetricSource), scope) + if err := s.AddGeneratedConversionFunc((*v2.PodsMetricSource)(nil), (*autoscaling.PodsMetricSource)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v2_PodsMetricSource_To_autoscaling_PodsMetricSource(a.(*v2.PodsMetricSource), b.(*autoscaling.PodsMetricSource), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*autoscaling.PodsMetricSource)(nil), (*v2beta2.PodsMetricSource)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_autoscaling_PodsMetricSource_To_v2beta2_PodsMetricSource(a.(*autoscaling.PodsMetricSource), b.(*v2beta2.PodsMetricSource), scope) + if err := s.AddGeneratedConversionFunc((*autoscaling.PodsMetricSource)(nil), (*v2.PodsMetricSource)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_autoscaling_PodsMetricSource_To_v2_PodsMetricSource(a.(*autoscaling.PodsMetricSource), b.(*v2.PodsMetricSource), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v2beta2.PodsMetricStatus)(nil), (*autoscaling.PodsMetricStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v2beta2_PodsMetricStatus_To_autoscaling_PodsMetricStatus(a.(*v2beta2.PodsMetricStatus), b.(*autoscaling.PodsMetricStatus), scope) + if err := s.AddGeneratedConversionFunc((*v2.PodsMetricStatus)(nil), (*autoscaling.PodsMetricStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v2_PodsMetricStatus_To_autoscaling_PodsMetricStatus(a.(*v2.PodsMetricStatus), b.(*autoscaling.PodsMetricStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*autoscaling.PodsMetricStatus)(nil), (*v2beta2.PodsMetricStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_autoscaling_PodsMetricStatus_To_v2beta2_PodsMetricStatus(a.(*autoscaling.PodsMetricStatus), b.(*v2beta2.PodsMetricStatus), scope) + if err := s.AddGeneratedConversionFunc((*autoscaling.PodsMetricStatus)(nil), (*v2.PodsMetricStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_autoscaling_PodsMetricStatus_To_v2_PodsMetricStatus(a.(*autoscaling.PodsMetricStatus), b.(*v2.PodsMetricStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v2beta2.ResourceMetricSource)(nil), (*autoscaling.ResourceMetricSource)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v2beta2_ResourceMetricSource_To_autoscaling_ResourceMetricSource(a.(*v2beta2.ResourceMetricSource), b.(*autoscaling.ResourceMetricSource), scope) + if err := s.AddGeneratedConversionFunc((*v2.ResourceMetricSource)(nil), (*autoscaling.ResourceMetricSource)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v2_ResourceMetricSource_To_autoscaling_ResourceMetricSource(a.(*v2.ResourceMetricSource), b.(*autoscaling.ResourceMetricSource), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*autoscaling.ResourceMetricSource)(nil), (*v2beta2.ResourceMetricSource)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_autoscaling_ResourceMetricSource_To_v2beta2_ResourceMetricSource(a.(*autoscaling.ResourceMetricSource), b.(*v2beta2.ResourceMetricSource), scope) + if err := s.AddGeneratedConversionFunc((*autoscaling.ResourceMetricSource)(nil), (*v2.ResourceMetricSource)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_autoscaling_ResourceMetricSource_To_v2_ResourceMetricSource(a.(*autoscaling.ResourceMetricSource), b.(*v2.ResourceMetricSource), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v2beta2.ResourceMetricStatus)(nil), (*autoscaling.ResourceMetricStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v2beta2_ResourceMetricStatus_To_autoscaling_ResourceMetricStatus(a.(*v2beta2.ResourceMetricStatus), b.(*autoscaling.ResourceMetricStatus), scope) + if err := s.AddGeneratedConversionFunc((*v2.ResourceMetricStatus)(nil), (*autoscaling.ResourceMetricStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v2_ResourceMetricStatus_To_autoscaling_ResourceMetricStatus(a.(*v2.ResourceMetricStatus), b.(*autoscaling.ResourceMetricStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*autoscaling.ResourceMetricStatus)(nil), (*v2beta2.ResourceMetricStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_autoscaling_ResourceMetricStatus_To_v2beta2_ResourceMetricStatus(a.(*autoscaling.ResourceMetricStatus), b.(*v2beta2.ResourceMetricStatus), scope) + if err := s.AddGeneratedConversionFunc((*autoscaling.ResourceMetricStatus)(nil), (*v2.ResourceMetricStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_autoscaling_ResourceMetricStatus_To_v2_ResourceMetricStatus(a.(*autoscaling.ResourceMetricStatus), b.(*v2.ResourceMetricStatus), scope) }); err != nil { return err } - if err := s.AddConversionFunc((*autoscaling.HorizontalPodAutoscaler)(nil), (*v2beta2.HorizontalPodAutoscaler)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_autoscaling_HorizontalPodAutoscaler_To_v2beta2_HorizontalPodAutoscaler(a.(*autoscaling.HorizontalPodAutoscaler), b.(*v2beta2.HorizontalPodAutoscaler), scope) + if err := s.AddConversionFunc((*autoscaling.HorizontalPodAutoscaler)(nil), (*v2.HorizontalPodAutoscaler)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_autoscaling_HorizontalPodAutoscaler_To_v2_HorizontalPodAutoscaler(a.(*autoscaling.HorizontalPodAutoscaler), b.(*v2.HorizontalPodAutoscaler), scope) }); err != nil { return err } - if err := s.AddConversionFunc((*v2beta2.HorizontalPodAutoscaler)(nil), (*autoscaling.HorizontalPodAutoscaler)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v2beta2_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler(a.(*v2beta2.HorizontalPodAutoscaler), b.(*autoscaling.HorizontalPodAutoscaler), scope) + if err := s.AddConversionFunc((*v2.HorizontalPodAutoscaler)(nil), (*autoscaling.HorizontalPodAutoscaler)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v2_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler(a.(*v2.HorizontalPodAutoscaler), b.(*autoscaling.HorizontalPodAutoscaler), scope) }); err != nil { return err } return nil } -func autoConvert_v2beta2_ContainerResourceMetricSource_To_autoscaling_ContainerResourceMetricSource(in *v2beta2.ContainerResourceMetricSource, out *autoscaling.ContainerResourceMetricSource, s conversion.Scope) error { +func autoConvert_v2_ContainerResourceMetricSource_To_autoscaling_ContainerResourceMetricSource(in *v2.ContainerResourceMetricSource, out *autoscaling.ContainerResourceMetricSource, s conversion.Scope) error { out.Name = core.ResourceName(in.Name) - if err := Convert_v2beta2_MetricTarget_To_autoscaling_MetricTarget(&in.Target, &out.Target, s); err != nil { + if err := Convert_v2_MetricTarget_To_autoscaling_MetricTarget(&in.Target, &out.Target, s); err != nil { return err } out.Container = in.Container return nil } -// Convert_v2beta2_ContainerResourceMetricSource_To_autoscaling_ContainerResourceMetricSource is an autogenerated conversion function. -func Convert_v2beta2_ContainerResourceMetricSource_To_autoscaling_ContainerResourceMetricSource(in *v2beta2.ContainerResourceMetricSource, out *autoscaling.ContainerResourceMetricSource, s conversion.Scope) error { - return autoConvert_v2beta2_ContainerResourceMetricSource_To_autoscaling_ContainerResourceMetricSource(in, out, s) +// Convert_v2_ContainerResourceMetricSource_To_autoscaling_ContainerResourceMetricSource is an autogenerated conversion function. +func Convert_v2_ContainerResourceMetricSource_To_autoscaling_ContainerResourceMetricSource(in *v2.ContainerResourceMetricSource, out *autoscaling.ContainerResourceMetricSource, s conversion.Scope) error { + return autoConvert_v2_ContainerResourceMetricSource_To_autoscaling_ContainerResourceMetricSource(in, out, s) } -func autoConvert_autoscaling_ContainerResourceMetricSource_To_v2beta2_ContainerResourceMetricSource(in *autoscaling.ContainerResourceMetricSource, out *v2beta2.ContainerResourceMetricSource, s conversion.Scope) error { +func autoConvert_autoscaling_ContainerResourceMetricSource_To_v2_ContainerResourceMetricSource(in *autoscaling.ContainerResourceMetricSource, out *v2.ContainerResourceMetricSource, s conversion.Scope) error { out.Name = v1.ResourceName(in.Name) out.Container = in.Container - if err := Convert_autoscaling_MetricTarget_To_v2beta2_MetricTarget(&in.Target, &out.Target, s); err != nil { + if err := Convert_autoscaling_MetricTarget_To_v2_MetricTarget(&in.Target, &out.Target, s); err != nil { return err } return nil } -// Convert_autoscaling_ContainerResourceMetricSource_To_v2beta2_ContainerResourceMetricSource is an autogenerated conversion function. -func Convert_autoscaling_ContainerResourceMetricSource_To_v2beta2_ContainerResourceMetricSource(in *autoscaling.ContainerResourceMetricSource, out *v2beta2.ContainerResourceMetricSource, s conversion.Scope) error { - return autoConvert_autoscaling_ContainerResourceMetricSource_To_v2beta2_ContainerResourceMetricSource(in, out, s) +// Convert_autoscaling_ContainerResourceMetricSource_To_v2_ContainerResourceMetricSource is an autogenerated conversion function. +func Convert_autoscaling_ContainerResourceMetricSource_To_v2_ContainerResourceMetricSource(in *autoscaling.ContainerResourceMetricSource, out *v2.ContainerResourceMetricSource, s conversion.Scope) error { + return autoConvert_autoscaling_ContainerResourceMetricSource_To_v2_ContainerResourceMetricSource(in, out, s) } -func autoConvert_v2beta2_ContainerResourceMetricStatus_To_autoscaling_ContainerResourceMetricStatus(in *v2beta2.ContainerResourceMetricStatus, out *autoscaling.ContainerResourceMetricStatus, s conversion.Scope) error { +func autoConvert_v2_ContainerResourceMetricStatus_To_autoscaling_ContainerResourceMetricStatus(in *v2.ContainerResourceMetricStatus, out *autoscaling.ContainerResourceMetricStatus, s conversion.Scope) error { out.Name = core.ResourceName(in.Name) - if err := Convert_v2beta2_MetricValueStatus_To_autoscaling_MetricValueStatus(&in.Current, &out.Current, s); err != nil { + if err := Convert_v2_MetricValueStatus_To_autoscaling_MetricValueStatus(&in.Current, &out.Current, s); err != nil { return err } out.Container = in.Container return nil } -// Convert_v2beta2_ContainerResourceMetricStatus_To_autoscaling_ContainerResourceMetricStatus is an autogenerated conversion function. -func Convert_v2beta2_ContainerResourceMetricStatus_To_autoscaling_ContainerResourceMetricStatus(in *v2beta2.ContainerResourceMetricStatus, out *autoscaling.ContainerResourceMetricStatus, s conversion.Scope) error { - return autoConvert_v2beta2_ContainerResourceMetricStatus_To_autoscaling_ContainerResourceMetricStatus(in, out, s) +// Convert_v2_ContainerResourceMetricStatus_To_autoscaling_ContainerResourceMetricStatus is an autogenerated conversion function. +func Convert_v2_ContainerResourceMetricStatus_To_autoscaling_ContainerResourceMetricStatus(in *v2.ContainerResourceMetricStatus, out *autoscaling.ContainerResourceMetricStatus, s conversion.Scope) error { + return autoConvert_v2_ContainerResourceMetricStatus_To_autoscaling_ContainerResourceMetricStatus(in, out, s) } -func autoConvert_autoscaling_ContainerResourceMetricStatus_To_v2beta2_ContainerResourceMetricStatus(in *autoscaling.ContainerResourceMetricStatus, out *v2beta2.ContainerResourceMetricStatus, s conversion.Scope) error { +func autoConvert_autoscaling_ContainerResourceMetricStatus_To_v2_ContainerResourceMetricStatus(in *autoscaling.ContainerResourceMetricStatus, out *v2.ContainerResourceMetricStatus, s conversion.Scope) error { out.Name = v1.ResourceName(in.Name) out.Container = in.Container - if err := Convert_autoscaling_MetricValueStatus_To_v2beta2_MetricValueStatus(&in.Current, &out.Current, s); err != nil { + if err := Convert_autoscaling_MetricValueStatus_To_v2_MetricValueStatus(&in.Current, &out.Current, s); err != nil { return err } return nil } -// Convert_autoscaling_ContainerResourceMetricStatus_To_v2beta2_ContainerResourceMetricStatus is an autogenerated conversion function. -func Convert_autoscaling_ContainerResourceMetricStatus_To_v2beta2_ContainerResourceMetricStatus(in *autoscaling.ContainerResourceMetricStatus, out *v2beta2.ContainerResourceMetricStatus, s conversion.Scope) error { - return autoConvert_autoscaling_ContainerResourceMetricStatus_To_v2beta2_ContainerResourceMetricStatus(in, out, s) +// Convert_autoscaling_ContainerResourceMetricStatus_To_v2_ContainerResourceMetricStatus is an autogenerated conversion function. +func Convert_autoscaling_ContainerResourceMetricStatus_To_v2_ContainerResourceMetricStatus(in *autoscaling.ContainerResourceMetricStatus, out *v2.ContainerResourceMetricStatus, s conversion.Scope) error { + return autoConvert_autoscaling_ContainerResourceMetricStatus_To_v2_ContainerResourceMetricStatus(in, out, s) } -func autoConvert_v2beta2_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(in *v2beta2.CrossVersionObjectReference, out *autoscaling.CrossVersionObjectReference, s conversion.Scope) error { +func autoConvert_v2_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(in *v2.CrossVersionObjectReference, out *autoscaling.CrossVersionObjectReference, s conversion.Scope) error { out.Kind = in.Kind out.Name = in.Name out.APIVersion = in.APIVersion return nil } -// Convert_v2beta2_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference is an autogenerated conversion function. -func Convert_v2beta2_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(in *v2beta2.CrossVersionObjectReference, out *autoscaling.CrossVersionObjectReference, s conversion.Scope) error { - return autoConvert_v2beta2_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(in, out, s) +// Convert_v2_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference is an autogenerated conversion function. +func Convert_v2_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(in *v2.CrossVersionObjectReference, out *autoscaling.CrossVersionObjectReference, s conversion.Scope) error { + return autoConvert_v2_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(in, out, s) } -func autoConvert_autoscaling_CrossVersionObjectReference_To_v2beta2_CrossVersionObjectReference(in *autoscaling.CrossVersionObjectReference, out *v2beta2.CrossVersionObjectReference, s conversion.Scope) error { +func autoConvert_autoscaling_CrossVersionObjectReference_To_v2_CrossVersionObjectReference(in *autoscaling.CrossVersionObjectReference, out *v2.CrossVersionObjectReference, s conversion.Scope) error { out.Kind = in.Kind out.Name = in.Name out.APIVersion = in.APIVersion return nil } -// Convert_autoscaling_CrossVersionObjectReference_To_v2beta2_CrossVersionObjectReference is an autogenerated conversion function. -func Convert_autoscaling_CrossVersionObjectReference_To_v2beta2_CrossVersionObjectReference(in *autoscaling.CrossVersionObjectReference, out *v2beta2.CrossVersionObjectReference, s conversion.Scope) error { - return autoConvert_autoscaling_CrossVersionObjectReference_To_v2beta2_CrossVersionObjectReference(in, out, s) +// Convert_autoscaling_CrossVersionObjectReference_To_v2_CrossVersionObjectReference is an autogenerated conversion function. +func Convert_autoscaling_CrossVersionObjectReference_To_v2_CrossVersionObjectReference(in *autoscaling.CrossVersionObjectReference, out *v2.CrossVersionObjectReference, s conversion.Scope) error { + return autoConvert_autoscaling_CrossVersionObjectReference_To_v2_CrossVersionObjectReference(in, out, s) } -func autoConvert_v2beta2_ExternalMetricSource_To_autoscaling_ExternalMetricSource(in *v2beta2.ExternalMetricSource, out *autoscaling.ExternalMetricSource, s conversion.Scope) error { - if err := Convert_v2beta2_MetricIdentifier_To_autoscaling_MetricIdentifier(&in.Metric, &out.Metric, s); err != nil { +func autoConvert_v2_ExternalMetricSource_To_autoscaling_ExternalMetricSource(in *v2.ExternalMetricSource, out *autoscaling.ExternalMetricSource, s conversion.Scope) error { + if err := Convert_v2_MetricIdentifier_To_autoscaling_MetricIdentifier(&in.Metric, &out.Metric, s); err != nil { return err } - if err := Convert_v2beta2_MetricTarget_To_autoscaling_MetricTarget(&in.Target, &out.Target, s); err != nil { + if err := Convert_v2_MetricTarget_To_autoscaling_MetricTarget(&in.Target, &out.Target, s); err != nil { return err } return nil } -// Convert_v2beta2_ExternalMetricSource_To_autoscaling_ExternalMetricSource is an autogenerated conversion function. -func Convert_v2beta2_ExternalMetricSource_To_autoscaling_ExternalMetricSource(in *v2beta2.ExternalMetricSource, out *autoscaling.ExternalMetricSource, s conversion.Scope) error { - return autoConvert_v2beta2_ExternalMetricSource_To_autoscaling_ExternalMetricSource(in, out, s) +// Convert_v2_ExternalMetricSource_To_autoscaling_ExternalMetricSource is an autogenerated conversion function. +func Convert_v2_ExternalMetricSource_To_autoscaling_ExternalMetricSource(in *v2.ExternalMetricSource, out *autoscaling.ExternalMetricSource, s conversion.Scope) error { + return autoConvert_v2_ExternalMetricSource_To_autoscaling_ExternalMetricSource(in, out, s) } -func autoConvert_autoscaling_ExternalMetricSource_To_v2beta2_ExternalMetricSource(in *autoscaling.ExternalMetricSource, out *v2beta2.ExternalMetricSource, s conversion.Scope) error { - if err := Convert_autoscaling_MetricIdentifier_To_v2beta2_MetricIdentifier(&in.Metric, &out.Metric, s); err != nil { +func autoConvert_autoscaling_ExternalMetricSource_To_v2_ExternalMetricSource(in *autoscaling.ExternalMetricSource, out *v2.ExternalMetricSource, s conversion.Scope) error { + if err := Convert_autoscaling_MetricIdentifier_To_v2_MetricIdentifier(&in.Metric, &out.Metric, s); err != nil { return err } - if err := Convert_autoscaling_MetricTarget_To_v2beta2_MetricTarget(&in.Target, &out.Target, s); err != nil { + if err := Convert_autoscaling_MetricTarget_To_v2_MetricTarget(&in.Target, &out.Target, s); err != nil { return err } return nil } -// Convert_autoscaling_ExternalMetricSource_To_v2beta2_ExternalMetricSource is an autogenerated conversion function. -func Convert_autoscaling_ExternalMetricSource_To_v2beta2_ExternalMetricSource(in *autoscaling.ExternalMetricSource, out *v2beta2.ExternalMetricSource, s conversion.Scope) error { - return autoConvert_autoscaling_ExternalMetricSource_To_v2beta2_ExternalMetricSource(in, out, s) +// Convert_autoscaling_ExternalMetricSource_To_v2_ExternalMetricSource is an autogenerated conversion function. +func Convert_autoscaling_ExternalMetricSource_To_v2_ExternalMetricSource(in *autoscaling.ExternalMetricSource, out *v2.ExternalMetricSource, s conversion.Scope) error { + return autoConvert_autoscaling_ExternalMetricSource_To_v2_ExternalMetricSource(in, out, s) } -func autoConvert_v2beta2_ExternalMetricStatus_To_autoscaling_ExternalMetricStatus(in *v2beta2.ExternalMetricStatus, out *autoscaling.ExternalMetricStatus, s conversion.Scope) error { - if err := Convert_v2beta2_MetricIdentifier_To_autoscaling_MetricIdentifier(&in.Metric, &out.Metric, s); err != nil { +func autoConvert_v2_ExternalMetricStatus_To_autoscaling_ExternalMetricStatus(in *v2.ExternalMetricStatus, out *autoscaling.ExternalMetricStatus, s conversion.Scope) error { + if err := Convert_v2_MetricIdentifier_To_autoscaling_MetricIdentifier(&in.Metric, &out.Metric, s); err != nil { return err } - if err := Convert_v2beta2_MetricValueStatus_To_autoscaling_MetricValueStatus(&in.Current, &out.Current, s); err != nil { + if err := Convert_v2_MetricValueStatus_To_autoscaling_MetricValueStatus(&in.Current, &out.Current, s); err != nil { return err } return nil } -// Convert_v2beta2_ExternalMetricStatus_To_autoscaling_ExternalMetricStatus is an autogenerated conversion function. -func Convert_v2beta2_ExternalMetricStatus_To_autoscaling_ExternalMetricStatus(in *v2beta2.ExternalMetricStatus, out *autoscaling.ExternalMetricStatus, s conversion.Scope) error { - return autoConvert_v2beta2_ExternalMetricStatus_To_autoscaling_ExternalMetricStatus(in, out, s) +// Convert_v2_ExternalMetricStatus_To_autoscaling_ExternalMetricStatus is an autogenerated conversion function. +func Convert_v2_ExternalMetricStatus_To_autoscaling_ExternalMetricStatus(in *v2.ExternalMetricStatus, out *autoscaling.ExternalMetricStatus, s conversion.Scope) error { + return autoConvert_v2_ExternalMetricStatus_To_autoscaling_ExternalMetricStatus(in, out, s) } -func autoConvert_autoscaling_ExternalMetricStatus_To_v2beta2_ExternalMetricStatus(in *autoscaling.ExternalMetricStatus, out *v2beta2.ExternalMetricStatus, s conversion.Scope) error { - if err := Convert_autoscaling_MetricIdentifier_To_v2beta2_MetricIdentifier(&in.Metric, &out.Metric, s); err != nil { +func autoConvert_autoscaling_ExternalMetricStatus_To_v2_ExternalMetricStatus(in *autoscaling.ExternalMetricStatus, out *v2.ExternalMetricStatus, s conversion.Scope) error { + if err := Convert_autoscaling_MetricIdentifier_To_v2_MetricIdentifier(&in.Metric, &out.Metric, s); err != nil { return err } - if err := Convert_autoscaling_MetricValueStatus_To_v2beta2_MetricValueStatus(&in.Current, &out.Current, s); err != nil { + if err := Convert_autoscaling_MetricValueStatus_To_v2_MetricValueStatus(&in.Current, &out.Current, s); err != nil { return err } return nil } -// Convert_autoscaling_ExternalMetricStatus_To_v2beta2_ExternalMetricStatus is an autogenerated conversion function. -func Convert_autoscaling_ExternalMetricStatus_To_v2beta2_ExternalMetricStatus(in *autoscaling.ExternalMetricStatus, out *v2beta2.ExternalMetricStatus, s conversion.Scope) error { - return autoConvert_autoscaling_ExternalMetricStatus_To_v2beta2_ExternalMetricStatus(in, out, s) +// Convert_autoscaling_ExternalMetricStatus_To_v2_ExternalMetricStatus is an autogenerated conversion function. +func Convert_autoscaling_ExternalMetricStatus_To_v2_ExternalMetricStatus(in *autoscaling.ExternalMetricStatus, out *v2.ExternalMetricStatus, s conversion.Scope) error { + return autoConvert_autoscaling_ExternalMetricStatus_To_v2_ExternalMetricStatus(in, out, s) } -func autoConvert_v2beta2_HPAScalingPolicy_To_autoscaling_HPAScalingPolicy(in *v2beta2.HPAScalingPolicy, out *autoscaling.HPAScalingPolicy, s conversion.Scope) error { +func autoConvert_v2_HPAScalingPolicy_To_autoscaling_HPAScalingPolicy(in *v2.HPAScalingPolicy, out *autoscaling.HPAScalingPolicy, s conversion.Scope) error { out.Type = autoscaling.HPAScalingPolicyType(in.Type) out.Value = in.Value out.PeriodSeconds = in.PeriodSeconds return nil } -// Convert_v2beta2_HPAScalingPolicy_To_autoscaling_HPAScalingPolicy is an autogenerated conversion function. -func Convert_v2beta2_HPAScalingPolicy_To_autoscaling_HPAScalingPolicy(in *v2beta2.HPAScalingPolicy, out *autoscaling.HPAScalingPolicy, s conversion.Scope) error { - return autoConvert_v2beta2_HPAScalingPolicy_To_autoscaling_HPAScalingPolicy(in, out, s) +// Convert_v2_HPAScalingPolicy_To_autoscaling_HPAScalingPolicy is an autogenerated conversion function. +func Convert_v2_HPAScalingPolicy_To_autoscaling_HPAScalingPolicy(in *v2.HPAScalingPolicy, out *autoscaling.HPAScalingPolicy, s conversion.Scope) error { + return autoConvert_v2_HPAScalingPolicy_To_autoscaling_HPAScalingPolicy(in, out, s) } -func autoConvert_autoscaling_HPAScalingPolicy_To_v2beta2_HPAScalingPolicy(in *autoscaling.HPAScalingPolicy, out *v2beta2.HPAScalingPolicy, s conversion.Scope) error { - out.Type = v2beta2.HPAScalingPolicyType(in.Type) +func autoConvert_autoscaling_HPAScalingPolicy_To_v2_HPAScalingPolicy(in *autoscaling.HPAScalingPolicy, out *v2.HPAScalingPolicy, s conversion.Scope) error { + out.Type = v2.HPAScalingPolicyType(in.Type) out.Value = in.Value out.PeriodSeconds = in.PeriodSeconds return nil } -// Convert_autoscaling_HPAScalingPolicy_To_v2beta2_HPAScalingPolicy is an autogenerated conversion function. -func Convert_autoscaling_HPAScalingPolicy_To_v2beta2_HPAScalingPolicy(in *autoscaling.HPAScalingPolicy, out *v2beta2.HPAScalingPolicy, s conversion.Scope) error { - return autoConvert_autoscaling_HPAScalingPolicy_To_v2beta2_HPAScalingPolicy(in, out, s) +// Convert_autoscaling_HPAScalingPolicy_To_v2_HPAScalingPolicy is an autogenerated conversion function. +func Convert_autoscaling_HPAScalingPolicy_To_v2_HPAScalingPolicy(in *autoscaling.HPAScalingPolicy, out *v2.HPAScalingPolicy, s conversion.Scope) error { + return autoConvert_autoscaling_HPAScalingPolicy_To_v2_HPAScalingPolicy(in, out, s) } -func autoConvert_v2beta2_HPAScalingRules_To_autoscaling_HPAScalingRules(in *v2beta2.HPAScalingRules, out *autoscaling.HPAScalingRules, s conversion.Scope) error { +func autoConvert_v2_HPAScalingRules_To_autoscaling_HPAScalingRules(in *v2.HPAScalingRules, out *autoscaling.HPAScalingRules, s conversion.Scope) error { out.StabilizationWindowSeconds = (*int32)(unsafe.Pointer(in.StabilizationWindowSeconds)) out.SelectPolicy = (*autoscaling.ScalingPolicySelect)(unsafe.Pointer(in.SelectPolicy)) out.Policies = *(*[]autoscaling.HPAScalingPolicy)(unsafe.Pointer(&in.Policies)) return nil } -// Convert_v2beta2_HPAScalingRules_To_autoscaling_HPAScalingRules is an autogenerated conversion function. -func Convert_v2beta2_HPAScalingRules_To_autoscaling_HPAScalingRules(in *v2beta2.HPAScalingRules, out *autoscaling.HPAScalingRules, s conversion.Scope) error { - return autoConvert_v2beta2_HPAScalingRules_To_autoscaling_HPAScalingRules(in, out, s) +// Convert_v2_HPAScalingRules_To_autoscaling_HPAScalingRules is an autogenerated conversion function. +func Convert_v2_HPAScalingRules_To_autoscaling_HPAScalingRules(in *v2.HPAScalingRules, out *autoscaling.HPAScalingRules, s conversion.Scope) error { + return autoConvert_v2_HPAScalingRules_To_autoscaling_HPAScalingRules(in, out, s) } -func autoConvert_autoscaling_HPAScalingRules_To_v2beta2_HPAScalingRules(in *autoscaling.HPAScalingRules, out *v2beta2.HPAScalingRules, s conversion.Scope) error { +func autoConvert_autoscaling_HPAScalingRules_To_v2_HPAScalingRules(in *autoscaling.HPAScalingRules, out *v2.HPAScalingRules, s conversion.Scope) error { out.StabilizationWindowSeconds = (*int32)(unsafe.Pointer(in.StabilizationWindowSeconds)) - out.SelectPolicy = (*v2beta2.ScalingPolicySelect)(unsafe.Pointer(in.SelectPolicy)) - out.Policies = *(*[]v2beta2.HPAScalingPolicy)(unsafe.Pointer(&in.Policies)) + out.SelectPolicy = (*v2.ScalingPolicySelect)(unsafe.Pointer(in.SelectPolicy)) + out.Policies = *(*[]v2.HPAScalingPolicy)(unsafe.Pointer(&in.Policies)) return nil } -// Convert_autoscaling_HPAScalingRules_To_v2beta2_HPAScalingRules is an autogenerated conversion function. -func Convert_autoscaling_HPAScalingRules_To_v2beta2_HPAScalingRules(in *autoscaling.HPAScalingRules, out *v2beta2.HPAScalingRules, s conversion.Scope) error { - return autoConvert_autoscaling_HPAScalingRules_To_v2beta2_HPAScalingRules(in, out, s) +// Convert_autoscaling_HPAScalingRules_To_v2_HPAScalingRules is an autogenerated conversion function. +func Convert_autoscaling_HPAScalingRules_To_v2_HPAScalingRules(in *autoscaling.HPAScalingRules, out *v2.HPAScalingRules, s conversion.Scope) error { + return autoConvert_autoscaling_HPAScalingRules_To_v2_HPAScalingRules(in, out, s) } -func autoConvert_v2beta2_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler(in *v2beta2.HorizontalPodAutoscaler, out *autoscaling.HorizontalPodAutoscaler, s conversion.Scope) error { +func autoConvert_v2_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler(in *v2.HorizontalPodAutoscaler, out *autoscaling.HorizontalPodAutoscaler, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v2beta2_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_v2_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec(&in.Spec, &out.Spec, s); err != nil { return err } - if err := Convert_v2beta2_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus(&in.Status, &out.Status, s); err != nil { + if err := Convert_v2_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } -func autoConvert_autoscaling_HorizontalPodAutoscaler_To_v2beta2_HorizontalPodAutoscaler(in *autoscaling.HorizontalPodAutoscaler, out *v2beta2.HorizontalPodAutoscaler, s conversion.Scope) error { +func autoConvert_autoscaling_HorizontalPodAutoscaler_To_v2_HorizontalPodAutoscaler(in *autoscaling.HorizontalPodAutoscaler, out *v2.HorizontalPodAutoscaler, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_autoscaling_HorizontalPodAutoscalerSpec_To_v2beta2_HorizontalPodAutoscalerSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_autoscaling_HorizontalPodAutoscalerSpec_To_v2_HorizontalPodAutoscalerSpec(&in.Spec, &out.Spec, s); err != nil { return err } - if err := Convert_autoscaling_HorizontalPodAutoscalerStatus_To_v2beta2_HorizontalPodAutoscalerStatus(&in.Status, &out.Status, s); err != nil { + if err := Convert_autoscaling_HorizontalPodAutoscalerStatus_To_v2_HorizontalPodAutoscalerStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } -func autoConvert_v2beta2_HorizontalPodAutoscalerBehavior_To_autoscaling_HorizontalPodAutoscalerBehavior(in *v2beta2.HorizontalPodAutoscalerBehavior, out *autoscaling.HorizontalPodAutoscalerBehavior, s conversion.Scope) error { +func autoConvert_v2_HorizontalPodAutoscalerBehavior_To_autoscaling_HorizontalPodAutoscalerBehavior(in *v2.HorizontalPodAutoscalerBehavior, out *autoscaling.HorizontalPodAutoscalerBehavior, s conversion.Scope) error { out.ScaleUp = (*autoscaling.HPAScalingRules)(unsafe.Pointer(in.ScaleUp)) out.ScaleDown = (*autoscaling.HPAScalingRules)(unsafe.Pointer(in.ScaleDown)) return nil } -// Convert_v2beta2_HorizontalPodAutoscalerBehavior_To_autoscaling_HorizontalPodAutoscalerBehavior is an autogenerated conversion function. -func Convert_v2beta2_HorizontalPodAutoscalerBehavior_To_autoscaling_HorizontalPodAutoscalerBehavior(in *v2beta2.HorizontalPodAutoscalerBehavior, out *autoscaling.HorizontalPodAutoscalerBehavior, s conversion.Scope) error { - return autoConvert_v2beta2_HorizontalPodAutoscalerBehavior_To_autoscaling_HorizontalPodAutoscalerBehavior(in, out, s) +// Convert_v2_HorizontalPodAutoscalerBehavior_To_autoscaling_HorizontalPodAutoscalerBehavior is an autogenerated conversion function. +func Convert_v2_HorizontalPodAutoscalerBehavior_To_autoscaling_HorizontalPodAutoscalerBehavior(in *v2.HorizontalPodAutoscalerBehavior, out *autoscaling.HorizontalPodAutoscalerBehavior, s conversion.Scope) error { + return autoConvert_v2_HorizontalPodAutoscalerBehavior_To_autoscaling_HorizontalPodAutoscalerBehavior(in, out, s) } -func autoConvert_autoscaling_HorizontalPodAutoscalerBehavior_To_v2beta2_HorizontalPodAutoscalerBehavior(in *autoscaling.HorizontalPodAutoscalerBehavior, out *v2beta2.HorizontalPodAutoscalerBehavior, s conversion.Scope) error { - out.ScaleUp = (*v2beta2.HPAScalingRules)(unsafe.Pointer(in.ScaleUp)) - out.ScaleDown = (*v2beta2.HPAScalingRules)(unsafe.Pointer(in.ScaleDown)) +func autoConvert_autoscaling_HorizontalPodAutoscalerBehavior_To_v2_HorizontalPodAutoscalerBehavior(in *autoscaling.HorizontalPodAutoscalerBehavior, out *v2.HorizontalPodAutoscalerBehavior, s conversion.Scope) error { + out.ScaleUp = (*v2.HPAScalingRules)(unsafe.Pointer(in.ScaleUp)) + out.ScaleDown = (*v2.HPAScalingRules)(unsafe.Pointer(in.ScaleDown)) return nil } -// Convert_autoscaling_HorizontalPodAutoscalerBehavior_To_v2beta2_HorizontalPodAutoscalerBehavior is an autogenerated conversion function. -func Convert_autoscaling_HorizontalPodAutoscalerBehavior_To_v2beta2_HorizontalPodAutoscalerBehavior(in *autoscaling.HorizontalPodAutoscalerBehavior, out *v2beta2.HorizontalPodAutoscalerBehavior, s conversion.Scope) error { - return autoConvert_autoscaling_HorizontalPodAutoscalerBehavior_To_v2beta2_HorizontalPodAutoscalerBehavior(in, out, s) +// Convert_autoscaling_HorizontalPodAutoscalerBehavior_To_v2_HorizontalPodAutoscalerBehavior is an autogenerated conversion function. +func Convert_autoscaling_HorizontalPodAutoscalerBehavior_To_v2_HorizontalPodAutoscalerBehavior(in *autoscaling.HorizontalPodAutoscalerBehavior, out *v2.HorizontalPodAutoscalerBehavior, s conversion.Scope) error { + return autoConvert_autoscaling_HorizontalPodAutoscalerBehavior_To_v2_HorizontalPodAutoscalerBehavior(in, out, s) } -func autoConvert_v2beta2_HorizontalPodAutoscalerCondition_To_autoscaling_HorizontalPodAutoscalerCondition(in *v2beta2.HorizontalPodAutoscalerCondition, out *autoscaling.HorizontalPodAutoscalerCondition, s conversion.Scope) error { +func autoConvert_v2_HorizontalPodAutoscalerCondition_To_autoscaling_HorizontalPodAutoscalerCondition(in *v2.HorizontalPodAutoscalerCondition, out *autoscaling.HorizontalPodAutoscalerCondition, s conversion.Scope) error { out.Type = autoscaling.HorizontalPodAutoscalerConditionType(in.Type) out.Status = autoscaling.ConditionStatus(in.Status) out.LastTransitionTime = in.LastTransitionTime @@ -524,13 +525,13 @@ func autoConvert_v2beta2_HorizontalPodAutoscalerCondition_To_autoscaling_Horizon return nil } -// Convert_v2beta2_HorizontalPodAutoscalerCondition_To_autoscaling_HorizontalPodAutoscalerCondition is an autogenerated conversion function. -func Convert_v2beta2_HorizontalPodAutoscalerCondition_To_autoscaling_HorizontalPodAutoscalerCondition(in *v2beta2.HorizontalPodAutoscalerCondition, out *autoscaling.HorizontalPodAutoscalerCondition, s conversion.Scope) error { - return autoConvert_v2beta2_HorizontalPodAutoscalerCondition_To_autoscaling_HorizontalPodAutoscalerCondition(in, out, s) +// Convert_v2_HorizontalPodAutoscalerCondition_To_autoscaling_HorizontalPodAutoscalerCondition is an autogenerated conversion function. +func Convert_v2_HorizontalPodAutoscalerCondition_To_autoscaling_HorizontalPodAutoscalerCondition(in *v2.HorizontalPodAutoscalerCondition, out *autoscaling.HorizontalPodAutoscalerCondition, s conversion.Scope) error { + return autoConvert_v2_HorizontalPodAutoscalerCondition_To_autoscaling_HorizontalPodAutoscalerCondition(in, out, s) } -func autoConvert_autoscaling_HorizontalPodAutoscalerCondition_To_v2beta2_HorizontalPodAutoscalerCondition(in *autoscaling.HorizontalPodAutoscalerCondition, out *v2beta2.HorizontalPodAutoscalerCondition, s conversion.Scope) error { - out.Type = v2beta2.HorizontalPodAutoscalerConditionType(in.Type) +func autoConvert_autoscaling_HorizontalPodAutoscalerCondition_To_v2_HorizontalPodAutoscalerCondition(in *autoscaling.HorizontalPodAutoscalerCondition, out *v2.HorizontalPodAutoscalerCondition, s conversion.Scope) error { + out.Type = v2.HorizontalPodAutoscalerConditionType(in.Type) out.Status = v1.ConditionStatus(in.Status) out.LastTransitionTime = in.LastTransitionTime out.Reason = in.Reason @@ -538,18 +539,18 @@ func autoConvert_autoscaling_HorizontalPodAutoscalerCondition_To_v2beta2_Horizon return nil } -// Convert_autoscaling_HorizontalPodAutoscalerCondition_To_v2beta2_HorizontalPodAutoscalerCondition is an autogenerated conversion function. -func Convert_autoscaling_HorizontalPodAutoscalerCondition_To_v2beta2_HorizontalPodAutoscalerCondition(in *autoscaling.HorizontalPodAutoscalerCondition, out *v2beta2.HorizontalPodAutoscalerCondition, s conversion.Scope) error { - return autoConvert_autoscaling_HorizontalPodAutoscalerCondition_To_v2beta2_HorizontalPodAutoscalerCondition(in, out, s) +// Convert_autoscaling_HorizontalPodAutoscalerCondition_To_v2_HorizontalPodAutoscalerCondition is an autogenerated conversion function. +func Convert_autoscaling_HorizontalPodAutoscalerCondition_To_v2_HorizontalPodAutoscalerCondition(in *autoscaling.HorizontalPodAutoscalerCondition, out *v2.HorizontalPodAutoscalerCondition, s conversion.Scope) error { + return autoConvert_autoscaling_HorizontalPodAutoscalerCondition_To_v2_HorizontalPodAutoscalerCondition(in, out, s) } -func autoConvert_v2beta2_HorizontalPodAutoscalerList_To_autoscaling_HorizontalPodAutoscalerList(in *v2beta2.HorizontalPodAutoscalerList, out *autoscaling.HorizontalPodAutoscalerList, s conversion.Scope) error { +func autoConvert_v2_HorizontalPodAutoscalerList_To_autoscaling_HorizontalPodAutoscalerList(in *v2.HorizontalPodAutoscalerList, out *autoscaling.HorizontalPodAutoscalerList, s conversion.Scope) error { out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]autoscaling.HorizontalPodAutoscaler, len(*in)) for i := range *in { - if err := Convert_v2beta2_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler(&(*in)[i], &(*out)[i], s); err != nil { + if err := Convert_v2_HorizontalPodAutoscaler_To_autoscaling_HorizontalPodAutoscaler(&(*in)[i], &(*out)[i], s); err != nil { return err } } @@ -559,18 +560,18 @@ func autoConvert_v2beta2_HorizontalPodAutoscalerList_To_autoscaling_HorizontalPo return nil } -// Convert_v2beta2_HorizontalPodAutoscalerList_To_autoscaling_HorizontalPodAutoscalerList is an autogenerated conversion function. -func Convert_v2beta2_HorizontalPodAutoscalerList_To_autoscaling_HorizontalPodAutoscalerList(in *v2beta2.HorizontalPodAutoscalerList, out *autoscaling.HorizontalPodAutoscalerList, s conversion.Scope) error { - return autoConvert_v2beta2_HorizontalPodAutoscalerList_To_autoscaling_HorizontalPodAutoscalerList(in, out, s) +// Convert_v2_HorizontalPodAutoscalerList_To_autoscaling_HorizontalPodAutoscalerList is an autogenerated conversion function. +func Convert_v2_HorizontalPodAutoscalerList_To_autoscaling_HorizontalPodAutoscalerList(in *v2.HorizontalPodAutoscalerList, out *autoscaling.HorizontalPodAutoscalerList, s conversion.Scope) error { + return autoConvert_v2_HorizontalPodAutoscalerList_To_autoscaling_HorizontalPodAutoscalerList(in, out, s) } -func autoConvert_autoscaling_HorizontalPodAutoscalerList_To_v2beta2_HorizontalPodAutoscalerList(in *autoscaling.HorizontalPodAutoscalerList, out *v2beta2.HorizontalPodAutoscalerList, s conversion.Scope) error { +func autoConvert_autoscaling_HorizontalPodAutoscalerList_To_v2_HorizontalPodAutoscalerList(in *autoscaling.HorizontalPodAutoscalerList, out *v2.HorizontalPodAutoscalerList, s conversion.Scope) error { out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]v2beta2.HorizontalPodAutoscaler, len(*in)) + *out = make([]v2.HorizontalPodAutoscaler, len(*in)) for i := range *in { - if err := Convert_autoscaling_HorizontalPodAutoscaler_To_v2beta2_HorizontalPodAutoscaler(&(*in)[i], &(*out)[i], s); err != nil { + if err := Convert_autoscaling_HorizontalPodAutoscaler_To_v2_HorizontalPodAutoscaler(&(*in)[i], &(*out)[i], s); err != nil { return err } } @@ -580,13 +581,13 @@ func autoConvert_autoscaling_HorizontalPodAutoscalerList_To_v2beta2_HorizontalPo return nil } -// Convert_autoscaling_HorizontalPodAutoscalerList_To_v2beta2_HorizontalPodAutoscalerList is an autogenerated conversion function. -func Convert_autoscaling_HorizontalPodAutoscalerList_To_v2beta2_HorizontalPodAutoscalerList(in *autoscaling.HorizontalPodAutoscalerList, out *v2beta2.HorizontalPodAutoscalerList, s conversion.Scope) error { - return autoConvert_autoscaling_HorizontalPodAutoscalerList_To_v2beta2_HorizontalPodAutoscalerList(in, out, s) +// Convert_autoscaling_HorizontalPodAutoscalerList_To_v2_HorizontalPodAutoscalerList is an autogenerated conversion function. +func Convert_autoscaling_HorizontalPodAutoscalerList_To_v2_HorizontalPodAutoscalerList(in *autoscaling.HorizontalPodAutoscalerList, out *v2.HorizontalPodAutoscalerList, s conversion.Scope) error { + return autoConvert_autoscaling_HorizontalPodAutoscalerList_To_v2_HorizontalPodAutoscalerList(in, out, s) } -func autoConvert_v2beta2_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec(in *v2beta2.HorizontalPodAutoscalerSpec, out *autoscaling.HorizontalPodAutoscalerSpec, s conversion.Scope) error { - if err := Convert_v2beta2_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(&in.ScaleTargetRef, &out.ScaleTargetRef, s); err != nil { +func autoConvert_v2_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec(in *v2.HorizontalPodAutoscalerSpec, out *autoscaling.HorizontalPodAutoscalerSpec, s conversion.Scope) error { + if err := Convert_v2_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(&in.ScaleTargetRef, &out.ScaleTargetRef, s); err != nil { return err } out.MinReplicas = (*int32)(unsafe.Pointer(in.MinReplicas)) @@ -595,7 +596,7 @@ func autoConvert_v2beta2_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPo in, out := &in.Metrics, &out.Metrics *out = make([]autoscaling.MetricSpec, len(*in)) for i := range *in { - if err := Convert_v2beta2_MetricSpec_To_autoscaling_MetricSpec(&(*in)[i], &(*out)[i], s); err != nil { + if err := Convert_v2_MetricSpec_To_autoscaling_MetricSpec(&(*in)[i], &(*out)[i], s); err != nil { return err } } @@ -606,38 +607,38 @@ func autoConvert_v2beta2_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPo return nil } -// Convert_v2beta2_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec is an autogenerated conversion function. -func Convert_v2beta2_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec(in *v2beta2.HorizontalPodAutoscalerSpec, out *autoscaling.HorizontalPodAutoscalerSpec, s conversion.Scope) error { - return autoConvert_v2beta2_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec(in, out, s) +// Convert_v2_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec is an autogenerated conversion function. +func Convert_v2_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec(in *v2.HorizontalPodAutoscalerSpec, out *autoscaling.HorizontalPodAutoscalerSpec, s conversion.Scope) error { + return autoConvert_v2_HorizontalPodAutoscalerSpec_To_autoscaling_HorizontalPodAutoscalerSpec(in, out, s) } -func autoConvert_autoscaling_HorizontalPodAutoscalerSpec_To_v2beta2_HorizontalPodAutoscalerSpec(in *autoscaling.HorizontalPodAutoscalerSpec, out *v2beta2.HorizontalPodAutoscalerSpec, s conversion.Scope) error { - if err := Convert_autoscaling_CrossVersionObjectReference_To_v2beta2_CrossVersionObjectReference(&in.ScaleTargetRef, &out.ScaleTargetRef, s); err != nil { +func autoConvert_autoscaling_HorizontalPodAutoscalerSpec_To_v2_HorizontalPodAutoscalerSpec(in *autoscaling.HorizontalPodAutoscalerSpec, out *v2.HorizontalPodAutoscalerSpec, s conversion.Scope) error { + if err := Convert_autoscaling_CrossVersionObjectReference_To_v2_CrossVersionObjectReference(&in.ScaleTargetRef, &out.ScaleTargetRef, s); err != nil { return err } out.MinReplicas = (*int32)(unsafe.Pointer(in.MinReplicas)) out.MaxReplicas = in.MaxReplicas if in.Metrics != nil { in, out := &in.Metrics, &out.Metrics - *out = make([]v2beta2.MetricSpec, len(*in)) + *out = make([]v2.MetricSpec, len(*in)) for i := range *in { - if err := Convert_autoscaling_MetricSpec_To_v2beta2_MetricSpec(&(*in)[i], &(*out)[i], s); err != nil { + if err := Convert_autoscaling_MetricSpec_To_v2_MetricSpec(&(*in)[i], &(*out)[i], s); err != nil { return err } } } else { out.Metrics = nil } - out.Behavior = (*v2beta2.HorizontalPodAutoscalerBehavior)(unsafe.Pointer(in.Behavior)) + out.Behavior = (*v2.HorizontalPodAutoscalerBehavior)(unsafe.Pointer(in.Behavior)) return nil } -// Convert_autoscaling_HorizontalPodAutoscalerSpec_To_v2beta2_HorizontalPodAutoscalerSpec is an autogenerated conversion function. -func Convert_autoscaling_HorizontalPodAutoscalerSpec_To_v2beta2_HorizontalPodAutoscalerSpec(in *autoscaling.HorizontalPodAutoscalerSpec, out *v2beta2.HorizontalPodAutoscalerSpec, s conversion.Scope) error { - return autoConvert_autoscaling_HorizontalPodAutoscalerSpec_To_v2beta2_HorizontalPodAutoscalerSpec(in, out, s) +// Convert_autoscaling_HorizontalPodAutoscalerSpec_To_v2_HorizontalPodAutoscalerSpec is an autogenerated conversion function. +func Convert_autoscaling_HorizontalPodAutoscalerSpec_To_v2_HorizontalPodAutoscalerSpec(in *autoscaling.HorizontalPodAutoscalerSpec, out *v2.HorizontalPodAutoscalerSpec, s conversion.Scope) error { + return autoConvert_autoscaling_HorizontalPodAutoscalerSpec_To_v2_HorizontalPodAutoscalerSpec(in, out, s) } -func autoConvert_v2beta2_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus(in *v2beta2.HorizontalPodAutoscalerStatus, out *autoscaling.HorizontalPodAutoscalerStatus, s conversion.Scope) error { +func autoConvert_v2_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus(in *v2.HorizontalPodAutoscalerStatus, out *autoscaling.HorizontalPodAutoscalerStatus, s conversion.Scope) error { out.ObservedGeneration = (*int64)(unsafe.Pointer(in.ObservedGeneration)) out.LastScaleTime = (*metav1.Time)(unsafe.Pointer(in.LastScaleTime)) out.CurrentReplicas = in.CurrentReplicas @@ -646,7 +647,7 @@ func autoConvert_v2beta2_HorizontalPodAutoscalerStatus_To_autoscaling_Horizontal in, out := &in.CurrentMetrics, &out.CurrentMetrics *out = make([]autoscaling.MetricStatus, len(*in)) for i := range *in { - if err := Convert_v2beta2_MetricStatus_To_autoscaling_MetricStatus(&(*in)[i], &(*out)[i], s); err != nil { + if err := Convert_v2_MetricStatus_To_autoscaling_MetricStatus(&(*in)[i], &(*out)[i], s); err != nil { return err } } @@ -657,59 +658,59 @@ func autoConvert_v2beta2_HorizontalPodAutoscalerStatus_To_autoscaling_Horizontal return nil } -// Convert_v2beta2_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus is an autogenerated conversion function. -func Convert_v2beta2_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus(in *v2beta2.HorizontalPodAutoscalerStatus, out *autoscaling.HorizontalPodAutoscalerStatus, s conversion.Scope) error { - return autoConvert_v2beta2_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus(in, out, s) +// Convert_v2_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus is an autogenerated conversion function. +func Convert_v2_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus(in *v2.HorizontalPodAutoscalerStatus, out *autoscaling.HorizontalPodAutoscalerStatus, s conversion.Scope) error { + return autoConvert_v2_HorizontalPodAutoscalerStatus_To_autoscaling_HorizontalPodAutoscalerStatus(in, out, s) } -func autoConvert_autoscaling_HorizontalPodAutoscalerStatus_To_v2beta2_HorizontalPodAutoscalerStatus(in *autoscaling.HorizontalPodAutoscalerStatus, out *v2beta2.HorizontalPodAutoscalerStatus, s conversion.Scope) error { +func autoConvert_autoscaling_HorizontalPodAutoscalerStatus_To_v2_HorizontalPodAutoscalerStatus(in *autoscaling.HorizontalPodAutoscalerStatus, out *v2.HorizontalPodAutoscalerStatus, s conversion.Scope) error { out.ObservedGeneration = (*int64)(unsafe.Pointer(in.ObservedGeneration)) out.LastScaleTime = (*metav1.Time)(unsafe.Pointer(in.LastScaleTime)) out.CurrentReplicas = in.CurrentReplicas out.DesiredReplicas = in.DesiredReplicas if in.CurrentMetrics != nil { in, out := &in.CurrentMetrics, &out.CurrentMetrics - *out = make([]v2beta2.MetricStatus, len(*in)) + *out = make([]v2.MetricStatus, len(*in)) for i := range *in { - if err := Convert_autoscaling_MetricStatus_To_v2beta2_MetricStatus(&(*in)[i], &(*out)[i], s); err != nil { + if err := Convert_autoscaling_MetricStatus_To_v2_MetricStatus(&(*in)[i], &(*out)[i], s); err != nil { return err } } } else { out.CurrentMetrics = nil } - out.Conditions = *(*[]v2beta2.HorizontalPodAutoscalerCondition)(unsafe.Pointer(&in.Conditions)) + out.Conditions = *(*[]v2.HorizontalPodAutoscalerCondition)(unsafe.Pointer(&in.Conditions)) return nil } -// Convert_autoscaling_HorizontalPodAutoscalerStatus_To_v2beta2_HorizontalPodAutoscalerStatus is an autogenerated conversion function. -func Convert_autoscaling_HorizontalPodAutoscalerStatus_To_v2beta2_HorizontalPodAutoscalerStatus(in *autoscaling.HorizontalPodAutoscalerStatus, out *v2beta2.HorizontalPodAutoscalerStatus, s conversion.Scope) error { - return autoConvert_autoscaling_HorizontalPodAutoscalerStatus_To_v2beta2_HorizontalPodAutoscalerStatus(in, out, s) +// Convert_autoscaling_HorizontalPodAutoscalerStatus_To_v2_HorizontalPodAutoscalerStatus is an autogenerated conversion function. +func Convert_autoscaling_HorizontalPodAutoscalerStatus_To_v2_HorizontalPodAutoscalerStatus(in *autoscaling.HorizontalPodAutoscalerStatus, out *v2.HorizontalPodAutoscalerStatus, s conversion.Scope) error { + return autoConvert_autoscaling_HorizontalPodAutoscalerStatus_To_v2_HorizontalPodAutoscalerStatus(in, out, s) } -func autoConvert_v2beta2_MetricIdentifier_To_autoscaling_MetricIdentifier(in *v2beta2.MetricIdentifier, out *autoscaling.MetricIdentifier, s conversion.Scope) error { +func autoConvert_v2_MetricIdentifier_To_autoscaling_MetricIdentifier(in *v2.MetricIdentifier, out *autoscaling.MetricIdentifier, s conversion.Scope) error { out.Name = in.Name out.Selector = (*metav1.LabelSelector)(unsafe.Pointer(in.Selector)) return nil } -// Convert_v2beta2_MetricIdentifier_To_autoscaling_MetricIdentifier is an autogenerated conversion function. -func Convert_v2beta2_MetricIdentifier_To_autoscaling_MetricIdentifier(in *v2beta2.MetricIdentifier, out *autoscaling.MetricIdentifier, s conversion.Scope) error { - return autoConvert_v2beta2_MetricIdentifier_To_autoscaling_MetricIdentifier(in, out, s) +// Convert_v2_MetricIdentifier_To_autoscaling_MetricIdentifier is an autogenerated conversion function. +func Convert_v2_MetricIdentifier_To_autoscaling_MetricIdentifier(in *v2.MetricIdentifier, out *autoscaling.MetricIdentifier, s conversion.Scope) error { + return autoConvert_v2_MetricIdentifier_To_autoscaling_MetricIdentifier(in, out, s) } -func autoConvert_autoscaling_MetricIdentifier_To_v2beta2_MetricIdentifier(in *autoscaling.MetricIdentifier, out *v2beta2.MetricIdentifier, s conversion.Scope) error { +func autoConvert_autoscaling_MetricIdentifier_To_v2_MetricIdentifier(in *autoscaling.MetricIdentifier, out *v2.MetricIdentifier, s conversion.Scope) error { out.Name = in.Name out.Selector = (*metav1.LabelSelector)(unsafe.Pointer(in.Selector)) return nil } -// Convert_autoscaling_MetricIdentifier_To_v2beta2_MetricIdentifier is an autogenerated conversion function. -func Convert_autoscaling_MetricIdentifier_To_v2beta2_MetricIdentifier(in *autoscaling.MetricIdentifier, out *v2beta2.MetricIdentifier, s conversion.Scope) error { - return autoConvert_autoscaling_MetricIdentifier_To_v2beta2_MetricIdentifier(in, out, s) +// Convert_autoscaling_MetricIdentifier_To_v2_MetricIdentifier is an autogenerated conversion function. +func Convert_autoscaling_MetricIdentifier_To_v2_MetricIdentifier(in *autoscaling.MetricIdentifier, out *v2.MetricIdentifier, s conversion.Scope) error { + return autoConvert_autoscaling_MetricIdentifier_To_v2_MetricIdentifier(in, out, s) } -func autoConvert_v2beta2_MetricSpec_To_autoscaling_MetricSpec(in *v2beta2.MetricSpec, out *autoscaling.MetricSpec, s conversion.Scope) error { +func autoConvert_v2_MetricSpec_To_autoscaling_MetricSpec(in *v2.MetricSpec, out *autoscaling.MetricSpec, s conversion.Scope) error { out.Type = autoscaling.MetricSourceType(in.Type) out.Object = (*autoscaling.ObjectMetricSource)(unsafe.Pointer(in.Object)) out.Pods = (*autoscaling.PodsMetricSource)(unsafe.Pointer(in.Pods)) @@ -717,7 +718,7 @@ func autoConvert_v2beta2_MetricSpec_To_autoscaling_MetricSpec(in *v2beta2.Metric if in.ContainerResource != nil { in, out := &in.ContainerResource, &out.ContainerResource *out = new(autoscaling.ContainerResourceMetricSource) - if err := Convert_v2beta2_ContainerResourceMetricSource_To_autoscaling_ContainerResourceMetricSource(*in, *out, s); err != nil { + if err := Convert_v2_ContainerResourceMetricSource_To_autoscaling_ContainerResourceMetricSource(*in, *out, s); err != nil { return err } } else { @@ -727,35 +728,35 @@ func autoConvert_v2beta2_MetricSpec_To_autoscaling_MetricSpec(in *v2beta2.Metric return nil } -// Convert_v2beta2_MetricSpec_To_autoscaling_MetricSpec is an autogenerated conversion function. -func Convert_v2beta2_MetricSpec_To_autoscaling_MetricSpec(in *v2beta2.MetricSpec, out *autoscaling.MetricSpec, s conversion.Scope) error { - return autoConvert_v2beta2_MetricSpec_To_autoscaling_MetricSpec(in, out, s) +// Convert_v2_MetricSpec_To_autoscaling_MetricSpec is an autogenerated conversion function. +func Convert_v2_MetricSpec_To_autoscaling_MetricSpec(in *v2.MetricSpec, out *autoscaling.MetricSpec, s conversion.Scope) error { + return autoConvert_v2_MetricSpec_To_autoscaling_MetricSpec(in, out, s) } -func autoConvert_autoscaling_MetricSpec_To_v2beta2_MetricSpec(in *autoscaling.MetricSpec, out *v2beta2.MetricSpec, s conversion.Scope) error { - out.Type = v2beta2.MetricSourceType(in.Type) - out.Object = (*v2beta2.ObjectMetricSource)(unsafe.Pointer(in.Object)) - out.Pods = (*v2beta2.PodsMetricSource)(unsafe.Pointer(in.Pods)) - out.Resource = (*v2beta2.ResourceMetricSource)(unsafe.Pointer(in.Resource)) +func autoConvert_autoscaling_MetricSpec_To_v2_MetricSpec(in *autoscaling.MetricSpec, out *v2.MetricSpec, s conversion.Scope) error { + out.Type = v2.MetricSourceType(in.Type) + out.Object = (*v2.ObjectMetricSource)(unsafe.Pointer(in.Object)) + out.Pods = (*v2.PodsMetricSource)(unsafe.Pointer(in.Pods)) + out.Resource = (*v2.ResourceMetricSource)(unsafe.Pointer(in.Resource)) if in.ContainerResource != nil { in, out := &in.ContainerResource, &out.ContainerResource - *out = new(v2beta2.ContainerResourceMetricSource) - if err := Convert_autoscaling_ContainerResourceMetricSource_To_v2beta2_ContainerResourceMetricSource(*in, *out, s); err != nil { + *out = new(v2.ContainerResourceMetricSource) + if err := Convert_autoscaling_ContainerResourceMetricSource_To_v2_ContainerResourceMetricSource(*in, *out, s); err != nil { return err } } else { out.ContainerResource = nil } - out.External = (*v2beta2.ExternalMetricSource)(unsafe.Pointer(in.External)) + out.External = (*v2.ExternalMetricSource)(unsafe.Pointer(in.External)) return nil } -// Convert_autoscaling_MetricSpec_To_v2beta2_MetricSpec is an autogenerated conversion function. -func Convert_autoscaling_MetricSpec_To_v2beta2_MetricSpec(in *autoscaling.MetricSpec, out *v2beta2.MetricSpec, s conversion.Scope) error { - return autoConvert_autoscaling_MetricSpec_To_v2beta2_MetricSpec(in, out, s) +// Convert_autoscaling_MetricSpec_To_v2_MetricSpec is an autogenerated conversion function. +func Convert_autoscaling_MetricSpec_To_v2_MetricSpec(in *autoscaling.MetricSpec, out *v2.MetricSpec, s conversion.Scope) error { + return autoConvert_autoscaling_MetricSpec_To_v2_MetricSpec(in, out, s) } -func autoConvert_v2beta2_MetricStatus_To_autoscaling_MetricStatus(in *v2beta2.MetricStatus, out *autoscaling.MetricStatus, s conversion.Scope) error { +func autoConvert_v2_MetricStatus_To_autoscaling_MetricStatus(in *v2.MetricStatus, out *autoscaling.MetricStatus, s conversion.Scope) error { out.Type = autoscaling.MetricSourceType(in.Type) out.Object = (*autoscaling.ObjectMetricStatus)(unsafe.Pointer(in.Object)) out.Pods = (*autoscaling.PodsMetricStatus)(unsafe.Pointer(in.Pods)) @@ -763,7 +764,7 @@ func autoConvert_v2beta2_MetricStatus_To_autoscaling_MetricStatus(in *v2beta2.Me if in.ContainerResource != nil { in, out := &in.ContainerResource, &out.ContainerResource *out = new(autoscaling.ContainerResourceMetricStatus) - if err := Convert_v2beta2_ContainerResourceMetricStatus_To_autoscaling_ContainerResourceMetricStatus(*in, *out, s); err != nil { + if err := Convert_v2_ContainerResourceMetricStatus_To_autoscaling_ContainerResourceMetricStatus(*in, *out, s); err != nil { return err } } else { @@ -773,35 +774,35 @@ func autoConvert_v2beta2_MetricStatus_To_autoscaling_MetricStatus(in *v2beta2.Me return nil } -// Convert_v2beta2_MetricStatus_To_autoscaling_MetricStatus is an autogenerated conversion function. -func Convert_v2beta2_MetricStatus_To_autoscaling_MetricStatus(in *v2beta2.MetricStatus, out *autoscaling.MetricStatus, s conversion.Scope) error { - return autoConvert_v2beta2_MetricStatus_To_autoscaling_MetricStatus(in, out, s) +// Convert_v2_MetricStatus_To_autoscaling_MetricStatus is an autogenerated conversion function. +func Convert_v2_MetricStatus_To_autoscaling_MetricStatus(in *v2.MetricStatus, out *autoscaling.MetricStatus, s conversion.Scope) error { + return autoConvert_v2_MetricStatus_To_autoscaling_MetricStatus(in, out, s) } -func autoConvert_autoscaling_MetricStatus_To_v2beta2_MetricStatus(in *autoscaling.MetricStatus, out *v2beta2.MetricStatus, s conversion.Scope) error { - out.Type = v2beta2.MetricSourceType(in.Type) - out.Object = (*v2beta2.ObjectMetricStatus)(unsafe.Pointer(in.Object)) - out.Pods = (*v2beta2.PodsMetricStatus)(unsafe.Pointer(in.Pods)) - out.Resource = (*v2beta2.ResourceMetricStatus)(unsafe.Pointer(in.Resource)) +func autoConvert_autoscaling_MetricStatus_To_v2_MetricStatus(in *autoscaling.MetricStatus, out *v2.MetricStatus, s conversion.Scope) error { + out.Type = v2.MetricSourceType(in.Type) + out.Object = (*v2.ObjectMetricStatus)(unsafe.Pointer(in.Object)) + out.Pods = (*v2.PodsMetricStatus)(unsafe.Pointer(in.Pods)) + out.Resource = (*v2.ResourceMetricStatus)(unsafe.Pointer(in.Resource)) if in.ContainerResource != nil { in, out := &in.ContainerResource, &out.ContainerResource - *out = new(v2beta2.ContainerResourceMetricStatus) - if err := Convert_autoscaling_ContainerResourceMetricStatus_To_v2beta2_ContainerResourceMetricStatus(*in, *out, s); err != nil { + *out = new(v2.ContainerResourceMetricStatus) + if err := Convert_autoscaling_ContainerResourceMetricStatus_To_v2_ContainerResourceMetricStatus(*in, *out, s); err != nil { return err } } else { out.ContainerResource = nil } - out.External = (*v2beta2.ExternalMetricStatus)(unsafe.Pointer(in.External)) + out.External = (*v2.ExternalMetricStatus)(unsafe.Pointer(in.External)) return nil } -// Convert_autoscaling_MetricStatus_To_v2beta2_MetricStatus is an autogenerated conversion function. -func Convert_autoscaling_MetricStatus_To_v2beta2_MetricStatus(in *autoscaling.MetricStatus, out *v2beta2.MetricStatus, s conversion.Scope) error { - return autoConvert_autoscaling_MetricStatus_To_v2beta2_MetricStatus(in, out, s) +// Convert_autoscaling_MetricStatus_To_v2_MetricStatus is an autogenerated conversion function. +func Convert_autoscaling_MetricStatus_To_v2_MetricStatus(in *autoscaling.MetricStatus, out *v2.MetricStatus, s conversion.Scope) error { + return autoConvert_autoscaling_MetricStatus_To_v2_MetricStatus(in, out, s) } -func autoConvert_v2beta2_MetricTarget_To_autoscaling_MetricTarget(in *v2beta2.MetricTarget, out *autoscaling.MetricTarget, s conversion.Scope) error { +func autoConvert_v2_MetricTarget_To_autoscaling_MetricTarget(in *v2.MetricTarget, out *autoscaling.MetricTarget, s conversion.Scope) error { out.Type = autoscaling.MetricTargetType(in.Type) out.Value = (*resource.Quantity)(unsafe.Pointer(in.Value)) out.AverageValue = (*resource.Quantity)(unsafe.Pointer(in.AverageValue)) @@ -809,228 +810,228 @@ func autoConvert_v2beta2_MetricTarget_To_autoscaling_MetricTarget(in *v2beta2.Me return nil } -// Convert_v2beta2_MetricTarget_To_autoscaling_MetricTarget is an autogenerated conversion function. -func Convert_v2beta2_MetricTarget_To_autoscaling_MetricTarget(in *v2beta2.MetricTarget, out *autoscaling.MetricTarget, s conversion.Scope) error { - return autoConvert_v2beta2_MetricTarget_To_autoscaling_MetricTarget(in, out, s) +// Convert_v2_MetricTarget_To_autoscaling_MetricTarget is an autogenerated conversion function. +func Convert_v2_MetricTarget_To_autoscaling_MetricTarget(in *v2.MetricTarget, out *autoscaling.MetricTarget, s conversion.Scope) error { + return autoConvert_v2_MetricTarget_To_autoscaling_MetricTarget(in, out, s) } -func autoConvert_autoscaling_MetricTarget_To_v2beta2_MetricTarget(in *autoscaling.MetricTarget, out *v2beta2.MetricTarget, s conversion.Scope) error { - out.Type = v2beta2.MetricTargetType(in.Type) +func autoConvert_autoscaling_MetricTarget_To_v2_MetricTarget(in *autoscaling.MetricTarget, out *v2.MetricTarget, s conversion.Scope) error { + out.Type = v2.MetricTargetType(in.Type) out.Value = (*resource.Quantity)(unsafe.Pointer(in.Value)) out.AverageValue = (*resource.Quantity)(unsafe.Pointer(in.AverageValue)) out.AverageUtilization = (*int32)(unsafe.Pointer(in.AverageUtilization)) return nil } -// Convert_autoscaling_MetricTarget_To_v2beta2_MetricTarget is an autogenerated conversion function. -func Convert_autoscaling_MetricTarget_To_v2beta2_MetricTarget(in *autoscaling.MetricTarget, out *v2beta2.MetricTarget, s conversion.Scope) error { - return autoConvert_autoscaling_MetricTarget_To_v2beta2_MetricTarget(in, out, s) +// Convert_autoscaling_MetricTarget_To_v2_MetricTarget is an autogenerated conversion function. +func Convert_autoscaling_MetricTarget_To_v2_MetricTarget(in *autoscaling.MetricTarget, out *v2.MetricTarget, s conversion.Scope) error { + return autoConvert_autoscaling_MetricTarget_To_v2_MetricTarget(in, out, s) } -func autoConvert_v2beta2_MetricValueStatus_To_autoscaling_MetricValueStatus(in *v2beta2.MetricValueStatus, out *autoscaling.MetricValueStatus, s conversion.Scope) error { +func autoConvert_v2_MetricValueStatus_To_autoscaling_MetricValueStatus(in *v2.MetricValueStatus, out *autoscaling.MetricValueStatus, s conversion.Scope) error { out.Value = (*resource.Quantity)(unsafe.Pointer(in.Value)) out.AverageValue = (*resource.Quantity)(unsafe.Pointer(in.AverageValue)) out.AverageUtilization = (*int32)(unsafe.Pointer(in.AverageUtilization)) return nil } -// Convert_v2beta2_MetricValueStatus_To_autoscaling_MetricValueStatus is an autogenerated conversion function. -func Convert_v2beta2_MetricValueStatus_To_autoscaling_MetricValueStatus(in *v2beta2.MetricValueStatus, out *autoscaling.MetricValueStatus, s conversion.Scope) error { - return autoConvert_v2beta2_MetricValueStatus_To_autoscaling_MetricValueStatus(in, out, s) +// Convert_v2_MetricValueStatus_To_autoscaling_MetricValueStatus is an autogenerated conversion function. +func Convert_v2_MetricValueStatus_To_autoscaling_MetricValueStatus(in *v2.MetricValueStatus, out *autoscaling.MetricValueStatus, s conversion.Scope) error { + return autoConvert_v2_MetricValueStatus_To_autoscaling_MetricValueStatus(in, out, s) } -func autoConvert_autoscaling_MetricValueStatus_To_v2beta2_MetricValueStatus(in *autoscaling.MetricValueStatus, out *v2beta2.MetricValueStatus, s conversion.Scope) error { +func autoConvert_autoscaling_MetricValueStatus_To_v2_MetricValueStatus(in *autoscaling.MetricValueStatus, out *v2.MetricValueStatus, s conversion.Scope) error { out.Value = (*resource.Quantity)(unsafe.Pointer(in.Value)) out.AverageValue = (*resource.Quantity)(unsafe.Pointer(in.AverageValue)) out.AverageUtilization = (*int32)(unsafe.Pointer(in.AverageUtilization)) return nil } -// Convert_autoscaling_MetricValueStatus_To_v2beta2_MetricValueStatus is an autogenerated conversion function. -func Convert_autoscaling_MetricValueStatus_To_v2beta2_MetricValueStatus(in *autoscaling.MetricValueStatus, out *v2beta2.MetricValueStatus, s conversion.Scope) error { - return autoConvert_autoscaling_MetricValueStatus_To_v2beta2_MetricValueStatus(in, out, s) +// Convert_autoscaling_MetricValueStatus_To_v2_MetricValueStatus is an autogenerated conversion function. +func Convert_autoscaling_MetricValueStatus_To_v2_MetricValueStatus(in *autoscaling.MetricValueStatus, out *v2.MetricValueStatus, s conversion.Scope) error { + return autoConvert_autoscaling_MetricValueStatus_To_v2_MetricValueStatus(in, out, s) } -func autoConvert_v2beta2_ObjectMetricSource_To_autoscaling_ObjectMetricSource(in *v2beta2.ObjectMetricSource, out *autoscaling.ObjectMetricSource, s conversion.Scope) error { - if err := Convert_v2beta2_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(&in.DescribedObject, &out.DescribedObject, s); err != nil { +func autoConvert_v2_ObjectMetricSource_To_autoscaling_ObjectMetricSource(in *v2.ObjectMetricSource, out *autoscaling.ObjectMetricSource, s conversion.Scope) error { + if err := Convert_v2_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(&in.DescribedObject, &out.DescribedObject, s); err != nil { return err } - if err := Convert_v2beta2_MetricTarget_To_autoscaling_MetricTarget(&in.Target, &out.Target, s); err != nil { + if err := Convert_v2_MetricTarget_To_autoscaling_MetricTarget(&in.Target, &out.Target, s); err != nil { return err } - if err := Convert_v2beta2_MetricIdentifier_To_autoscaling_MetricIdentifier(&in.Metric, &out.Metric, s); err != nil { + if err := Convert_v2_MetricIdentifier_To_autoscaling_MetricIdentifier(&in.Metric, &out.Metric, s); err != nil { return err } return nil } -// Convert_v2beta2_ObjectMetricSource_To_autoscaling_ObjectMetricSource is an autogenerated conversion function. -func Convert_v2beta2_ObjectMetricSource_To_autoscaling_ObjectMetricSource(in *v2beta2.ObjectMetricSource, out *autoscaling.ObjectMetricSource, s conversion.Scope) error { - return autoConvert_v2beta2_ObjectMetricSource_To_autoscaling_ObjectMetricSource(in, out, s) +// Convert_v2_ObjectMetricSource_To_autoscaling_ObjectMetricSource is an autogenerated conversion function. +func Convert_v2_ObjectMetricSource_To_autoscaling_ObjectMetricSource(in *v2.ObjectMetricSource, out *autoscaling.ObjectMetricSource, s conversion.Scope) error { + return autoConvert_v2_ObjectMetricSource_To_autoscaling_ObjectMetricSource(in, out, s) } -func autoConvert_autoscaling_ObjectMetricSource_To_v2beta2_ObjectMetricSource(in *autoscaling.ObjectMetricSource, out *v2beta2.ObjectMetricSource, s conversion.Scope) error { - if err := Convert_autoscaling_CrossVersionObjectReference_To_v2beta2_CrossVersionObjectReference(&in.DescribedObject, &out.DescribedObject, s); err != nil { +func autoConvert_autoscaling_ObjectMetricSource_To_v2_ObjectMetricSource(in *autoscaling.ObjectMetricSource, out *v2.ObjectMetricSource, s conversion.Scope) error { + if err := Convert_autoscaling_CrossVersionObjectReference_To_v2_CrossVersionObjectReference(&in.DescribedObject, &out.DescribedObject, s); err != nil { return err } - if err := Convert_autoscaling_MetricTarget_To_v2beta2_MetricTarget(&in.Target, &out.Target, s); err != nil { + if err := Convert_autoscaling_MetricTarget_To_v2_MetricTarget(&in.Target, &out.Target, s); err != nil { return err } - if err := Convert_autoscaling_MetricIdentifier_To_v2beta2_MetricIdentifier(&in.Metric, &out.Metric, s); err != nil { + if err := Convert_autoscaling_MetricIdentifier_To_v2_MetricIdentifier(&in.Metric, &out.Metric, s); err != nil { return err } return nil } -// Convert_autoscaling_ObjectMetricSource_To_v2beta2_ObjectMetricSource is an autogenerated conversion function. -func Convert_autoscaling_ObjectMetricSource_To_v2beta2_ObjectMetricSource(in *autoscaling.ObjectMetricSource, out *v2beta2.ObjectMetricSource, s conversion.Scope) error { - return autoConvert_autoscaling_ObjectMetricSource_To_v2beta2_ObjectMetricSource(in, out, s) +// Convert_autoscaling_ObjectMetricSource_To_v2_ObjectMetricSource is an autogenerated conversion function. +func Convert_autoscaling_ObjectMetricSource_To_v2_ObjectMetricSource(in *autoscaling.ObjectMetricSource, out *v2.ObjectMetricSource, s conversion.Scope) error { + return autoConvert_autoscaling_ObjectMetricSource_To_v2_ObjectMetricSource(in, out, s) } -func autoConvert_v2beta2_ObjectMetricStatus_To_autoscaling_ObjectMetricStatus(in *v2beta2.ObjectMetricStatus, out *autoscaling.ObjectMetricStatus, s conversion.Scope) error { - if err := Convert_v2beta2_MetricIdentifier_To_autoscaling_MetricIdentifier(&in.Metric, &out.Metric, s); err != nil { +func autoConvert_v2_ObjectMetricStatus_To_autoscaling_ObjectMetricStatus(in *v2.ObjectMetricStatus, out *autoscaling.ObjectMetricStatus, s conversion.Scope) error { + if err := Convert_v2_MetricIdentifier_To_autoscaling_MetricIdentifier(&in.Metric, &out.Metric, s); err != nil { return err } - if err := Convert_v2beta2_MetricValueStatus_To_autoscaling_MetricValueStatus(&in.Current, &out.Current, s); err != nil { + if err := Convert_v2_MetricValueStatus_To_autoscaling_MetricValueStatus(&in.Current, &out.Current, s); err != nil { return err } - if err := Convert_v2beta2_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(&in.DescribedObject, &out.DescribedObject, s); err != nil { + if err := Convert_v2_CrossVersionObjectReference_To_autoscaling_CrossVersionObjectReference(&in.DescribedObject, &out.DescribedObject, s); err != nil { return err } return nil } -// Convert_v2beta2_ObjectMetricStatus_To_autoscaling_ObjectMetricStatus is an autogenerated conversion function. -func Convert_v2beta2_ObjectMetricStatus_To_autoscaling_ObjectMetricStatus(in *v2beta2.ObjectMetricStatus, out *autoscaling.ObjectMetricStatus, s conversion.Scope) error { - return autoConvert_v2beta2_ObjectMetricStatus_To_autoscaling_ObjectMetricStatus(in, out, s) +// Convert_v2_ObjectMetricStatus_To_autoscaling_ObjectMetricStatus is an autogenerated conversion function. +func Convert_v2_ObjectMetricStatus_To_autoscaling_ObjectMetricStatus(in *v2.ObjectMetricStatus, out *autoscaling.ObjectMetricStatus, s conversion.Scope) error { + return autoConvert_v2_ObjectMetricStatus_To_autoscaling_ObjectMetricStatus(in, out, s) } -func autoConvert_autoscaling_ObjectMetricStatus_To_v2beta2_ObjectMetricStatus(in *autoscaling.ObjectMetricStatus, out *v2beta2.ObjectMetricStatus, s conversion.Scope) error { - if err := Convert_autoscaling_MetricIdentifier_To_v2beta2_MetricIdentifier(&in.Metric, &out.Metric, s); err != nil { +func autoConvert_autoscaling_ObjectMetricStatus_To_v2_ObjectMetricStatus(in *autoscaling.ObjectMetricStatus, out *v2.ObjectMetricStatus, s conversion.Scope) error { + if err := Convert_autoscaling_MetricIdentifier_To_v2_MetricIdentifier(&in.Metric, &out.Metric, s); err != nil { return err } - if err := Convert_autoscaling_MetricValueStatus_To_v2beta2_MetricValueStatus(&in.Current, &out.Current, s); err != nil { + if err := Convert_autoscaling_MetricValueStatus_To_v2_MetricValueStatus(&in.Current, &out.Current, s); err != nil { return err } - if err := Convert_autoscaling_CrossVersionObjectReference_To_v2beta2_CrossVersionObjectReference(&in.DescribedObject, &out.DescribedObject, s); err != nil { + if err := Convert_autoscaling_CrossVersionObjectReference_To_v2_CrossVersionObjectReference(&in.DescribedObject, &out.DescribedObject, s); err != nil { return err } return nil } -// Convert_autoscaling_ObjectMetricStatus_To_v2beta2_ObjectMetricStatus is an autogenerated conversion function. -func Convert_autoscaling_ObjectMetricStatus_To_v2beta2_ObjectMetricStatus(in *autoscaling.ObjectMetricStatus, out *v2beta2.ObjectMetricStatus, s conversion.Scope) error { - return autoConvert_autoscaling_ObjectMetricStatus_To_v2beta2_ObjectMetricStatus(in, out, s) +// Convert_autoscaling_ObjectMetricStatus_To_v2_ObjectMetricStatus is an autogenerated conversion function. +func Convert_autoscaling_ObjectMetricStatus_To_v2_ObjectMetricStatus(in *autoscaling.ObjectMetricStatus, out *v2.ObjectMetricStatus, s conversion.Scope) error { + return autoConvert_autoscaling_ObjectMetricStatus_To_v2_ObjectMetricStatus(in, out, s) } -func autoConvert_v2beta2_PodsMetricSource_To_autoscaling_PodsMetricSource(in *v2beta2.PodsMetricSource, out *autoscaling.PodsMetricSource, s conversion.Scope) error { - if err := Convert_v2beta2_MetricIdentifier_To_autoscaling_MetricIdentifier(&in.Metric, &out.Metric, s); err != nil { +func autoConvert_v2_PodsMetricSource_To_autoscaling_PodsMetricSource(in *v2.PodsMetricSource, out *autoscaling.PodsMetricSource, s conversion.Scope) error { + if err := Convert_v2_MetricIdentifier_To_autoscaling_MetricIdentifier(&in.Metric, &out.Metric, s); err != nil { return err } - if err := Convert_v2beta2_MetricTarget_To_autoscaling_MetricTarget(&in.Target, &out.Target, s); err != nil { + if err := Convert_v2_MetricTarget_To_autoscaling_MetricTarget(&in.Target, &out.Target, s); err != nil { return err } return nil } -// Convert_v2beta2_PodsMetricSource_To_autoscaling_PodsMetricSource is an autogenerated conversion function. -func Convert_v2beta2_PodsMetricSource_To_autoscaling_PodsMetricSource(in *v2beta2.PodsMetricSource, out *autoscaling.PodsMetricSource, s conversion.Scope) error { - return autoConvert_v2beta2_PodsMetricSource_To_autoscaling_PodsMetricSource(in, out, s) +// Convert_v2_PodsMetricSource_To_autoscaling_PodsMetricSource is an autogenerated conversion function. +func Convert_v2_PodsMetricSource_To_autoscaling_PodsMetricSource(in *v2.PodsMetricSource, out *autoscaling.PodsMetricSource, s conversion.Scope) error { + return autoConvert_v2_PodsMetricSource_To_autoscaling_PodsMetricSource(in, out, s) } -func autoConvert_autoscaling_PodsMetricSource_To_v2beta2_PodsMetricSource(in *autoscaling.PodsMetricSource, out *v2beta2.PodsMetricSource, s conversion.Scope) error { - if err := Convert_autoscaling_MetricIdentifier_To_v2beta2_MetricIdentifier(&in.Metric, &out.Metric, s); err != nil { +func autoConvert_autoscaling_PodsMetricSource_To_v2_PodsMetricSource(in *autoscaling.PodsMetricSource, out *v2.PodsMetricSource, s conversion.Scope) error { + if err := Convert_autoscaling_MetricIdentifier_To_v2_MetricIdentifier(&in.Metric, &out.Metric, s); err != nil { return err } - if err := Convert_autoscaling_MetricTarget_To_v2beta2_MetricTarget(&in.Target, &out.Target, s); err != nil { + if err := Convert_autoscaling_MetricTarget_To_v2_MetricTarget(&in.Target, &out.Target, s); err != nil { return err } return nil } -// Convert_autoscaling_PodsMetricSource_To_v2beta2_PodsMetricSource is an autogenerated conversion function. -func Convert_autoscaling_PodsMetricSource_To_v2beta2_PodsMetricSource(in *autoscaling.PodsMetricSource, out *v2beta2.PodsMetricSource, s conversion.Scope) error { - return autoConvert_autoscaling_PodsMetricSource_To_v2beta2_PodsMetricSource(in, out, s) +// Convert_autoscaling_PodsMetricSource_To_v2_PodsMetricSource is an autogenerated conversion function. +func Convert_autoscaling_PodsMetricSource_To_v2_PodsMetricSource(in *autoscaling.PodsMetricSource, out *v2.PodsMetricSource, s conversion.Scope) error { + return autoConvert_autoscaling_PodsMetricSource_To_v2_PodsMetricSource(in, out, s) } -func autoConvert_v2beta2_PodsMetricStatus_To_autoscaling_PodsMetricStatus(in *v2beta2.PodsMetricStatus, out *autoscaling.PodsMetricStatus, s conversion.Scope) error { - if err := Convert_v2beta2_MetricIdentifier_To_autoscaling_MetricIdentifier(&in.Metric, &out.Metric, s); err != nil { +func autoConvert_v2_PodsMetricStatus_To_autoscaling_PodsMetricStatus(in *v2.PodsMetricStatus, out *autoscaling.PodsMetricStatus, s conversion.Scope) error { + if err := Convert_v2_MetricIdentifier_To_autoscaling_MetricIdentifier(&in.Metric, &out.Metric, s); err != nil { return err } - if err := Convert_v2beta2_MetricValueStatus_To_autoscaling_MetricValueStatus(&in.Current, &out.Current, s); err != nil { + if err := Convert_v2_MetricValueStatus_To_autoscaling_MetricValueStatus(&in.Current, &out.Current, s); err != nil { return err } return nil } -// Convert_v2beta2_PodsMetricStatus_To_autoscaling_PodsMetricStatus is an autogenerated conversion function. -func Convert_v2beta2_PodsMetricStatus_To_autoscaling_PodsMetricStatus(in *v2beta2.PodsMetricStatus, out *autoscaling.PodsMetricStatus, s conversion.Scope) error { - return autoConvert_v2beta2_PodsMetricStatus_To_autoscaling_PodsMetricStatus(in, out, s) +// Convert_v2_PodsMetricStatus_To_autoscaling_PodsMetricStatus is an autogenerated conversion function. +func Convert_v2_PodsMetricStatus_To_autoscaling_PodsMetricStatus(in *v2.PodsMetricStatus, out *autoscaling.PodsMetricStatus, s conversion.Scope) error { + return autoConvert_v2_PodsMetricStatus_To_autoscaling_PodsMetricStatus(in, out, s) } -func autoConvert_autoscaling_PodsMetricStatus_To_v2beta2_PodsMetricStatus(in *autoscaling.PodsMetricStatus, out *v2beta2.PodsMetricStatus, s conversion.Scope) error { - if err := Convert_autoscaling_MetricIdentifier_To_v2beta2_MetricIdentifier(&in.Metric, &out.Metric, s); err != nil { +func autoConvert_autoscaling_PodsMetricStatus_To_v2_PodsMetricStatus(in *autoscaling.PodsMetricStatus, out *v2.PodsMetricStatus, s conversion.Scope) error { + if err := Convert_autoscaling_MetricIdentifier_To_v2_MetricIdentifier(&in.Metric, &out.Metric, s); err != nil { return err } - if err := Convert_autoscaling_MetricValueStatus_To_v2beta2_MetricValueStatus(&in.Current, &out.Current, s); err != nil { + if err := Convert_autoscaling_MetricValueStatus_To_v2_MetricValueStatus(&in.Current, &out.Current, s); err != nil { return err } return nil } -// Convert_autoscaling_PodsMetricStatus_To_v2beta2_PodsMetricStatus is an autogenerated conversion function. -func Convert_autoscaling_PodsMetricStatus_To_v2beta2_PodsMetricStatus(in *autoscaling.PodsMetricStatus, out *v2beta2.PodsMetricStatus, s conversion.Scope) error { - return autoConvert_autoscaling_PodsMetricStatus_To_v2beta2_PodsMetricStatus(in, out, s) +// Convert_autoscaling_PodsMetricStatus_To_v2_PodsMetricStatus is an autogenerated conversion function. +func Convert_autoscaling_PodsMetricStatus_To_v2_PodsMetricStatus(in *autoscaling.PodsMetricStatus, out *v2.PodsMetricStatus, s conversion.Scope) error { + return autoConvert_autoscaling_PodsMetricStatus_To_v2_PodsMetricStatus(in, out, s) } -func autoConvert_v2beta2_ResourceMetricSource_To_autoscaling_ResourceMetricSource(in *v2beta2.ResourceMetricSource, out *autoscaling.ResourceMetricSource, s conversion.Scope) error { +func autoConvert_v2_ResourceMetricSource_To_autoscaling_ResourceMetricSource(in *v2.ResourceMetricSource, out *autoscaling.ResourceMetricSource, s conversion.Scope) error { out.Name = core.ResourceName(in.Name) - if err := Convert_v2beta2_MetricTarget_To_autoscaling_MetricTarget(&in.Target, &out.Target, s); err != nil { + if err := Convert_v2_MetricTarget_To_autoscaling_MetricTarget(&in.Target, &out.Target, s); err != nil { return err } return nil } -// Convert_v2beta2_ResourceMetricSource_To_autoscaling_ResourceMetricSource is an autogenerated conversion function. -func Convert_v2beta2_ResourceMetricSource_To_autoscaling_ResourceMetricSource(in *v2beta2.ResourceMetricSource, out *autoscaling.ResourceMetricSource, s conversion.Scope) error { - return autoConvert_v2beta2_ResourceMetricSource_To_autoscaling_ResourceMetricSource(in, out, s) +// Convert_v2_ResourceMetricSource_To_autoscaling_ResourceMetricSource is an autogenerated conversion function. +func Convert_v2_ResourceMetricSource_To_autoscaling_ResourceMetricSource(in *v2.ResourceMetricSource, out *autoscaling.ResourceMetricSource, s conversion.Scope) error { + return autoConvert_v2_ResourceMetricSource_To_autoscaling_ResourceMetricSource(in, out, s) } -func autoConvert_autoscaling_ResourceMetricSource_To_v2beta2_ResourceMetricSource(in *autoscaling.ResourceMetricSource, out *v2beta2.ResourceMetricSource, s conversion.Scope) error { +func autoConvert_autoscaling_ResourceMetricSource_To_v2_ResourceMetricSource(in *autoscaling.ResourceMetricSource, out *v2.ResourceMetricSource, s conversion.Scope) error { out.Name = v1.ResourceName(in.Name) - if err := Convert_autoscaling_MetricTarget_To_v2beta2_MetricTarget(&in.Target, &out.Target, s); err != nil { + if err := Convert_autoscaling_MetricTarget_To_v2_MetricTarget(&in.Target, &out.Target, s); err != nil { return err } return nil } -// Convert_autoscaling_ResourceMetricSource_To_v2beta2_ResourceMetricSource is an autogenerated conversion function. -func Convert_autoscaling_ResourceMetricSource_To_v2beta2_ResourceMetricSource(in *autoscaling.ResourceMetricSource, out *v2beta2.ResourceMetricSource, s conversion.Scope) error { - return autoConvert_autoscaling_ResourceMetricSource_To_v2beta2_ResourceMetricSource(in, out, s) +// Convert_autoscaling_ResourceMetricSource_To_v2_ResourceMetricSource is an autogenerated conversion function. +func Convert_autoscaling_ResourceMetricSource_To_v2_ResourceMetricSource(in *autoscaling.ResourceMetricSource, out *v2.ResourceMetricSource, s conversion.Scope) error { + return autoConvert_autoscaling_ResourceMetricSource_To_v2_ResourceMetricSource(in, out, s) } -func autoConvert_v2beta2_ResourceMetricStatus_To_autoscaling_ResourceMetricStatus(in *v2beta2.ResourceMetricStatus, out *autoscaling.ResourceMetricStatus, s conversion.Scope) error { +func autoConvert_v2_ResourceMetricStatus_To_autoscaling_ResourceMetricStatus(in *v2.ResourceMetricStatus, out *autoscaling.ResourceMetricStatus, s conversion.Scope) error { out.Name = core.ResourceName(in.Name) - if err := Convert_v2beta2_MetricValueStatus_To_autoscaling_MetricValueStatus(&in.Current, &out.Current, s); err != nil { + if err := Convert_v2_MetricValueStatus_To_autoscaling_MetricValueStatus(&in.Current, &out.Current, s); err != nil { return err } return nil } -// Convert_v2beta2_ResourceMetricStatus_To_autoscaling_ResourceMetricStatus is an autogenerated conversion function. -func Convert_v2beta2_ResourceMetricStatus_To_autoscaling_ResourceMetricStatus(in *v2beta2.ResourceMetricStatus, out *autoscaling.ResourceMetricStatus, s conversion.Scope) error { - return autoConvert_v2beta2_ResourceMetricStatus_To_autoscaling_ResourceMetricStatus(in, out, s) +// Convert_v2_ResourceMetricStatus_To_autoscaling_ResourceMetricStatus is an autogenerated conversion function. +func Convert_v2_ResourceMetricStatus_To_autoscaling_ResourceMetricStatus(in *v2.ResourceMetricStatus, out *autoscaling.ResourceMetricStatus, s conversion.Scope) error { + return autoConvert_v2_ResourceMetricStatus_To_autoscaling_ResourceMetricStatus(in, out, s) } -func autoConvert_autoscaling_ResourceMetricStatus_To_v2beta2_ResourceMetricStatus(in *autoscaling.ResourceMetricStatus, out *v2beta2.ResourceMetricStatus, s conversion.Scope) error { +func autoConvert_autoscaling_ResourceMetricStatus_To_v2_ResourceMetricStatus(in *autoscaling.ResourceMetricStatus, out *v2.ResourceMetricStatus, s conversion.Scope) error { out.Name = v1.ResourceName(in.Name) - if err := Convert_autoscaling_MetricValueStatus_To_v2beta2_MetricValueStatus(&in.Current, &out.Current, s); err != nil { + if err := Convert_autoscaling_MetricValueStatus_To_v2_MetricValueStatus(&in.Current, &out.Current, s); err != nil { return err } return nil } -// Convert_autoscaling_ResourceMetricStatus_To_v2beta2_ResourceMetricStatus is an autogenerated conversion function. -func Convert_autoscaling_ResourceMetricStatus_To_v2beta2_ResourceMetricStatus(in *autoscaling.ResourceMetricStatus, out *v2beta2.ResourceMetricStatus, s conversion.Scope) error { - return autoConvert_autoscaling_ResourceMetricStatus_To_v2beta2_ResourceMetricStatus(in, out, s) +// Convert_autoscaling_ResourceMetricStatus_To_v2_ResourceMetricStatus is an autogenerated conversion function. +func Convert_autoscaling_ResourceMetricStatus_To_v2_ResourceMetricStatus(in *autoscaling.ResourceMetricStatus, out *v2.ResourceMetricStatus, s conversion.Scope) error { + return autoConvert_autoscaling_ResourceMetricStatus_To_v2_ResourceMetricStatus(in, out, s) } diff --git a/pkg/apis/autoscaling/v2/zz_generated.defaults.go b/pkg/apis/autoscaling/v2/zz_generated.defaults.go index f41f351bf266..916791255e30 100644 --- a/pkg/apis/autoscaling/v2/zz_generated.defaults.go +++ b/pkg/apis/autoscaling/v2/zz_generated.defaults.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated /* @@ -18,10 +19,10 @@ limitations under the License. // Code generated by defaulter-gen. DO NOT EDIT. -package v2beta2 +package v2 import ( - v2beta2 "k8s.io/api/autoscaling/v2beta2" + v2 "k8s.io/api/autoscaling/v2" runtime "k8s.io/apimachinery/pkg/runtime" ) @@ -29,20 +30,18 @@ import ( // Public to allow building arbitrary schemes. // All generated defaulters are covering - they call all nested defaulters. func RegisterDefaults(scheme *runtime.Scheme) error { - scheme.AddTypeDefaultingFunc(&v2beta2.HorizontalPodAutoscaler{}, func(obj interface{}) { - SetObjectDefaults_HorizontalPodAutoscaler(obj.(*v2beta2.HorizontalPodAutoscaler)) - }) - scheme.AddTypeDefaultingFunc(&v2beta2.HorizontalPodAutoscalerList{}, func(obj interface{}) { - SetObjectDefaults_HorizontalPodAutoscalerList(obj.(*v2beta2.HorizontalPodAutoscalerList)) + scheme.AddTypeDefaultingFunc(&v2.HorizontalPodAutoscaler{}, func(obj interface{}) { SetObjectDefaults_HorizontalPodAutoscaler(obj.(*v2.HorizontalPodAutoscaler)) }) + scheme.AddTypeDefaultingFunc(&v2.HorizontalPodAutoscalerList{}, func(obj interface{}) { + SetObjectDefaults_HorizontalPodAutoscalerList(obj.(*v2.HorizontalPodAutoscalerList)) }) return nil } -func SetObjectDefaults_HorizontalPodAutoscaler(in *v2beta2.HorizontalPodAutoscaler) { +func SetObjectDefaults_HorizontalPodAutoscaler(in *v2.HorizontalPodAutoscaler) { SetDefaults_HorizontalPodAutoscaler(in) } -func SetObjectDefaults_HorizontalPodAutoscalerList(in *v2beta2.HorizontalPodAutoscalerList) { +func SetObjectDefaults_HorizontalPodAutoscalerList(in *v2.HorizontalPodAutoscalerList) { for i := range in.Items { a := &in.Items[i] SetObjectDefaults_HorizontalPodAutoscaler(a) diff --git a/pkg/controller/podautoscaler/horizontal.go b/pkg/controller/podautoscaler/horizontal.go index ac93ac81d558..b65ef0d3754c 100644 --- a/pkg/controller/podautoscaler/horizontal.go +++ b/pkg/controller/podautoscaler/horizontal.go @@ -23,7 +23,7 @@ import ( "time" autoscalingv1 "k8s.io/api/autoscaling/v1" - autoscalingv2 "k8s.io/api/autoscaling/v2beta2" + autoscalingv2 "k8s.io/api/autoscaling/v2" v1 "k8s.io/api/core/v1" apiequality "k8s.io/apimachinery/pkg/api/equality" "k8s.io/apimachinery/pkg/api/errors" @@ -1046,7 +1046,7 @@ func calculateScaleUpLimitWithScalingRules(currentReplicas int32, scaleEvents [] var selectPolicyFn func(int32, int32) int32 if *scalingRules.SelectPolicy == autoscalingv2.DisabledPolicySelect { return currentReplicas // Scaling is disabled - } else if *scalingRules.SelectPolicy == autoscalingv2.MinPolicySelect { + } else if *scalingRules.SelectPolicy == autoscalingv2.MinChangePolicySelect { result = math.MaxInt32 selectPolicyFn = min // For scaling up, the lowest change ('min' policy) produces a minimum value } else { @@ -1074,7 +1074,7 @@ func calculateScaleDownLimitWithBehaviors(currentReplicas int32, scaleEvents []t var selectPolicyFn func(int32, int32) int32 if *scalingRules.SelectPolicy == autoscalingv2.DisabledPolicySelect { return currentReplicas // Scaling is disabled - } else if *scalingRules.SelectPolicy == autoscalingv2.MinPolicySelect { + } else if *scalingRules.SelectPolicy == autoscalingv2.MinChangePolicySelect { result = math.MinInt32 selectPolicyFn = max // For scaling down, the lowest change ('min' policy) produces a maximum value } else { diff --git a/pkg/controller/podautoscaler/horizontal_test.go b/pkg/controller/podautoscaler/horizontal_test.go index 09250502239c..6b43a324a4b9 100644 --- a/pkg/controller/podautoscaler/horizontal_test.go +++ b/pkg/controller/podautoscaler/horizontal_test.go @@ -26,7 +26,7 @@ import ( "time" autoscalingv1 "k8s.io/api/autoscaling/v1" - autoscalingv2 "k8s.io/api/autoscaling/v2beta2" + autoscalingv2 "k8s.io/api/autoscaling/v2" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/meta/testrestmapper" "k8s.io/apimachinery/pkg/api/resource" @@ -41,7 +41,7 @@ import ( core "k8s.io/client-go/testing" "k8s.io/kubernetes/pkg/api/legacyscheme" "k8s.io/kubernetes/pkg/apis/autoscaling" - autoscalingapiv2beta2 "k8s.io/kubernetes/pkg/apis/autoscaling/v2beta2" + autoscalingapiv2 "k8s.io/kubernetes/pkg/apis/autoscaling/v2" "k8s.io/kubernetes/pkg/controller" "k8s.io/kubernetes/pkg/controller/podautoscaler/metrics" cmapi "k8s.io/metrics/pkg/apis/custom_metrics/v1beta2" @@ -230,7 +230,7 @@ func (tc *testCase) prepareTestClient(t *testing.T) (*fake.Clientset, *metricsfa }, } // Initialize default values - autoscalingapiv2beta2.SetDefaults_HorizontalPodAutoscalerBehavior(&hpa) + autoscalingapiv2.SetDefaults_HorizontalPodAutoscalerBehavior(&hpa) obj := &autoscalingv2.HorizontalPodAutoscalerList{ Items: []autoscalingv2.HorizontalPodAutoscaler{hpa}, @@ -2982,7 +2982,7 @@ func TestConvertDesiredReplicasWithRules(t *testing.T) { } func TestCalculateScaleUpLimitWithScalingRules(t *testing.T) { - policy := autoscalingv2.MinPolicySelect + policy := autoscalingv2.MinChangePolicySelect calculated := calculateScaleUpLimitWithScalingRules(1, []timestampedScaleEvent{}, &autoscalingv2.HPAScalingRules{ StabilizationWindowSeconds: utilpointer.Int32Ptr(300), @@ -3004,7 +3004,7 @@ func TestCalculateScaleUpLimitWithScalingRules(t *testing.T) { } func TestCalculateScaleDownLimitWithBehaviors(t *testing.T) { - policy := autoscalingv2.MinPolicySelect + policy := autoscalingv2.MinChangePolicySelect calculated := calculateScaleDownLimitWithBehaviors(5, []timestampedScaleEvent{}, &autoscalingv2.HPAScalingRules{ StabilizationWindowSeconds: utilpointer.Int32Ptr(300), @@ -3026,7 +3026,7 @@ func TestCalculateScaleDownLimitWithBehaviors(t *testing.T) { } func generateScalingRules(pods, podsPeriod, percent, percentPeriod, stabilizationWindow int32) *autoscalingv2.HPAScalingRules { - policy := autoscalingv2.MaxPolicySelect + policy := autoscalingv2.MaxChangePolicySelect directionBehavior := autoscalingv2.HPAScalingRules{ StabilizationWindowSeconds: utilpointer.Int32Ptr(stabilizationWindow), SelectPolicy: &policy, @@ -3610,8 +3610,8 @@ func TestScalingWithRules(t *testing.T) { } arg := NormalizationArg{ Key: tc.key, - ScaleUpBehavior: autoscalingapiv2beta2.GenerateHPAScaleUpRules(tc.scaleUpRules), - ScaleDownBehavior: autoscalingapiv2beta2.GenerateHPAScaleDownRules(tc.scaleDownRules), + ScaleUpBehavior: autoscalingapiv2.GenerateHPAScaleUpRules(tc.scaleUpRules), + ScaleDownBehavior: autoscalingapiv2.GenerateHPAScaleDownRules(tc.scaleDownRules), MinReplicas: tc.specMinReplicas, MaxReplicas: tc.specMaxReplicas, DesiredReplicas: tc.prenormalizedDesiredReplicas, diff --git a/pkg/controller/podautoscaler/metrics/client.go b/pkg/controller/podautoscaler/metrics/client.go index 700091efa4fc..ce47f2b1a89e 100644 --- a/pkg/controller/podautoscaler/metrics/client.go +++ b/pkg/controller/podautoscaler/metrics/client.go @@ -23,8 +23,8 @@ import ( "k8s.io/klog/v2" - autoscaling "k8s.io/api/autoscaling/v2beta2" - "k8s.io/api/core/v1" + autoscaling "k8s.io/api/autoscaling/v2" + v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/pkg/controller/podautoscaler/metrics/client_test.go b/pkg/controller/podautoscaler/metrics/client_test.go index df3f8c1298b5..79c777021820 100644 --- a/pkg/controller/podautoscaler/metrics/client_test.go +++ b/pkg/controller/podautoscaler/metrics/client_test.go @@ -22,8 +22,8 @@ import ( "testing" "time" - autoscalingapi "k8s.io/api/autoscaling/v2beta2" - "k8s.io/api/core/v1" + autoscalingapi "k8s.io/api/autoscaling/v2" + v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/meta/testrestmapper" "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/controller/podautoscaler/metrics/interfaces.go b/pkg/controller/podautoscaler/metrics/interfaces.go index a72986ed22a9..6b9b9f1aebfb 100644 --- a/pkg/controller/podautoscaler/metrics/interfaces.go +++ b/pkg/controller/podautoscaler/metrics/interfaces.go @@ -20,8 +20,8 @@ import ( "context" "time" - autoscaling "k8s.io/api/autoscaling/v2beta2" - "k8s.io/api/core/v1" + autoscaling "k8s.io/api/autoscaling/v2" + v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/labels" ) diff --git a/pkg/controller/podautoscaler/replica_calculator.go b/pkg/controller/podautoscaler/replica_calculator.go index 6ab04ec25d72..17f1ec5f0af8 100644 --- a/pkg/controller/podautoscaler/replica_calculator.go +++ b/pkg/controller/podautoscaler/replica_calculator.go @@ -22,7 +22,7 @@ import ( "math" "time" - autoscaling "k8s.io/api/autoscaling/v2beta2" + autoscaling "k8s.io/api/autoscaling/v2" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" diff --git a/pkg/controller/podautoscaler/replica_calculator_test.go b/pkg/controller/podautoscaler/replica_calculator_test.go index b445a2ff65cd..2f401d8b7a60 100644 --- a/pkg/controller/podautoscaler/replica_calculator_test.go +++ b/pkg/controller/podautoscaler/replica_calculator_test.go @@ -23,7 +23,7 @@ import ( "testing" "time" - autoscalingv2 "k8s.io/api/autoscaling/v2beta2" + autoscalingv2 "k8s.io/api/autoscaling/v2" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/meta/testrestmapper" "k8s.io/apimachinery/pkg/api/resource" diff --git a/pkg/controlplane/instance.go b/pkg/controlplane/instance.go index e31f62089b50..75a67a810056 100644 --- a/pkg/controlplane/instance.go +++ b/pkg/controlplane/instance.go @@ -31,6 +31,7 @@ import ( authenticationv1 "k8s.io/api/authentication/v1" authorizationapiv1 "k8s.io/api/authorization/v1" autoscalingapiv1 "k8s.io/api/autoscaling/v1" + autoscalingapiv2 "k8s.io/api/autoscaling/v2" autoscalingapiv2beta1 "k8s.io/api/autoscaling/v2beta1" autoscalingapiv2beta2 "k8s.io/api/autoscaling/v2beta2" batchapiv1 "k8s.io/api/batch/v1" @@ -646,6 +647,7 @@ func DefaultAPIResourceConfigSource() *serverstorage.ResourceConfig { authenticationv1.SchemeGroupVersion, authorizationapiv1.SchemeGroupVersion, autoscalingapiv1.SchemeGroupVersion, + autoscalingapiv2.SchemeGroupVersion, autoscalingapiv2beta1.SchemeGroupVersion, autoscalingapiv2beta2.SchemeGroupVersion, batchapiv1.SchemeGroupVersion, diff --git a/pkg/controlplane/storageversionhashdata/data.go b/pkg/controlplane/storageversionhashdata/data.go index 64a2ae8ac066..3b02e2878ecd 100644 --- a/pkg/controlplane/storageversionhashdata/data.go +++ b/pkg/controlplane/storageversionhashdata/data.go @@ -52,6 +52,7 @@ var GVRToStorageVersionHash = map[string]string{ "v1/serviceaccounts": "pbx9ZvyFpBE=", "v1/services": "0/CO1lhkEBI=", "autoscaling/v1/horizontalpodautoscalers": "oQlkt7f5j/A=", + "autoscaling/v2/horizontalpodautoscalers": "oQlkt7f5j/A=", "autoscaling/v2beta1/horizontalpodautoscalers": "oQlkt7f5j/A=", "autoscaling/v2beta2/horizontalpodautoscalers": "oQlkt7f5j/A=", "batch/v1/jobs": "mudhfqk/qZY=", diff --git a/pkg/registry/autoscaling/horizontalpodautoscaler/strategy.go b/pkg/registry/autoscaling/horizontalpodautoscaler/strategy.go index f311181966a8..7e6fadf662dc 100644 --- a/pkg/registry/autoscaling/horizontalpodautoscaler/strategy.go +++ b/pkg/registry/autoscaling/horizontalpodautoscaler/strategy.go @@ -52,6 +52,9 @@ func (autoscalerStrategy) GetResetFields() map[fieldpath.APIVersion]*fieldpath.S "autoscaling/v1": fieldpath.NewSet( fieldpath.MakePathOrDie("status"), ), + "autoscaling/v2": fieldpath.NewSet( + fieldpath.MakePathOrDie("status"), + ), "autoscaling/v2beta1": fieldpath.NewSet( fieldpath.MakePathOrDie("status"), ), @@ -151,6 +154,9 @@ func (autoscalerStatusStrategy) GetResetFields() map[fieldpath.APIVersion]*field "autoscaling/v1": fieldpath.NewSet( fieldpath.MakePathOrDie("spec"), ), + "autoscaling/v2": fieldpath.NewSet( + fieldpath.MakePathOrDie("spec"), + ), "autoscaling/v2beta1": fieldpath.NewSet( fieldpath.MakePathOrDie("spec"), ), diff --git a/pkg/registry/autoscaling/rest/storage_autoscaling.go b/pkg/registry/autoscaling/rest/storage_autoscaling.go index 05c8ef7ea334..480324d6b01e 100644 --- a/pkg/registry/autoscaling/rest/storage_autoscaling.go +++ b/pkg/registry/autoscaling/rest/storage_autoscaling.go @@ -25,6 +25,7 @@ import ( serverstorage "k8s.io/apiserver/pkg/server/storage" "k8s.io/kubernetes/pkg/api/legacyscheme" "k8s.io/kubernetes/pkg/apis/autoscaling" + autoscalingapiv2 "k8s.io/kubernetes/pkg/apis/autoscaling/v2" autoscalingapiv2beta2 "k8s.io/kubernetes/pkg/apis/autoscaling/v2beta2" horizontalpodautoscalerstore "k8s.io/kubernetes/pkg/registry/autoscaling/horizontalpodautoscaler/storage" ) @@ -43,6 +44,13 @@ func (p RESTStorageProvider) NewRESTStorage(apiResourceConfigSource serverstorag apiGroupInfo.VersionedResourcesStorageMap[autoscalingapiv2beta2.SchemeGroupVersion.Version] = storageMap } } + if apiResourceConfigSource.VersionEnabled(autoscalingapiv2.SchemeGroupVersion) { + if storageMap, err := p.v2Storage(apiResourceConfigSource, restOptionsGetter); err != nil { + return genericapiserver.APIGroupInfo{}, false, err + } else { + apiGroupInfo.VersionedResourcesStorageMap[autoscalingapiv2.SchemeGroupVersion.Version] = storageMap + } + } if apiResourceConfigSource.VersionEnabled(autoscalingapiv2beta1.SchemeGroupVersion) { if storageMap, err := p.v2beta1Storage(apiResourceConfigSource, restOptionsGetter); err != nil { return genericapiserver.APIGroupInfo{}, false, err @@ -100,6 +108,19 @@ func (p RESTStorageProvider) v2beta2Storage(apiResourceConfigSource serverstorag return storage, err } +func (p RESTStorageProvider) v2Storage(apiResourceConfigSource serverstorage.APIResourceConfigSource, restOptionsGetter generic.RESTOptionsGetter) (map[string]rest.Storage, error) { + storage := map[string]rest.Storage{} + // horizontalpodautoscalers + hpaStorage, hpaStatusStorage, err := horizontalpodautoscalerstore.NewREST(restOptionsGetter) + if err != nil { + return storage, err + } + storage["horizontalpodautoscalers"] = hpaStorage + storage["horizontalpodautoscalers/status"] = hpaStatusStorage + + return storage, err +} + func (p RESTStorageProvider) GroupName() string { return autoscaling.GroupName } diff --git a/staging/src/k8s.io/api/autoscaling/v2/doc.go b/staging/src/k8s.io/api/autoscaling/v2/doc.go index 76fb0aff87bf..f96a059b6c7e 100644 --- a/staging/src/k8s.io/api/autoscaling/v2/doc.go +++ b/staging/src/k8s.io/api/autoscaling/v2/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright 2021 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -17,6 +17,5 @@ limitations under the License. // +k8s:deepcopy-gen=package // +k8s:protobuf-gen=package // +k8s:openapi-gen=true -// +k8s:prerelease-lifecycle-gen=true -package v2beta2 // import "k8s.io/api/autoscaling/v2beta2" +package v2 // import "k8s.io/api/autoscaling/v2" diff --git a/staging/src/k8s.io/api/autoscaling/v2/generated.pb.go b/staging/src/k8s.io/api/autoscaling/v2/generated.pb.go index cece3c877afd..408413a78c78 100644 --- a/staging/src/k8s.io/api/autoscaling/v2/generated.pb.go +++ b/staging/src/k8s.io/api/autoscaling/v2/generated.pb.go @@ -15,9 +15,9 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kubernetes/vendor/k8s.io/api/autoscaling/v2beta2/generated.proto +// source: k8s.io/kubernetes/vendor/k8s.io/api/autoscaling/v2/generated.proto -package v2beta2 +package v2 import ( fmt "fmt" @@ -50,7 +50,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *ContainerResourceMetricSource) Reset() { *m = ContainerResourceMetricSource{} } func (*ContainerResourceMetricSource) ProtoMessage() {} func (*ContainerResourceMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{0} + return fileDescriptor_b14d4df4b5f3935e, []int{0} } func (m *ContainerResourceMetricSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -78,7 +78,7 @@ var xxx_messageInfo_ContainerResourceMetricSource proto.InternalMessageInfo func (m *ContainerResourceMetricStatus) Reset() { *m = ContainerResourceMetricStatus{} } func (*ContainerResourceMetricStatus) ProtoMessage() {} func (*ContainerResourceMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{1} + return fileDescriptor_b14d4df4b5f3935e, []int{1} } func (m *ContainerResourceMetricStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -106,7 +106,7 @@ var xxx_messageInfo_ContainerResourceMetricStatus proto.InternalMessageInfo func (m *CrossVersionObjectReference) Reset() { *m = CrossVersionObjectReference{} } func (*CrossVersionObjectReference) ProtoMessage() {} func (*CrossVersionObjectReference) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{2} + return fileDescriptor_b14d4df4b5f3935e, []int{2} } func (m *CrossVersionObjectReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -134,7 +134,7 @@ var xxx_messageInfo_CrossVersionObjectReference proto.InternalMessageInfo func (m *ExternalMetricSource) Reset() { *m = ExternalMetricSource{} } func (*ExternalMetricSource) ProtoMessage() {} func (*ExternalMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{3} + return fileDescriptor_b14d4df4b5f3935e, []int{3} } func (m *ExternalMetricSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -162,7 +162,7 @@ var xxx_messageInfo_ExternalMetricSource proto.InternalMessageInfo func (m *ExternalMetricStatus) Reset() { *m = ExternalMetricStatus{} } func (*ExternalMetricStatus) ProtoMessage() {} func (*ExternalMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{4} + return fileDescriptor_b14d4df4b5f3935e, []int{4} } func (m *ExternalMetricStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -190,7 +190,7 @@ var xxx_messageInfo_ExternalMetricStatus proto.InternalMessageInfo func (m *HPAScalingPolicy) Reset() { *m = HPAScalingPolicy{} } func (*HPAScalingPolicy) ProtoMessage() {} func (*HPAScalingPolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{5} + return fileDescriptor_b14d4df4b5f3935e, []int{5} } func (m *HPAScalingPolicy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -218,7 +218,7 @@ var xxx_messageInfo_HPAScalingPolicy proto.InternalMessageInfo func (m *HPAScalingRules) Reset() { *m = HPAScalingRules{} } func (*HPAScalingRules) ProtoMessage() {} func (*HPAScalingRules) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{6} + return fileDescriptor_b14d4df4b5f3935e, []int{6} } func (m *HPAScalingRules) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -246,7 +246,7 @@ var xxx_messageInfo_HPAScalingRules proto.InternalMessageInfo func (m *HorizontalPodAutoscaler) Reset() { *m = HorizontalPodAutoscaler{} } func (*HorizontalPodAutoscaler) ProtoMessage() {} func (*HorizontalPodAutoscaler) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{7} + return fileDescriptor_b14d4df4b5f3935e, []int{7} } func (m *HorizontalPodAutoscaler) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -274,7 +274,7 @@ var xxx_messageInfo_HorizontalPodAutoscaler proto.InternalMessageInfo func (m *HorizontalPodAutoscalerBehavior) Reset() { *m = HorizontalPodAutoscalerBehavior{} } func (*HorizontalPodAutoscalerBehavior) ProtoMessage() {} func (*HorizontalPodAutoscalerBehavior) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{8} + return fileDescriptor_b14d4df4b5f3935e, []int{8} } func (m *HorizontalPodAutoscalerBehavior) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -302,7 +302,7 @@ var xxx_messageInfo_HorizontalPodAutoscalerBehavior proto.InternalMessageInfo func (m *HorizontalPodAutoscalerCondition) Reset() { *m = HorizontalPodAutoscalerCondition{} } func (*HorizontalPodAutoscalerCondition) ProtoMessage() {} func (*HorizontalPodAutoscalerCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{9} + return fileDescriptor_b14d4df4b5f3935e, []int{9} } func (m *HorizontalPodAutoscalerCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -330,7 +330,7 @@ var xxx_messageInfo_HorizontalPodAutoscalerCondition proto.InternalMessageInfo func (m *HorizontalPodAutoscalerList) Reset() { *m = HorizontalPodAutoscalerList{} } func (*HorizontalPodAutoscalerList) ProtoMessage() {} func (*HorizontalPodAutoscalerList) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{10} + return fileDescriptor_b14d4df4b5f3935e, []int{10} } func (m *HorizontalPodAutoscalerList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -358,7 +358,7 @@ var xxx_messageInfo_HorizontalPodAutoscalerList proto.InternalMessageInfo func (m *HorizontalPodAutoscalerSpec) Reset() { *m = HorizontalPodAutoscalerSpec{} } func (*HorizontalPodAutoscalerSpec) ProtoMessage() {} func (*HorizontalPodAutoscalerSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{11} + return fileDescriptor_b14d4df4b5f3935e, []int{11} } func (m *HorizontalPodAutoscalerSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -386,7 +386,7 @@ var xxx_messageInfo_HorizontalPodAutoscalerSpec proto.InternalMessageInfo func (m *HorizontalPodAutoscalerStatus) Reset() { *m = HorizontalPodAutoscalerStatus{} } func (*HorizontalPodAutoscalerStatus) ProtoMessage() {} func (*HorizontalPodAutoscalerStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{12} + return fileDescriptor_b14d4df4b5f3935e, []int{12} } func (m *HorizontalPodAutoscalerStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -414,7 +414,7 @@ var xxx_messageInfo_HorizontalPodAutoscalerStatus proto.InternalMessageInfo func (m *MetricIdentifier) Reset() { *m = MetricIdentifier{} } func (*MetricIdentifier) ProtoMessage() {} func (*MetricIdentifier) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{13} + return fileDescriptor_b14d4df4b5f3935e, []int{13} } func (m *MetricIdentifier) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -442,7 +442,7 @@ var xxx_messageInfo_MetricIdentifier proto.InternalMessageInfo func (m *MetricSpec) Reset() { *m = MetricSpec{} } func (*MetricSpec) ProtoMessage() {} func (*MetricSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{14} + return fileDescriptor_b14d4df4b5f3935e, []int{14} } func (m *MetricSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -470,7 +470,7 @@ var xxx_messageInfo_MetricSpec proto.InternalMessageInfo func (m *MetricStatus) Reset() { *m = MetricStatus{} } func (*MetricStatus) ProtoMessage() {} func (*MetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{15} + return fileDescriptor_b14d4df4b5f3935e, []int{15} } func (m *MetricStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -498,7 +498,7 @@ var xxx_messageInfo_MetricStatus proto.InternalMessageInfo func (m *MetricTarget) Reset() { *m = MetricTarget{} } func (*MetricTarget) ProtoMessage() {} func (*MetricTarget) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{16} + return fileDescriptor_b14d4df4b5f3935e, []int{16} } func (m *MetricTarget) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -526,7 +526,7 @@ var xxx_messageInfo_MetricTarget proto.InternalMessageInfo func (m *MetricValueStatus) Reset() { *m = MetricValueStatus{} } func (*MetricValueStatus) ProtoMessage() {} func (*MetricValueStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{17} + return fileDescriptor_b14d4df4b5f3935e, []int{17} } func (m *MetricValueStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -554,7 +554,7 @@ var xxx_messageInfo_MetricValueStatus proto.InternalMessageInfo func (m *ObjectMetricSource) Reset() { *m = ObjectMetricSource{} } func (*ObjectMetricSource) ProtoMessage() {} func (*ObjectMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{18} + return fileDescriptor_b14d4df4b5f3935e, []int{18} } func (m *ObjectMetricSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -582,7 +582,7 @@ var xxx_messageInfo_ObjectMetricSource proto.InternalMessageInfo func (m *ObjectMetricStatus) Reset() { *m = ObjectMetricStatus{} } func (*ObjectMetricStatus) ProtoMessage() {} func (*ObjectMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{19} + return fileDescriptor_b14d4df4b5f3935e, []int{19} } func (m *ObjectMetricStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -610,7 +610,7 @@ var xxx_messageInfo_ObjectMetricStatus proto.InternalMessageInfo func (m *PodsMetricSource) Reset() { *m = PodsMetricSource{} } func (*PodsMetricSource) ProtoMessage() {} func (*PodsMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{20} + return fileDescriptor_b14d4df4b5f3935e, []int{20} } func (m *PodsMetricSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -638,7 +638,7 @@ var xxx_messageInfo_PodsMetricSource proto.InternalMessageInfo func (m *PodsMetricStatus) Reset() { *m = PodsMetricStatus{} } func (*PodsMetricStatus) ProtoMessage() {} func (*PodsMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{21} + return fileDescriptor_b14d4df4b5f3935e, []int{21} } func (m *PodsMetricStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -666,7 +666,7 @@ var xxx_messageInfo_PodsMetricStatus proto.InternalMessageInfo func (m *ResourceMetricSource) Reset() { *m = ResourceMetricSource{} } func (*ResourceMetricSource) ProtoMessage() {} func (*ResourceMetricSource) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{22} + return fileDescriptor_b14d4df4b5f3935e, []int{22} } func (m *ResourceMetricSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -694,7 +694,7 @@ var xxx_messageInfo_ResourceMetricSource proto.InternalMessageInfo func (m *ResourceMetricStatus) Reset() { *m = ResourceMetricStatus{} } func (*ResourceMetricStatus) ProtoMessage() {} func (*ResourceMetricStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_592ad94d7d6be24f, []int{23} + return fileDescriptor_b14d4df4b5f3935e, []int{23} } func (m *ResourceMetricStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -720,147 +720,147 @@ func (m *ResourceMetricStatus) XXX_DiscardUnknown() { var xxx_messageInfo_ResourceMetricStatus proto.InternalMessageInfo func init() { - proto.RegisterType((*ContainerResourceMetricSource)(nil), "k8s.io.api.autoscaling.v2beta2.ContainerResourceMetricSource") - proto.RegisterType((*ContainerResourceMetricStatus)(nil), "k8s.io.api.autoscaling.v2beta2.ContainerResourceMetricStatus") - proto.RegisterType((*CrossVersionObjectReference)(nil), "k8s.io.api.autoscaling.v2beta2.CrossVersionObjectReference") - proto.RegisterType((*ExternalMetricSource)(nil), "k8s.io.api.autoscaling.v2beta2.ExternalMetricSource") - proto.RegisterType((*ExternalMetricStatus)(nil), "k8s.io.api.autoscaling.v2beta2.ExternalMetricStatus") - proto.RegisterType((*HPAScalingPolicy)(nil), "k8s.io.api.autoscaling.v2beta2.HPAScalingPolicy") - proto.RegisterType((*HPAScalingRules)(nil), "k8s.io.api.autoscaling.v2beta2.HPAScalingRules") - proto.RegisterType((*HorizontalPodAutoscaler)(nil), "k8s.io.api.autoscaling.v2beta2.HorizontalPodAutoscaler") - proto.RegisterType((*HorizontalPodAutoscalerBehavior)(nil), "k8s.io.api.autoscaling.v2beta2.HorizontalPodAutoscalerBehavior") - proto.RegisterType((*HorizontalPodAutoscalerCondition)(nil), "k8s.io.api.autoscaling.v2beta2.HorizontalPodAutoscalerCondition") - proto.RegisterType((*HorizontalPodAutoscalerList)(nil), "k8s.io.api.autoscaling.v2beta2.HorizontalPodAutoscalerList") - proto.RegisterType((*HorizontalPodAutoscalerSpec)(nil), "k8s.io.api.autoscaling.v2beta2.HorizontalPodAutoscalerSpec") - proto.RegisterType((*HorizontalPodAutoscalerStatus)(nil), "k8s.io.api.autoscaling.v2beta2.HorizontalPodAutoscalerStatus") - proto.RegisterType((*MetricIdentifier)(nil), "k8s.io.api.autoscaling.v2beta2.MetricIdentifier") - proto.RegisterType((*MetricSpec)(nil), "k8s.io.api.autoscaling.v2beta2.MetricSpec") - proto.RegisterType((*MetricStatus)(nil), "k8s.io.api.autoscaling.v2beta2.MetricStatus") - proto.RegisterType((*MetricTarget)(nil), "k8s.io.api.autoscaling.v2beta2.MetricTarget") - proto.RegisterType((*MetricValueStatus)(nil), "k8s.io.api.autoscaling.v2beta2.MetricValueStatus") - proto.RegisterType((*ObjectMetricSource)(nil), "k8s.io.api.autoscaling.v2beta2.ObjectMetricSource") - proto.RegisterType((*ObjectMetricStatus)(nil), "k8s.io.api.autoscaling.v2beta2.ObjectMetricStatus") - proto.RegisterType((*PodsMetricSource)(nil), "k8s.io.api.autoscaling.v2beta2.PodsMetricSource") - proto.RegisterType((*PodsMetricStatus)(nil), "k8s.io.api.autoscaling.v2beta2.PodsMetricStatus") - proto.RegisterType((*ResourceMetricSource)(nil), "k8s.io.api.autoscaling.v2beta2.ResourceMetricSource") - proto.RegisterType((*ResourceMetricStatus)(nil), "k8s.io.api.autoscaling.v2beta2.ResourceMetricStatus") + proto.RegisterType((*ContainerResourceMetricSource)(nil), "k8s.io.api.autoscaling.v2.ContainerResourceMetricSource") + proto.RegisterType((*ContainerResourceMetricStatus)(nil), "k8s.io.api.autoscaling.v2.ContainerResourceMetricStatus") + proto.RegisterType((*CrossVersionObjectReference)(nil), "k8s.io.api.autoscaling.v2.CrossVersionObjectReference") + proto.RegisterType((*ExternalMetricSource)(nil), "k8s.io.api.autoscaling.v2.ExternalMetricSource") + proto.RegisterType((*ExternalMetricStatus)(nil), "k8s.io.api.autoscaling.v2.ExternalMetricStatus") + proto.RegisterType((*HPAScalingPolicy)(nil), "k8s.io.api.autoscaling.v2.HPAScalingPolicy") + proto.RegisterType((*HPAScalingRules)(nil), "k8s.io.api.autoscaling.v2.HPAScalingRules") + proto.RegisterType((*HorizontalPodAutoscaler)(nil), "k8s.io.api.autoscaling.v2.HorizontalPodAutoscaler") + proto.RegisterType((*HorizontalPodAutoscalerBehavior)(nil), "k8s.io.api.autoscaling.v2.HorizontalPodAutoscalerBehavior") + proto.RegisterType((*HorizontalPodAutoscalerCondition)(nil), "k8s.io.api.autoscaling.v2.HorizontalPodAutoscalerCondition") + proto.RegisterType((*HorizontalPodAutoscalerList)(nil), "k8s.io.api.autoscaling.v2.HorizontalPodAutoscalerList") + proto.RegisterType((*HorizontalPodAutoscalerSpec)(nil), "k8s.io.api.autoscaling.v2.HorizontalPodAutoscalerSpec") + proto.RegisterType((*HorizontalPodAutoscalerStatus)(nil), "k8s.io.api.autoscaling.v2.HorizontalPodAutoscalerStatus") + proto.RegisterType((*MetricIdentifier)(nil), "k8s.io.api.autoscaling.v2.MetricIdentifier") + proto.RegisterType((*MetricSpec)(nil), "k8s.io.api.autoscaling.v2.MetricSpec") + proto.RegisterType((*MetricStatus)(nil), "k8s.io.api.autoscaling.v2.MetricStatus") + proto.RegisterType((*MetricTarget)(nil), "k8s.io.api.autoscaling.v2.MetricTarget") + proto.RegisterType((*MetricValueStatus)(nil), "k8s.io.api.autoscaling.v2.MetricValueStatus") + proto.RegisterType((*ObjectMetricSource)(nil), "k8s.io.api.autoscaling.v2.ObjectMetricSource") + proto.RegisterType((*ObjectMetricStatus)(nil), "k8s.io.api.autoscaling.v2.ObjectMetricStatus") + proto.RegisterType((*PodsMetricSource)(nil), "k8s.io.api.autoscaling.v2.PodsMetricSource") + proto.RegisterType((*PodsMetricStatus)(nil), "k8s.io.api.autoscaling.v2.PodsMetricStatus") + proto.RegisterType((*ResourceMetricSource)(nil), "k8s.io.api.autoscaling.v2.ResourceMetricSource") + proto.RegisterType((*ResourceMetricStatus)(nil), "k8s.io.api.autoscaling.v2.ResourceMetricStatus") } func init() { - proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/autoscaling/v2beta2/generated.proto", fileDescriptor_592ad94d7d6be24f) -} - -var fileDescriptor_592ad94d7d6be24f = []byte{ - // 1741 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x59, 0xcd, 0x6f, 0x1b, 0xc7, - 0x15, 0xd7, 0x92, 0xd4, 0xd7, 0x50, 0x9f, 0xe3, 0x2f, 0x42, 0x86, 0x49, 0x61, 0x6b, 0xb4, 0xae, - 0x51, 0x2f, 0x2b, 0x56, 0x6d, 0x0d, 0x18, 0x45, 0xab, 0x95, 0x5b, 0xdb, 0xb0, 0x64, 0xab, 0x43, - 0x59, 0x2d, 0x0a, 0xd9, 0xe8, 0x70, 0x77, 0x44, 0x4d, 0x45, 0xee, 0x12, 0xbb, 0x4b, 0xda, 0x72, - 0x81, 0xa2, 0x08, 0x90, 0x7b, 0x90, 0x20, 0xd7, 0xfc, 0x09, 0x09, 0x7c, 0x09, 0x90, 0x63, 0x3e, - 0x60, 0x18, 0x41, 0x10, 0xf8, 0x16, 0xe7, 0x42, 0xc4, 0xcc, 0x31, 0xc7, 0xdc, 0x7c, 0x0a, 0xe6, - 0x63, 0x3f, 0x49, 0x89, 0x94, 0x20, 0x29, 0xd0, 0x8d, 0x3b, 0xf3, 0xde, 0xef, 0xcd, 0x7b, 0xf3, - 0x7b, 0x6f, 0xde, 0x0c, 0xc1, 0xad, 0x9d, 0xeb, 0xae, 0x46, 0xed, 0xe2, 0x4e, 0xb3, 0x42, 0x1c, - 0x8b, 0x78, 0xc4, 0x2d, 0xb6, 0x88, 0x65, 0xda, 0x4e, 0x51, 0x4e, 0xe0, 0x06, 0x2d, 0xe2, 0xa6, - 0x67, 0xbb, 0x06, 0xae, 0x51, 0xab, 0x5a, 0x6c, 0x95, 0x2a, 0xc4, 0xc3, 0xa5, 0x62, 0x95, 0x58, - 0xc4, 0xc1, 0x1e, 0x31, 0xb5, 0x86, 0x63, 0x7b, 0x36, 0xcc, 0x0b, 0x79, 0x0d, 0x37, 0xa8, 0x16, - 0x91, 0xd7, 0xa4, 0xfc, 0xdc, 0xb5, 0x2a, 0xf5, 0xb6, 0x9b, 0x15, 0xcd, 0xb0, 0xeb, 0xc5, 0xaa, - 0x5d, 0xb5, 0x8b, 0x5c, 0xad, 0xd2, 0xdc, 0xe2, 0x5f, 0xfc, 0x83, 0xff, 0x12, 0x70, 0x73, 0x6a, - 0xc4, 0xbc, 0x61, 0x3b, 0xa4, 0xd8, 0x5a, 0x48, 0x9a, 0x9c, 0x5b, 0x0c, 0x65, 0xea, 0xd8, 0xd8, - 0xa6, 0x16, 0x71, 0x76, 0x8b, 0x8d, 0x9d, 0x2a, 0x57, 0x72, 0x88, 0x6b, 0x37, 0x1d, 0x83, 0x1c, - 0x48, 0xcb, 0x2d, 0xd6, 0x89, 0x87, 0x7b, 0xd9, 0x2a, 0xee, 0xa5, 0xe5, 0x34, 0x2d, 0x8f, 0xd6, - 0xbb, 0xcd, 0xfc, 0xa1, 0x9f, 0x82, 0x6b, 0x6c, 0x93, 0x3a, 0x4e, 0xea, 0xa9, 0x3f, 0x28, 0xe0, - 0xd2, 0xb2, 0x6d, 0x79, 0x98, 0x69, 0x20, 0xe9, 0xc4, 0x2a, 0xf1, 0x1c, 0x6a, 0x94, 0xf9, 0x6f, - 0xb8, 0x0c, 0x32, 0x16, 0xae, 0x93, 0x9c, 0x32, 0xaf, 0x5c, 0x19, 0xd7, 0x8b, 0x2f, 0xda, 0x85, - 0xa1, 0x4e, 0xbb, 0x90, 0xb9, 0x87, 0xeb, 0xe4, 0x4d, 0xbb, 0x50, 0xe8, 0x0e, 0x9c, 0xe6, 0xc3, - 0x30, 0x11, 0xc4, 0x95, 0xe1, 0x3a, 0x18, 0xf1, 0xb0, 0x53, 0x25, 0x5e, 0x2e, 0x35, 0xaf, 0x5c, - 0xc9, 0x96, 0x7e, 0xa3, 0xed, 0xbf, 0x7f, 0x9a, 0x58, 0xc2, 0x3a, 0xd7, 0xd1, 0xa7, 0xa4, 0xd1, - 0x11, 0xf1, 0x8d, 0x24, 0x16, 0x2c, 0x82, 0x71, 0xc3, 0x5f, 0x7b, 0x2e, 0xcd, 0xd7, 0x37, 0x2b, - 0x45, 0xc7, 0x43, 0xa7, 0x42, 0x19, 0xf5, 0xc7, 0x7d, 0xbc, 0xf5, 0xb0, 0xd7, 0x74, 0x8f, 0xc6, - 0xdb, 0x4d, 0x30, 0x6a, 0x34, 0x1d, 0x87, 0x58, 0xbe, 0xbb, 0x0b, 0x83, 0xb9, 0xbb, 0x81, 0x6b, - 0x4d, 0x22, 0x16, 0xa2, 0x4f, 0x4b, 0xd3, 0xa3, 0xcb, 0x02, 0x09, 0xf9, 0x90, 0x07, 0xf7, 0xfa, - 0x7d, 0x05, 0x5c, 0x5c, 0x76, 0x6c, 0xd7, 0xdd, 0x20, 0x8e, 0x4b, 0x6d, 0xeb, 0x7e, 0xe5, 0x3f, - 0xc4, 0xf0, 0x10, 0xd9, 0x22, 0x0e, 0xb1, 0x0c, 0x02, 0xe7, 0x41, 0x66, 0x87, 0x5a, 0xa6, 0xf4, - 0x79, 0xc2, 0xf7, 0xf9, 0x2e, 0xb5, 0x4c, 0xc4, 0x67, 0x98, 0x04, 0x8f, 0x4a, 0x2a, 0x2e, 0x11, - 0x71, 0xb9, 0x04, 0x00, 0x6e, 0x50, 0x69, 0x40, 0xae, 0x0a, 0x4a, 0x39, 0xb0, 0xb4, 0x76, 0x47, - 0xce, 0xa0, 0x88, 0x94, 0xfa, 0x5c, 0x01, 0x67, 0xff, 0xfa, 0xc4, 0x23, 0x8e, 0x85, 0x6b, 0x31, - 0xca, 0xfd, 0x13, 0x8c, 0xd4, 0xf9, 0x37, 0x5f, 0x52, 0xb6, 0xf4, 0xdb, 0xc1, 0xc2, 0x77, 0xc7, - 0x24, 0x96, 0x47, 0xb7, 0x28, 0x71, 0x42, 0xc6, 0x88, 0x19, 0x24, 0xf1, 0x8e, 0x87, 0x87, 0xea, - 0xd7, 0xdd, 0x8e, 0x08, 0x36, 0x1d, 0x9f, 0x23, 0xc7, 0x4a, 0x31, 0xf5, 0x43, 0x05, 0xcc, 0xdc, - 0x5e, 0x5b, 0x2a, 0x0b, 0x88, 0x35, 0xbb, 0x46, 0x8d, 0x5d, 0x78, 0x1d, 0x64, 0xbc, 0xdd, 0x86, - 0x9f, 0x1a, 0x97, 0x7d, 0x12, 0xac, 0xef, 0x36, 0x58, 0x6a, 0x9c, 0x4d, 0xca, 0xb3, 0x71, 0xc4, - 0x35, 0xe0, 0x2f, 0xc0, 0x70, 0x8b, 0xd9, 0xe5, 0x4b, 0x1d, 0xd6, 0x27, 0xa5, 0xea, 0x30, 0x5f, - 0x0c, 0x12, 0x73, 0xf0, 0x06, 0x98, 0x6c, 0x10, 0x87, 0xda, 0x66, 0x99, 0x18, 0xb6, 0x65, 0xba, - 0x9c, 0x44, 0xc3, 0xfa, 0x39, 0x29, 0x3c, 0xb9, 0x16, 0x9d, 0x44, 0x71, 0x59, 0xf5, 0x83, 0x14, - 0x98, 0x0e, 0x17, 0x80, 0x9a, 0x35, 0xe2, 0xc2, 0x47, 0x60, 0xce, 0xf5, 0x70, 0x85, 0xd6, 0xe8, - 0x53, 0xec, 0x51, 0xdb, 0xfa, 0x07, 0xb5, 0x4c, 0xfb, 0x71, 0x1c, 0x3d, 0xdf, 0x69, 0x17, 0xe6, - 0xca, 0x7b, 0x4a, 0xa1, 0x7d, 0x10, 0xe0, 0x5d, 0x30, 0xe1, 0x92, 0x1a, 0x31, 0x3c, 0xe1, 0xaf, - 0x8c, 0xcb, 0xaf, 0x3a, 0xed, 0xc2, 0x44, 0x39, 0x32, 0xfe, 0xa6, 0x5d, 0x38, 0x13, 0x0b, 0x8c, - 0x98, 0x44, 0x31, 0x65, 0xf8, 0x08, 0x8c, 0x35, 0xd8, 0x2f, 0x4a, 0xdc, 0x5c, 0x6a, 0x3e, 0x3d, - 0x08, 0x57, 0x92, 0x01, 0xd7, 0x67, 0x64, 0xa8, 0xc6, 0xd6, 0x24, 0x12, 0x0a, 0x30, 0xd5, 0x4f, - 0x53, 0xe0, 0xc2, 0x6d, 0xdb, 0xa1, 0x4f, 0x59, 0x55, 0xa8, 0xad, 0xd9, 0xe6, 0x92, 0x44, 0x24, - 0x0e, 0xfc, 0x37, 0x18, 0x63, 0xe7, 0x90, 0x89, 0x3d, 0xdc, 0x83, 0xa7, 0xc1, 0x71, 0xa2, 0x35, - 0x76, 0xaa, 0x6c, 0xc0, 0xd5, 0x98, 0xb4, 0xd6, 0x5a, 0xd0, 0x44, 0x21, 0x59, 0x25, 0x1e, 0x0e, - 0x73, 0x3d, 0x1c, 0x43, 0x01, 0x2a, 0x7c, 0x08, 0x32, 0x6e, 0x83, 0x18, 0x92, 0xaa, 0x37, 0xfa, - 0x7a, 0xd6, 0x7b, 0xa1, 0xe5, 0x06, 0x31, 0xc2, 0xe2, 0xc3, 0xbe, 0x10, 0x87, 0x85, 0x04, 0x8c, - 0xb8, 0x9c, 0xd2, 0x7c, 0x57, 0xb3, 0xa5, 0x3f, 0x1d, 0xd6, 0x80, 0xc8, 0x8b, 0x20, 0xe7, 0xc4, - 0x37, 0x92, 0xe0, 0xea, 0x37, 0x0a, 0x28, 0xec, 0xa1, 0xa9, 0x93, 0x6d, 0xdc, 0xa2, 0xb6, 0x03, - 0x37, 0xc0, 0x28, 0x1f, 0x79, 0xd0, 0x90, 0xa1, 0x2c, 0x0e, 0xbe, 0x8d, 0x9c, 0xb6, 0x7a, 0x96, - 0x65, 0x64, 0x59, 0x60, 0x20, 0x1f, 0x0c, 0x6e, 0x82, 0x71, 0xfe, 0xf3, 0xa6, 0xfd, 0xd8, 0x92, - 0x61, 0x3c, 0x30, 0xf2, 0x24, 0x3b, 0x21, 0xca, 0x3e, 0x0a, 0x0a, 0x01, 0xd5, 0xb7, 0xd3, 0x60, - 0x7e, 0x0f, 0xcf, 0x96, 0x6d, 0xcb, 0xa4, 0x8c, 0xfc, 0xf0, 0x76, 0x2c, 0xff, 0x17, 0x13, 0xf9, - 0x7f, 0xb9, 0x9f, 0x7e, 0xa4, 0x1e, 0xac, 0x04, 0xfb, 0x95, 0x8a, 0x61, 0xc9, 0x80, 0xbf, 0x69, - 0x17, 0x7a, 0xf4, 0x63, 0x5a, 0x80, 0x14, 0xdf, 0x16, 0xd8, 0x02, 0xb0, 0x86, 0x5d, 0x6f, 0xdd, - 0xc1, 0x96, 0x2b, 0x2c, 0xd1, 0x3a, 0x91, 0x4c, 0xb8, 0x3a, 0x18, 0x91, 0x99, 0x86, 0x3e, 0x27, - 0x57, 0x01, 0x57, 0xba, 0xd0, 0x50, 0x0f, 0x0b, 0xf0, 0x97, 0x60, 0xc4, 0x21, 0xd8, 0xb5, 0xad, - 0x5c, 0x86, 0x7b, 0x11, 0xd0, 0x06, 0xf1, 0x51, 0x24, 0x67, 0xe1, 0xaf, 0xc1, 0x68, 0x9d, 0xb8, - 0x2e, 0xae, 0x92, 0xdc, 0x30, 0x17, 0x0c, 0xea, 0xee, 0xaa, 0x18, 0x46, 0xfe, 0xbc, 0xfa, 0xad, - 0x02, 0x2e, 0xee, 0x11, 0xc7, 0x15, 0xea, 0x7a, 0x70, 0xb3, 0x2b, 0x53, 0xb5, 0xc1, 0x1c, 0x64, - 0xda, 0x3c, 0x4f, 0x83, 0x1a, 0xe1, 0x8f, 0x44, 0xb2, 0x74, 0x13, 0x0c, 0x53, 0x8f, 0xd4, 0xfd, - 0x02, 0xf4, 0xc7, 0x43, 0x66, 0x51, 0x58, 0xdf, 0xef, 0x30, 0x34, 0x24, 0x40, 0xd5, 0xe7, 0xe9, - 0x3d, 0x7d, 0x63, 0xa9, 0x0c, 0xff, 0x0b, 0xa6, 0xf8, 0x97, 0x3c, 0x5b, 0xc9, 0x96, 0xf4, 0xb0, - 0x6f, 0xb5, 0xd8, 0xa7, 0xb5, 0xd1, 0xcf, 0xcb, 0xa5, 0x4c, 0x95, 0x63, 0xd0, 0x28, 0x61, 0x0a, - 0x2e, 0x80, 0x6c, 0x9d, 0x5a, 0x88, 0x34, 0x6a, 0xd4, 0xc0, 0xae, 0x3c, 0xa7, 0xa6, 0x3b, 0xed, - 0x42, 0x76, 0x35, 0x1c, 0x46, 0x51, 0x19, 0xf8, 0x7b, 0x90, 0xad, 0xe3, 0x27, 0x81, 0x8a, 0x38, - 0x4f, 0xce, 0x48, 0x7b, 0xd9, 0xd5, 0x70, 0x0a, 0x45, 0xe5, 0xe0, 0x03, 0xc6, 0x06, 0x76, 0x12, - 0xbb, 0xb9, 0x0c, 0x0f, 0xf3, 0xd5, 0xc1, 0x0e, 0x6e, 0x5e, 0xfc, 0x22, 0xcc, 0xe1, 0x10, 0xc8, - 0xc7, 0x82, 0x14, 0x8c, 0x55, 0x64, 0x0d, 0xe2, 0x2c, 0xcb, 0x96, 0xfe, 0x7c, 0xd8, 0xed, 0x93, - 0x30, 0xfa, 0x04, 0xa3, 0x89, 0xff, 0x85, 0x02, 0x78, 0xf5, 0xe3, 0x0c, 0xb8, 0xb4, 0x6f, 0x01, - 0x85, 0x7f, 0x03, 0xd0, 0xae, 0xb8, 0xc4, 0x69, 0x11, 0xf3, 0x96, 0xb8, 0x6f, 0xb0, 0xa6, 0x90, - 0x6d, 0x67, 0x5a, 0x3f, 0xcf, 0x32, 0xec, 0x7e, 0xd7, 0x2c, 0xea, 0xa1, 0x01, 0x0d, 0x30, 0xc9, - 0xf2, 0x4e, 0xec, 0x1d, 0x95, 0xfd, 0xe7, 0xc1, 0x92, 0x7a, 0x96, 0xb5, 0x0e, 0x2b, 0x51, 0x10, - 0x14, 0xc7, 0x84, 0x4b, 0x60, 0x5a, 0xb6, 0x3d, 0x89, 0xbd, 0xbc, 0x20, 0x83, 0x3d, 0xbd, 0x1c, - 0x9f, 0x46, 0x49, 0x79, 0x06, 0x61, 0x12, 0x97, 0x3a, 0xc4, 0x0c, 0x20, 0x32, 0x71, 0x88, 0x9b, - 0xf1, 0x69, 0x94, 0x94, 0x87, 0x35, 0x30, 0x25, 0x51, 0xe5, 0xd6, 0xe6, 0x86, 0x39, 0x3b, 0x06, - 0x6c, 0x50, 0xe5, 0xc9, 0x15, 0xd0, 0x7d, 0x39, 0x86, 0x85, 0x12, 0xd8, 0xd0, 0x03, 0xc0, 0xf0, - 0xab, 0xa9, 0x9b, 0x1b, 0xe1, 0x96, 0xfe, 0x72, 0x48, 0xbe, 0x04, 0x65, 0x39, 0xec, 0x01, 0x82, - 0x21, 0x17, 0x45, 0xec, 0xa8, 0xef, 0x29, 0x60, 0x26, 0xd9, 0xe0, 0x06, 0x57, 0x0b, 0x65, 0xcf, - 0xab, 0xc5, 0x43, 0x30, 0x26, 0x5a, 0x25, 0xdb, 0x91, 0x04, 0xf8, 0xdd, 0x80, 0x45, 0x0f, 0x57, - 0x48, 0xad, 0x2c, 0x55, 0x05, 0x9d, 0xfd, 0x2f, 0x14, 0x40, 0xaa, 0x1f, 0x65, 0x00, 0x08, 0x53, - 0x0c, 0x2e, 0xc6, 0x4e, 0xb9, 0xf9, 0xc4, 0x29, 0x37, 0x13, 0xbd, 0xa7, 0x44, 0x4e, 0xb4, 0x0d, - 0x30, 0x62, 0xf3, 0xd2, 0x23, 0x57, 0x58, 0xea, 0x17, 0xcc, 0xa0, 0x4d, 0x0a, 0xd0, 0x74, 0xc0, - 0xce, 0x0e, 0x59, 0xc0, 0x24, 0x1a, 0xbc, 0x07, 0x32, 0x0d, 0xdb, 0xf4, 0xfb, 0x9a, 0xbe, 0x2d, - 0xe1, 0x9a, 0x6d, 0xba, 0x31, 0xcc, 0x31, 0xb6, 0x76, 0x36, 0x8a, 0x38, 0x0e, 0x6b, 0x33, 0xfd, - 0x97, 0x0a, 0x4e, 0xd1, 0x6c, 0x69, 0xb1, 0x1f, 0x66, 0xaf, 0x47, 0x01, 0x11, 0x4c, 0x7f, 0x06, - 0x05, 0x98, 0xf0, 0x2d, 0x05, 0xcc, 0x1a, 0xc9, 0x0b, 0x76, 0x6e, 0x74, 0xb0, 0xae, 0x6c, 0xdf, - 0x77, 0x08, 0xfd, 0x5c, 0xa7, 0x5d, 0x98, 0xed, 0x12, 0x41, 0xdd, 0xe6, 0x98, 0x93, 0x44, 0xde, - 0xc6, 0x64, 0x2d, 0xec, 0xeb, 0x64, 0xaf, 0x6b, 0xa8, 0x70, 0xd2, 0x9f, 0x41, 0x01, 0xa6, 0xfa, - 0x2c, 0x03, 0x26, 0x62, 0xd7, 0xbc, 0x9f, 0x83, 0x33, 0x22, 0xe1, 0x8f, 0x96, 0x33, 0x02, 0xf3, - 0xe8, 0x39, 0x23, 0x70, 0x4f, 0x94, 0x33, 0xc2, 0xe4, 0x49, 0x72, 0x26, 0xe2, 0x64, 0x0f, 0xce, - 0x7c, 0x9e, 0xf2, 0x39, 0x23, 0x9a, 0x8e, 0xc1, 0x38, 0x23, 0x64, 0x23, 0x9c, 0xb9, 0x1f, 0xbd, - 0x49, 0xf7, 0xe9, 0xfe, 0x34, 0x3f, 0xc2, 0xda, 0xdf, 0x9b, 0xd8, 0xf2, 0xa8, 0xb7, 0xab, 0x8f, - 0x77, 0xdd, 0xba, 0x4d, 0x30, 0x81, 0x5b, 0xc4, 0xc1, 0x55, 0xc2, 0x87, 0x25, 0x69, 0x0e, 0x8a, - 0x3b, 0xc3, 0x2e, 0xbd, 0x4b, 0x11, 0x1c, 0x14, 0x43, 0x65, 0x0d, 0x81, 0xfc, 0x7e, 0xe0, 0x05, - 0xb7, 0x69, 0x79, 0x46, 0xf2, 0x86, 0x60, 0xa9, 0x6b, 0x16, 0xf5, 0xd0, 0x50, 0xdf, 0x4d, 0x81, - 0xd9, 0xae, 0x77, 0x8c, 0x30, 0x28, 0xca, 0x31, 0x05, 0x25, 0x75, 0x82, 0x41, 0x49, 0x1f, 0x38, - 0x28, 0x5f, 0xa4, 0x00, 0xec, 0x3e, 0x4e, 0xe0, 0xff, 0x78, 0x53, 0x62, 0x38, 0xb4, 0x42, 0x4c, - 0x31, 0x7d, 0x14, 0x0d, 0x75, 0xb4, 0xa3, 0x89, 0x62, 0xa3, 0xa4, 0xb1, 0x63, 0x7a, 0xf2, 0x0d, - 0x5f, 0xd4, 0xd2, 0x47, 0xfb, 0xa2, 0xa6, 0x7e, 0x95, 0x0c, 0xe3, 0xa9, 0x7e, 0xc2, 0xeb, 0xb5, - 0xfd, 0xe9, 0x13, 0xdc, 0x7e, 0xf5, 0x33, 0x05, 0xcc, 0x24, 0xdb, 0x91, 0x53, 0xf7, 0xb0, 0xfb, - 0x65, 0xdc, 0x89, 0xd3, 0xfd, 0xa8, 0xfb, 0x4c, 0x01, 0x67, 0x4f, 0xd9, 0x3f, 0x3c, 0xea, 0x27, - 0xdd, 0x6b, 0x3e, 0x2d, 0xff, 0xd3, 0xe8, 0xd7, 0x5e, 0xbc, 0xce, 0x0f, 0xbd, 0x7c, 0x9d, 0x1f, - 0x7a, 0xf5, 0x3a, 0x3f, 0xf4, 0xff, 0x4e, 0x5e, 0x79, 0xd1, 0xc9, 0x2b, 0x2f, 0x3b, 0x79, 0xe5, - 0x55, 0x27, 0xaf, 0x7c, 0xd7, 0xc9, 0x2b, 0xef, 0x7c, 0x9f, 0x1f, 0xfa, 0xd7, 0xa8, 0x84, 0xfe, - 0x29, 0x00, 0x00, 0xff, 0xff, 0xb0, 0x79, 0x7e, 0xc9, 0x1b, 0x1d, 0x00, 0x00, + proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/autoscaling/v2/generated.proto", fileDescriptor_b14d4df4b5f3935e) +} + +var fileDescriptor_b14d4df4b5f3935e = []byte{ + // 1735 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x59, 0xcb, 0x6f, 0x1b, 0xc7, + 0x19, 0xd7, 0x92, 0xd4, 0x6b, 0xa8, 0xe7, 0xf8, 0xc5, 0xca, 0x30, 0x29, 0x6c, 0xdd, 0xda, 0x75, + 0xeb, 0x65, 0xcd, 0xba, 0x86, 0x51, 0x9f, 0xb4, 0x72, 0x5b, 0x0b, 0x96, 0x2a, 0x7a, 0x68, 0x5b, + 0x6d, 0xd1, 0x16, 0x1e, 0xee, 0x8e, 0xa8, 0xa9, 0xc8, 0x5d, 0x62, 0x77, 0x49, 0x5b, 0x06, 0x0a, + 0xf4, 0xd2, 0x7b, 0xd1, 0xc2, 0x28, 0xfa, 0x3f, 0x18, 0x39, 0x25, 0x70, 0x0e, 0x09, 0x10, 0x20, + 0x39, 0xf8, 0x12, 0xc0, 0x87, 0x1c, 0x7c, 0x22, 0x62, 0x06, 0xc8, 0x31, 0x7f, 0x80, 0x4f, 0xc1, + 0x3c, 0xf6, 0xc9, 0x97, 0xe8, 0xc8, 0x02, 0x74, 0xe3, 0xcc, 0x7c, 0xdf, 0xef, 0x7b, 0xcc, 0xf7, + 0x9a, 0x25, 0xd0, 0xf7, 0x6f, 0xba, 0x1a, 0xb5, 0x8b, 0xfb, 0xad, 0x2a, 0x71, 0x2c, 0xe2, 0x11, + 0xb7, 0xd8, 0x26, 0x96, 0x69, 0x3b, 0x45, 0x79, 0x80, 0x9b, 0xb4, 0x88, 0x5b, 0x9e, 0xed, 0x1a, + 0xb8, 0x4e, 0xad, 0x5a, 0xb1, 0x5d, 0x2a, 0xd6, 0x88, 0x45, 0x1c, 0xec, 0x11, 0x53, 0x6b, 0x3a, + 0xb6, 0x67, 0xc3, 0x1f, 0x09, 0x52, 0x0d, 0x37, 0xa9, 0x16, 0x21, 0xd5, 0xda, 0xa5, 0x95, 0xab, + 0x35, 0xea, 0xed, 0xb5, 0xaa, 0x9a, 0x61, 0x37, 0x8a, 0x35, 0xbb, 0x66, 0x17, 0x39, 0x47, 0xb5, + 0xb5, 0xcb, 0x57, 0x7c, 0xc1, 0x7f, 0x09, 0xa4, 0x15, 0x35, 0x22, 0xd4, 0xb0, 0x1d, 0x52, 0x6c, + 0x5f, 0x4b, 0x4a, 0x5b, 0xb9, 0x1e, 0xd2, 0x34, 0xb0, 0xb1, 0x47, 0x2d, 0xe2, 0x1c, 0x14, 0x9b, + 0xfb, 0x35, 0xce, 0xe4, 0x10, 0xd7, 0x6e, 0x39, 0x06, 0x19, 0x8b, 0xcb, 0x2d, 0x36, 0x88, 0x87, + 0xfb, 0xc9, 0x2a, 0x0e, 0xe2, 0x72, 0x5a, 0x96, 0x47, 0x1b, 0xbd, 0x62, 0x6e, 0x8c, 0x62, 0x70, + 0x8d, 0x3d, 0xd2, 0xc0, 0x49, 0x3e, 0xf5, 0x5b, 0x05, 0x5c, 0x58, 0xb7, 0x2d, 0x0f, 0x33, 0x0e, + 0x24, 0x8d, 0xd8, 0x22, 0x9e, 0x43, 0x8d, 0x0a, 0xff, 0x0d, 0xd7, 0x41, 0xc6, 0xc2, 0x0d, 0x92, + 0x53, 0x56, 0x95, 0xcb, 0xb3, 0x7a, 0xf1, 0x65, 0xa7, 0x30, 0xd1, 0xed, 0x14, 0x32, 0x7f, 0xc0, + 0x0d, 0xf2, 0xb6, 0x53, 0x28, 0xf4, 0x3a, 0x4e, 0xf3, 0x61, 0x18, 0x09, 0xe2, 0xcc, 0x70, 0x1b, + 0x4c, 0x79, 0xd8, 0xa9, 0x11, 0x2f, 0x97, 0x5a, 0x55, 0x2e, 0x67, 0x4b, 0x97, 0xb4, 0x81, 0x57, + 0xa7, 0x09, 0xe9, 0xf7, 0x39, 0xb9, 0xbe, 0x20, 0xe5, 0x4d, 0x89, 0x35, 0x92, 0x30, 0xb0, 0x08, + 0x66, 0x0d, 0x5f, 0xed, 0x5c, 0x9a, 0xab, 0xb6, 0x2c, 0x49, 0x67, 0x43, 0x7b, 0x42, 0x1a, 0xf5, + 0xbb, 0x21, 0x86, 0x7a, 0xd8, 0x6b, 0xb9, 0x47, 0x63, 0xe8, 0x0e, 0x98, 0x36, 0x5a, 0x8e, 0x43, + 0x2c, 0xdf, 0xd2, 0x5f, 0x8c, 0xb4, 0xf4, 0x21, 0xae, 0xb7, 0x88, 0xd0, 0x41, 0x5f, 0x94, 0x52, + 0xa7, 0xd7, 0x05, 0x08, 0xf2, 0xd1, 0xc6, 0x37, 0xf8, 0x99, 0x02, 0xce, 0xaf, 0x3b, 0xb6, 0xeb, + 0x3e, 0x24, 0x8e, 0x4b, 0x6d, 0x6b, 0xbb, 0xfa, 0x77, 0x62, 0x78, 0x88, 0xec, 0x12, 0x87, 0x58, + 0x06, 0x81, 0xab, 0x20, 0xb3, 0x4f, 0x2d, 0x53, 0x9a, 0x3b, 0xe7, 0x9b, 0x7b, 0x97, 0x5a, 0x26, + 0xe2, 0x27, 0x8c, 0x82, 0x3b, 0x24, 0x15, 0xa7, 0x88, 0x58, 0x5b, 0x02, 0x00, 0x37, 0xa9, 0x14, + 0x20, 0xb5, 0x82, 0x92, 0x0e, 0xac, 0x95, 0x37, 0xe4, 0x09, 0x8a, 0x50, 0xa9, 0x9f, 0x28, 0xe0, + 0xf4, 0x6f, 0x9f, 0x78, 0xc4, 0xb1, 0x70, 0x3d, 0x16, 0x68, 0x15, 0x30, 0xd5, 0xe0, 0x6b, 0xae, + 0x52, 0xb6, 0xf4, 0xf3, 0x91, 0x9e, 0xdb, 0x30, 0x89, 0xe5, 0xd1, 0x5d, 0x4a, 0x9c, 0x30, 0x4e, + 0xc4, 0x09, 0x92, 0x50, 0x47, 0x1e, 0x78, 0xea, 0x17, 0xbd, 0xea, 0x8b, 0xf0, 0x79, 0x2f, 0xea, + 0xbf, 0xaf, 0x70, 0x52, 0x3f, 0x50, 0xc0, 0xd2, 0x9d, 0xf2, 0x5a, 0x45, 0x70, 0x97, 0xed, 0x3a, + 0x35, 0x0e, 0xe0, 0x4d, 0x90, 0xf1, 0x0e, 0x9a, 0x7e, 0x06, 0x5c, 0xf4, 0x2f, 0xfc, 0xfe, 0x41, + 0x93, 0x65, 0xc0, 0xe9, 0x24, 0x3d, 0xdb, 0x47, 0x9c, 0x03, 0xfe, 0x18, 0x4c, 0xb6, 0x99, 0x5c, + 0xae, 0xe5, 0xa4, 0x3e, 0x2f, 0x59, 0x27, 0xb9, 0x32, 0x48, 0x9c, 0xc1, 0x5b, 0x60, 0xbe, 0x49, + 0x1c, 0x6a, 0x9b, 0x15, 0x62, 0xd8, 0x96, 0xe9, 0xf2, 0x80, 0x99, 0xd4, 0xcf, 0x48, 0xe2, 0xf9, + 0x72, 0xf4, 0x10, 0xc5, 0x69, 0xd5, 0xff, 0xa7, 0xc0, 0x62, 0xa8, 0x00, 0x6a, 0xd5, 0x89, 0x0b, + 0xff, 0x06, 0x56, 0x5c, 0x0f, 0x57, 0x69, 0x9d, 0x3e, 0xc5, 0x1e, 0xb5, 0xad, 0x1d, 0x6a, 0x99, + 0xf6, 0xe3, 0x38, 0x7a, 0xbe, 0xdb, 0x29, 0xac, 0x54, 0x06, 0x52, 0xa1, 0x21, 0x08, 0xf0, 0x2e, + 0x98, 0x73, 0x49, 0x9d, 0x18, 0x9e, 0xb0, 0x57, 0xfa, 0xe5, 0x52, 0xb7, 0x53, 0x98, 0xab, 0x44, + 0xf6, 0xdf, 0x76, 0x0a, 0xa7, 0x62, 0x8e, 0x11, 0x87, 0x28, 0xc6, 0x0c, 0xff, 0x04, 0x66, 0x9a, + 0xec, 0x17, 0x25, 0x6e, 0x2e, 0xb5, 0x9a, 0x1e, 0x11, 0x21, 0x49, 0x5f, 0xeb, 0x4b, 0xd2, 0x4b, + 0x33, 0x65, 0x09, 0x82, 0x02, 0x38, 0xf5, 0x45, 0x0a, 0x9c, 0xbb, 0x63, 0x3b, 0xf4, 0x29, 0x4b, + 0xfe, 0x7a, 0xd9, 0x36, 0xd7, 0x24, 0x18, 0x71, 0xe0, 0x23, 0x30, 0xc3, 0x9a, 0x8c, 0x89, 0x3d, + 0x2c, 0x03, 0xf3, 0x97, 0x11, 0xb1, 0x41, 0xaf, 0xd0, 0x9a, 0xfb, 0x35, 0xb6, 0xe1, 0x6a, 0x8c, + 0x5a, 0x6b, 0x5f, 0xd3, 0x44, 0xbd, 0xd8, 0x22, 0x1e, 0x0e, 0x53, 0x3a, 0xdc, 0x43, 0x01, 0x2a, + 0xfc, 0x23, 0xc8, 0xb8, 0x4d, 0x62, 0xc8, 0x00, 0xbd, 0x31, 0xcc, 0xa8, 0xfe, 0x3a, 0x56, 0x9a, + 0xc4, 0x08, 0xcb, 0x0b, 0x5b, 0x21, 0x8e, 0x08, 0x1f, 0x81, 0x29, 0x97, 0x07, 0x32, 0xbf, 0xcb, + 0x6c, 0xe9, 0xe6, 0x3b, 0x60, 0x8b, 0x44, 0x08, 0xf2, 0x4b, 0xac, 0x91, 0xc4, 0x55, 0xbf, 0x54, + 0x40, 0x61, 0x00, 0xa7, 0x4e, 0xf6, 0x70, 0x9b, 0xda, 0x0e, 0xbc, 0x07, 0xa6, 0xf9, 0xce, 0x83, + 0xa6, 0x74, 0xe0, 0x95, 0x43, 0xdd, 0x1b, 0x0f, 0x51, 0x3d, 0xcb, 0xb2, 0xaf, 0x22, 0xd8, 0x91, + 0x8f, 0x03, 0x77, 0xc0, 0x2c, 0xff, 0x79, 0xdb, 0x7e, 0x6c, 0x49, 0xbf, 0x8d, 0x03, 0x3a, 0xcf, + 0x8a, 0x7e, 0xc5, 0x07, 0x40, 0x21, 0x96, 0xfa, 0xaf, 0x34, 0x58, 0x1d, 0x60, 0xcf, 0xba, 0x6d, + 0x99, 0x94, 0xc5, 0x38, 0xbc, 0x13, 0x4b, 0xf3, 0xeb, 0x89, 0x34, 0xbf, 0x38, 0x8a, 0x3f, 0x92, + 0xf6, 0x9b, 0xc1, 0x05, 0xa5, 0x62, 0x58, 0xd2, 0xcd, 0x6f, 0x3b, 0x85, 0x3e, 0x83, 0x95, 0x16, + 0x20, 0xc5, 0x2f, 0x03, 0xb6, 0x01, 0xac, 0x63, 0xd7, 0xbb, 0xef, 0x60, 0xcb, 0x15, 0x92, 0x68, + 0x83, 0xc8, 0xab, 0xbf, 0x72, 0xb8, 0xa0, 0x65, 0x1c, 0xfa, 0x8a, 0xd4, 0x02, 0x6e, 0xf6, 0xa0, + 0xa1, 0x3e, 0x12, 0xe0, 0x4f, 0xc1, 0x94, 0x43, 0xb0, 0x6b, 0x5b, 0xb9, 0x0c, 0xb7, 0x22, 0x08, + 0x16, 0xc4, 0x77, 0x91, 0x3c, 0x85, 0x3f, 0x03, 0xd3, 0x0d, 0xe2, 0xba, 0xb8, 0x46, 0x72, 0x93, + 0x9c, 0x30, 0x28, 0xaf, 0x5b, 0x62, 0x1b, 0xf9, 0xe7, 0xea, 0x57, 0x0a, 0x38, 0x3f, 0xc0, 0x8f, + 0x9b, 0xd4, 0xf5, 0xe0, 0x5f, 0x7a, 0xb2, 0x52, 0x3b, 0x9c, 0x81, 0x8c, 0x9b, 0xe7, 0x64, 0x50, + 0x0f, 0xfc, 0x9d, 0x48, 0x46, 0xee, 0x80, 0x49, 0xea, 0x91, 0x86, 0x5f, 0x67, 0x4a, 0xe3, 0xa7, + 0x4d, 0x58, 0xc1, 0x37, 0x18, 0x10, 0x12, 0x78, 0xea, 0x8b, 0xf4, 0x40, 0xb3, 0x58, 0xda, 0xc2, + 0x36, 0x58, 0xe0, 0x2b, 0xd9, 0x33, 0xc9, 0xae, 0x34, 0x6e, 0x58, 0x51, 0x18, 0x32, 0xa3, 0xe8, + 0x67, 0xa5, 0x16, 0x0b, 0x95, 0x18, 0x2a, 0x4a, 0x48, 0x81, 0xd7, 0x40, 0xb6, 0x41, 0x2d, 0x44, + 0x9a, 0x75, 0x6a, 0x60, 0x57, 0x36, 0xa1, 0xc5, 0x6e, 0xa7, 0x90, 0xdd, 0x0a, 0xb7, 0x51, 0x94, + 0x06, 0xfe, 0x1a, 0x64, 0x1b, 0xf8, 0x49, 0xc0, 0x22, 0x9a, 0xc5, 0x29, 0x29, 0x2f, 0xbb, 0x15, + 0x1e, 0xa1, 0x28, 0x1d, 0x2c, 0xb3, 0x18, 0x60, 0x6d, 0xd6, 0xcd, 0x65, 0xb8, 0x73, 0x7f, 0x32, + 0xb2, 0x21, 0xf3, 0xf2, 0x16, 0x09, 0x15, 0xce, 0x8d, 0x7c, 0x18, 0x68, 0x82, 0x99, 0xaa, 0x2c, + 0x35, 0x3c, 0xac, 0xb2, 0xa5, 0xdf, 0xbc, 0xc3, 0x7d, 0x49, 0x04, 0x7d, 0x8e, 0x85, 0x84, 0xbf, + 0x42, 0x01, 0xb2, 0xfa, 0x3c, 0x03, 0x2e, 0x0c, 0x2d, 0x91, 0xf0, 0x77, 0x00, 0xda, 0x55, 0x97, + 0x38, 0x6d, 0x62, 0xfe, 0x5e, 0x3c, 0x12, 0xd8, 0x4c, 0xc7, 0xee, 0x2f, 0xad, 0x9f, 0x65, 0xd9, + 0xb4, 0xdd, 0x73, 0x8a, 0xfa, 0x70, 0x40, 0x03, 0xcc, 0xb3, 0x1c, 0x13, 0x37, 0x46, 0xe5, 0xf8, + 0x38, 0x5e, 0x02, 0x2f, 0xb3, 0x69, 0x60, 0x33, 0x0a, 0x82, 0xe2, 0x98, 0x70, 0x0d, 0x2c, 0xca, + 0x49, 0x26, 0x71, 0x83, 0xe7, 0xa4, 0x9f, 0x17, 0xd7, 0xe3, 0xc7, 0x28, 0x49, 0xcf, 0x20, 0x4c, + 0xe2, 0x52, 0x87, 0x98, 0x01, 0x44, 0x26, 0x0e, 0x71, 0x3b, 0x7e, 0x8c, 0x92, 0xf4, 0xb0, 0x06, + 0x16, 0x24, 0xaa, 0xbc, 0xd5, 0xdc, 0x24, 0x8f, 0x89, 0xd1, 0x43, 0xa6, 0x6c, 0x4b, 0x41, 0x7c, + 0xaf, 0xc7, 0x60, 0x50, 0x02, 0x16, 0xda, 0x00, 0x18, 0x7e, 0xd1, 0x74, 0x73, 0x53, 0x5c, 0xc8, + 0xad, 0xf1, 0xa3, 0x24, 0x28, 0xbc, 0x61, 0x47, 0x0f, 0xb6, 0x5c, 0x14, 0x11, 0xa1, 0xfe, 0x57, + 0x01, 0x4b, 0xc9, 0x21, 0x35, 0x78, 0x0f, 0x28, 0x03, 0xdf, 0x03, 0x7f, 0x05, 0x33, 0x62, 0xe6, + 0xb1, 0x1d, 0x79, 0xed, 0xbf, 0x3a, 0x64, 0x59, 0xc3, 0x55, 0x52, 0xaf, 0x48, 0x56, 0x11, 0xc4, + 0xfe, 0x0a, 0x05, 0x90, 0xea, 0xb3, 0x0c, 0x00, 0x61, 0x4e, 0xc1, 0xeb, 0xb1, 0x3e, 0xb6, 0x9a, + 0xe8, 0x63, 0x4b, 0xd1, 0xc7, 0x45, 0xa4, 0x67, 0xdd, 0x03, 0x53, 0x36, 0x2f, 0x33, 0x52, 0xc3, + 0xab, 0x43, 0xfc, 0x18, 0xcc, 0x3b, 0x01, 0x90, 0x0e, 0x58, 0x63, 0x90, 0x75, 0x4a, 0x02, 0xc1, + 0x0d, 0x90, 0x69, 0xda, 0xa6, 0x3f, 0xa5, 0x0c, 0x1b, 0xeb, 0xca, 0xb6, 0xe9, 0xc6, 0xe0, 0x66, + 0x98, 0xc6, 0x6c, 0x17, 0x71, 0x08, 0x36, 0x25, 0xfa, 0x9f, 0x12, 0x78, 0x38, 0x66, 0x4b, 0xc5, + 0x21, 0x70, 0xfd, 0x1e, 0xec, 0xc2, 0x7b, 0xfe, 0x09, 0x0a, 0xe0, 0xe0, 0x3f, 0xc0, 0xb2, 0x91, + 0x7c, 0x00, 0xe7, 0xa6, 0x47, 0x0e, 0x56, 0x43, 0xbf, 0x0e, 0xe8, 0x67, 0xba, 0x9d, 0xc2, 0x72, + 0x0f, 0x09, 0xea, 0x95, 0xc4, 0x2c, 0x23, 0xf2, 0xdd, 0x24, 0xeb, 0xdc, 0x30, 0xcb, 0xfa, 0xbd, + 0x10, 0x85, 0x65, 0xfe, 0x09, 0x0a, 0xe0, 0xd4, 0xff, 0x65, 0xc0, 0x5c, 0xec, 0x2d, 0x76, 0xcc, + 0x91, 0x21, 0x92, 0xf9, 0xc8, 0x22, 0x43, 0xc0, 0x1d, 0x69, 0x64, 0x08, 0xc8, 0x63, 0x8a, 0x0c, + 0x21, 0xec, 0x98, 0x22, 0x23, 0x62, 0x59, 0x9f, 0xc8, 0xf8, 0x3c, 0xe5, 0x47, 0x86, 0x18, 0x16, + 0x0e, 0x17, 0x19, 0x82, 0x36, 0x12, 0x19, 0xdb, 0xd1, 0xe7, 0xed, 0x88, 0x59, 0x4d, 0xf3, 0xdd, + 0xaa, 0xdd, 0x6b, 0x61, 0xcb, 0xa3, 0xde, 0x81, 0x3e, 0xdb, 0xf3, 0x14, 0x36, 0xc1, 0x1c, 0x6e, + 0x13, 0x07, 0xd7, 0x08, 0xdf, 0x96, 0xf1, 0x31, 0x2e, 0xee, 0x12, 0x7b, 0x89, 0xae, 0x45, 0x70, + 0x50, 0x0c, 0x95, 0xb5, 0x74, 0xb9, 0x7e, 0xe0, 0x05, 0x4f, 0x5c, 0xd9, 0xe5, 0x78, 0x4b, 0x5f, + 0xeb, 0x39, 0x45, 0x7d, 0x38, 0xd4, 0xff, 0xa4, 0xc0, 0x72, 0xcf, 0xc7, 0x85, 0xd0, 0x29, 0xca, + 0x7b, 0x72, 0x4a, 0xea, 0x18, 0x9d, 0x92, 0x1e, 0xdb, 0x29, 0x1f, 0xa5, 0x00, 0xec, 0xed, 0x0f, + 0xf0, 0x80, 0x8f, 0x15, 0x86, 0x43, 0xab, 0xc4, 0x14, 0xc7, 0x3f, 0x70, 0x06, 0x8e, 0x8e, 0x23, + 0x51, 0x58, 0x94, 0x94, 0x73, 0xf4, 0x1f, 0x59, 0xc3, 0x4f, 0x5a, 0xe9, 0x23, 0xfb, 0xa4, 0xa5, + 0x7e, 0x9a, 0xf4, 0xdb, 0x09, 0xfc, 0x7c, 0xd6, 0xef, 0x96, 0xd3, 0xc7, 0x73, 0xcb, 0xea, 0xc7, + 0x0a, 0x58, 0x4a, 0x8e, 0x11, 0x27, 0xe4, 0xdb, 0xe9, 0x67, 0x71, 0xd5, 0x4f, 0xe2, 0x77, 0xd3, + 0xe7, 0x0a, 0x38, 0x7d, 0x72, 0xfe, 0x26, 0x51, 0x3f, 0xec, 0x55, 0xf7, 0x04, 0xfc, 0xd9, 0xa1, + 0x5f, 0x7e, 0xf9, 0x26, 0x3f, 0xf1, 0xea, 0x4d, 0x7e, 0xe2, 0xf5, 0x9b, 0xfc, 0xc4, 0x3f, 0xbb, + 0x79, 0xe5, 0x65, 0x37, 0xaf, 0xbc, 0xea, 0xe6, 0x95, 0xd7, 0xdd, 0xbc, 0xf2, 0x75, 0x37, 0xaf, + 0xfc, 0xfb, 0x9b, 0xfc, 0xc4, 0x9f, 0x53, 0xed, 0xd2, 0xf7, 0x01, 0x00, 0x00, 0xff, 0xff, 0x72, + 0xba, 0x02, 0x95, 0x47, 0x1c, 0x00, 0x00, } func (m *ContainerResourceMetricSource) Marshal() (dAtA []byte, err error) { diff --git a/staging/src/k8s.io/api/autoscaling/v2/generated.proto b/staging/src/k8s.io/api/autoscaling/v2/generated.proto index 77a6cb379eeb..e47d94a4767a 100644 --- a/staging/src/k8s.io/api/autoscaling/v2/generated.proto +++ b/staging/src/k8s.io/api/autoscaling/v2/generated.proto @@ -19,7 +19,7 @@ limitations under the License. syntax = "proto2"; -package k8s.io.api.autoscaling.v2beta2; +package k8s.io.api.autoscaling.v2; import "k8s.io/api/core/v1/generated.proto"; import "k8s.io/apimachinery/pkg/api/resource/generated.proto"; @@ -28,7 +28,7 @@ import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; // Package-wide variables from generator "generated". -option go_package = "v2beta2"; +option go_package = "v2"; // ContainerResourceMetricSource indicates how to scale on a resource metric known to // Kubernetes, as specified in requests and limits, describing each pod in the @@ -129,12 +129,13 @@ message HPAScalingRules { optional int32 stabilizationWindowSeconds = 3; // 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 Max is used. // +optional optional string selectPolicy = 1; // 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 + // +listType=atomic // +optional repeated HPAScalingPolicy policies = 2; } @@ -237,6 +238,7 @@ message HorizontalPodAutoscalerSpec { // increased, and vice-versa. See the individual metric source types for // more information about how each type of metric must respond. // If not set, the default metric will be set to 80% average CPU utilization. + // +listType=atomic // +optional repeated MetricSpec metrics = 4; @@ -260,6 +262,7 @@ message HorizontalPodAutoscalerStatus { // currentReplicas is current number of replicas of pods managed by this autoscaler, // as last seen by the autoscaler. + // +optional optional int32 currentReplicas = 3; // desiredReplicas is the desired number of replicas of pods managed by this autoscaler, @@ -267,11 +270,17 @@ message HorizontalPodAutoscalerStatus { optional int32 desiredReplicas = 4; // currentMetrics is the last read state of the metrics used by this autoscaler. + // +listType=atomic // +optional repeated MetricStatus currentMetrics = 5; // conditions is the set of conditions required for this autoscaler to scale its target, // and indicates whether or not those conditions are met. + // +patchMergeKey=type + // +patchStrategy=merge + // +listType=map + // +listMapKey=type + // +optional repeated HorizontalPodAutoscalerCondition conditions = 6; } @@ -315,7 +324,7 @@ message MetricSpec { // +optional 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 current scale target (e.g. CPU or memory). Such metrics are // built in to Kubernetes, and have special scaling options on top of those @@ -420,6 +429,7 @@ message MetricValueStatus { // ObjectMetricSource indicates how to scale on a metric describing a // kubernetes object (for example, hits-per-second on an Ingress object). message ObjectMetricSource { + // describedObject specifies the descriptions of a object,such as kind,name apiVersion optional CrossVersionObjectReference describedObject = 1; // target specifies the target value for the given metric @@ -438,6 +448,7 @@ message ObjectMetricStatus { // current contains the current value for the given metric optional MetricValueStatus current = 2; + // DescribedObject specifies the descriptions of a object,such as kind,name apiVersion optional CrossVersionObjectReference describedObject = 3; } diff --git a/staging/src/k8s.io/api/autoscaling/v2/register.go b/staging/src/k8s.io/api/autoscaling/v2/register.go index eb1265c168c7..20f9ea5bb87d 100644 --- a/staging/src/k8s.io/api/autoscaling/v2/register.go +++ b/staging/src/k8s.io/api/autoscaling/v2/register.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright 2021 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v2beta2 +package v2 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -26,7 +26,7 @@ import ( const GroupName = "autoscaling" // SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v2beta2"} +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v2"} // Resource takes an unqualified resource and returns a Group qualified GroupResource func Resource(resource string) schema.GroupResource { diff --git a/staging/src/k8s.io/api/autoscaling/v2/types.go b/staging/src/k8s.io/api/autoscaling/v2/types.go index ac6cb6769030..9931f6146b89 100644 --- a/staging/src/k8s.io/api/autoscaling/v2/types.go +++ b/staging/src/k8s.io/api/autoscaling/v2/types.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright 2021 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ limitations under the License. // +k8s:openapi-gen=true -package v2beta2 +package v2 import ( v1 "k8s.io/api/core/v1" @@ -26,8 +26,6 @@ import ( // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:prerelease-lifecycle-gen:introduced=1.12 -// +k8s:prerelease-lifecycle-gen:deprecated=1.22 // HorizontalPodAutoscaler is the configuration for a horizontal pod // autoscaler, which automatically manages the replica count of any resource @@ -72,6 +70,7 @@ type HorizontalPodAutoscalerSpec struct { // increased, and vice-versa. See the individual metric source types for // more information about how each type of metric must respond. // If not set, the default metric will be set to 80% average CPU utilization. + // +listType=atomic // +optional Metrics []MetricSpec `json:"metrics,omitempty" protobuf:"bytes,4,rep,name=metrics"` @@ -118,7 +117,7 @@ type MetricSpec struct { // to normal per-pod metrics using the "pods" source. // +optional 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 current scale target (e.g. CPU or memory). Such metrics are // built in to Kubernetes, and have special scaling options on top of those @@ -157,10 +156,10 @@ type HorizontalPodAutoscalerBehavior struct { type ScalingPolicySelect string const ( - // MaxPolicySelect selects the policy with the highest possible change. - MaxPolicySelect ScalingPolicySelect = "Max" - // MinPolicySelect selects the policy with the lowest possible change. - MinPolicySelect ScalingPolicySelect = "Min" + // MaxChangePolicySelect selects the policy with the highest possible change. + MaxChangePolicySelect ScalingPolicySelect = "Max" + // MinChangePolicySelect selects the policy with the lowest possible change. + MinChangePolicySelect ScalingPolicySelect = "Min" // DisabledPolicySelect disables the scaling in this direction. DisabledPolicySelect ScalingPolicySelect = "Disabled" ) @@ -181,13 +180,14 @@ type HPAScalingRules struct { // +optional StabilizationWindowSeconds *int32 `json:"stabilizationWindowSeconds,omitempty" protobuf:"varint,3,opt,name=stabilizationWindowSeconds"` // 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 Max is used. // +optional 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. // At least one policy must be specified, otherwise the HPAScalingRules will be discarded as invalid + // +listType=atomic // +optional - Policies []HPAScalingPolicy `json:"policies,omitempty" protobuf:"bytes,2,rep,name=policies"` + Policies []HPAScalingPolicy `json:"policies,omitempty" listType:"atomic" protobuf:"bytes,2,rep,name=policies"` } // HPAScalingPolicyType is the type of the policy which could be used while making scaling decisions. @@ -247,6 +247,7 @@ const ( // ObjectMetricSource indicates how to scale on a metric describing a // kubernetes object (for example, hits-per-second on an Ingress object). type ObjectMetricSource struct { + // describedObject specifies the descriptions of a object,such as kind,name apiVersion DescribedObject CrossVersionObjectReference `json:"describedObject" protobuf:"bytes,1,name=describedObject"` // target specifies the target value for the given metric Target MetricTarget `json:"target" protobuf:"bytes,2,name=target"` @@ -361,19 +362,26 @@ type HorizontalPodAutoscalerStatus struct { // currentReplicas is current number of replicas of pods managed by this autoscaler, // as last seen by the autoscaler. - CurrentReplicas int32 `json:"currentReplicas" protobuf:"varint,3,opt,name=currentReplicas"` + // +optional + CurrentReplicas int32 `json:"currentReplicas,omitempty" protobuf:"varint,3,opt,name=currentReplicas"` // desiredReplicas is the desired number of replicas of pods managed by this autoscaler, // as last calculated by the autoscaler. DesiredReplicas int32 `json:"desiredReplicas" protobuf:"varint,4,opt,name=desiredReplicas"` // currentMetrics is the last read state of the metrics used by this autoscaler. + // +listType=atomic // +optional CurrentMetrics []MetricStatus `json:"currentMetrics" protobuf:"bytes,5,rep,name=currentMetrics"` // conditions is the set of conditions required for this autoscaler to scale its target, // and indicates whether or not those conditions are met. - Conditions []HorizontalPodAutoscalerCondition `json:"conditions" protobuf:"bytes,6,rep,name=conditions"` + // +patchMergeKey=type + // +patchStrategy=merge + // +listType=map + // +listMapKey=type + // +optional + Conditions []HorizontalPodAutoscalerCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" listType:"map" protobuf:"bytes,6,rep,name=conditions"` } // HorizontalPodAutoscalerConditionType are the valid conditions of @@ -459,7 +467,7 @@ type ObjectMetricStatus struct { Metric MetricIdentifier `json:"metric" protobuf:"bytes,1,name=metric"` // current contains the current value for the given metric Current MetricValueStatus `json:"current" protobuf:"bytes,2,name=current"` - + // DescribedObject specifies the descriptions of a object,such as kind,name apiVersion DescribedObject CrossVersionObjectReference `json:"describedObject" protobuf:"bytes,3,name=describedObject"` } @@ -524,8 +532,6 @@ type MetricValueStatus struct { } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:prerelease-lifecycle-gen:introduced=1.12 -// +k8s:prerelease-lifecycle-gen:deprecated=1.22 // HorizontalPodAutoscalerList is a list of horizontal pod autoscaler objects. type HorizontalPodAutoscalerList struct { diff --git a/staging/src/k8s.io/api/autoscaling/v2/types_swagger_doc_generated.go b/staging/src/k8s.io/api/autoscaling/v2/types_swagger_doc_generated.go index e3ea3002bdd1..05355a5523a5 100644 --- a/staging/src/k8s.io/api/autoscaling/v2/types_swagger_doc_generated.go +++ b/staging/src/k8s.io/api/autoscaling/v2/types_swagger_doc_generated.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v2beta2 +package v2 // This file contains a collection of methods that can be used from go-restful to // generate Swagger API documentation for its models. Please read this PR for more @@ -94,7 +94,7 @@ func (HPAScalingPolicy) SwaggerDoc() 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.", "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 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", } @@ -189,7 +189,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).", "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.", - "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).", } @@ -235,9 +235,10 @@ func (MetricValueStatus) SwaggerDoc() map[string]string { } var map_ObjectMetricSource = map[string]string{ - "": "ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).", - "target": "target specifies the target value for the given metric", - "metric": "metric identifies the target metric by name and selector", + "": "ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).", + "describedObject": "describedObject specifies the descriptions of a object,such as kind,name apiVersion", + "target": "target specifies the target value for the given metric", + "metric": "metric identifies the target metric by name and selector", } func (ObjectMetricSource) SwaggerDoc() map[string]string { @@ -245,9 +246,10 @@ func (ObjectMetricSource) SwaggerDoc() map[string]string { } var map_ObjectMetricStatus = map[string]string{ - "": "ObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).", - "metric": "metric identifies the target metric by name and selector", - "current": "current contains the current value for the given metric", + "": "ObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).", + "metric": "metric identifies the target metric by name and selector", + "current": "current contains the current value for the given metric", + "describedObject": "DescribedObject specifies the descriptions of a object,such as kind,name apiVersion", } func (ObjectMetricStatus) SwaggerDoc() map[string]string { diff --git a/staging/src/k8s.io/api/autoscaling/v2/zz_generated.deepcopy.go b/staging/src/k8s.io/api/autoscaling/v2/zz_generated.deepcopy.go index 81642822a6a8..125708d6fdae 100644 --- a/staging/src/k8s.io/api/autoscaling/v2/zz_generated.deepcopy.go +++ b/staging/src/k8s.io/api/autoscaling/v2/zz_generated.deepcopy.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated /* @@ -18,7 +19,7 @@ limitations under the License. // Code generated by deepcopy-gen. DO NOT EDIT. -package v2beta2 +package v2 import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/staging/src/k8s.io/api/autoscaling/v2/zz_generated.prerelease-lifecycle.go b/staging/src/k8s.io/api/autoscaling/v2/zz_generated.prerelease-lifecycle.go deleted file mode 100644 index 83926e3a0f9d..000000000000 --- a/staging/src/k8s.io/api/autoscaling/v2/zz_generated.prerelease-lifecycle.go +++ /dev/null @@ -1,57 +0,0 @@ -// +build !ignore_autogenerated - -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by prerelease-lifecycle-gen. DO NOT EDIT. - -package v2beta2 - -// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. -func (in *HorizontalPodAutoscaler) APILifecycleIntroduced() (major, minor int) { - return 1, 12 -} - -// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. -func (in *HorizontalPodAutoscaler) APILifecycleDeprecated() (major, minor int) { - return 1, 22 -} - -// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. -func (in *HorizontalPodAutoscaler) APILifecycleRemoved() (major, minor int) { - return 1, 25 -} - -// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. -func (in *HorizontalPodAutoscalerList) APILifecycleIntroduced() (major, minor int) { - return 1, 12 -} - -// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. -func (in *HorizontalPodAutoscalerList) APILifecycleDeprecated() (major, minor int) { - return 1, 22 -} - -// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. -func (in *HorizontalPodAutoscalerList) APILifecycleRemoved() (major, minor int) { - return 1, 25 -} diff --git a/staging/src/k8s.io/api/testdata/HEAD/autoscaling.v2.HorizontalPodAutoscaler.json b/staging/src/k8s.io/api/testdata/HEAD/autoscaling.v2.HorizontalPodAutoscaler.json new file mode 100644 index 000000000000..d2090a8c79d0 --- /dev/null +++ b/staging/src/k8s.io/api/testdata/HEAD/autoscaling.v2.HorizontalPodAutoscaler.json @@ -0,0 +1,282 @@ +{ + "kind": "HorizontalPodAutoscaler", + "apiVersion": "autoscaling/v2", + "metadata": { + "name": "2", + "generateName": "3", + "namespace": "4", + "selfLink": "5", + "uid": "7", + "resourceVersion": "11042405498087606203", + "generation": 8071137005907523419, + "creationTimestamp": "2061-09-19T18:13:36Z", + "deletionGracePeriodSeconds": -4955867275792137171, + "labels": { + "7": "8" + }, + "annotations": { + "9": "10" + }, + "ownerReferences": [ + { + "apiVersion": "11", + "kind": "12", + "name": "13", + "uid": "Dz廔ȇ{sŊƏp", + "controller": false, + "blockOwnerDeletion": true + } + ], + "finalizers": [ + "14" + ], + "clusterName": "15", + "managedFields": [ + { + "manager": "16", + "operation": "鐊唊飙Ş-U圴÷a/ɔ}摁(湗Ć]", + "apiVersion": "17", + "fieldsType": "18", + "subresource": "19" + } + ] + }, + "spec": { + "scaleTargetRef": { + "kind": "20", + "name": "21", + "apiVersion": "22" + }, + "minReplicas": 896585016, + "maxReplicas": -1971381490, + "metrics": [ + { + "type": "枊a8衍`Ĩɘ.蘯6ċV夸eɑeʤ脽ě", + "object": { + "describedObject": { + "kind": "23", + "name": "24", + "apiVersion": "25" + }, + "target": { + "type": "凗蓏Ŋ蛊ĉy緅縕\u003eŽ", + "value": "309", + "averageValue": "39", + "averageUtilization": 1001983654 + }, + "metric": { + "name": "26", + "selector": { + "matchLabels": { + "QQ.N2.1.L.l-Y._.4": "0.d.__Gg8-2_kS91.e5K-_e63_-_3-n-_-__3u-.__G" + }, + "matchExpressions": [ + { + "key": "816m59-dx8----i--5-8t36b0/D7r__.am6-4_WE-_JTrcd-2.-__E_Sv__26KX_R7", + "operator": "DoesNotExist" + } + ] + } + } + }, + "pods": { + "metric": { + "name": "33", + "selector": { + "matchLabels": { + "8-10pq-0-7-9-2-ekg-071a-2y-y-o0-5q-21.6h/87_2fNc5-_.-RX-82_g50_uL": "6N_._a69" + }, + "matchExpressions": [ + { + "key": "w.__-___196-.dX_iv1H.__.h-J-M.9_T.q-o7.y-SQ.A", + "operator": "NotIn", + "values": [ + "0.N.-.Kj8..3s--_4..I_l...-ym-._k" + ] + } + ] + } + }, + "target": { + "type": "抴ŨfZhUʎ浵ɲõ", + "value": "303", + "averageValue": "800", + "averageUtilization": -1980941277 + } + }, + "resource": { + "name": "倱\u003c", + "target": { + "type": "ź贩j瀉", + "value": "621", + "averageValue": "404", + "averageUtilization": 580681683 + } + }, + "containerResource": { + "name": "Ɋł/擇ɦĽ胚O醔ɍ厶耈 ", + "target": { + "type": "禒Ƙá腿ħ缶.蒅", + "value": "999", + "averageValue": "151", + "averageUtilization": -1105572246 + }, + "container": "40" + }, + "external": { + "metric": { + "name": "41", + "selector": { + "matchLabels": { + "wcGnP-w-Sf5_O1": "1_70" + }, + "matchExpressions": [ + { + "key": "1-1-x1z-j4kh6oqu-or---40--87-1wp6.759s-3------6tv27r-m8w-6-9-35d383-iq-ay1z25-3-vj73d/Y.t--_0..--_6yV07-_.___gO-d.iUaCw", + "operator": "DoesNotExist" + } + ] + } + }, + "target": { + "type": "ʣy豎@ɀ羭,铻OŤ", + "value": "830", + "averageValue": "799", + "averageUtilization": 747521320 + } + } + } + ], + "behavior": { + "scaleUp": { + "stabilizationWindowSeconds": -648954478, + "selectPolicy": "Ƿ裚瓶釆Ɗ+j忊", + "policies": [ + { + "type": "ȫ焗捏ĨFħ籘Àǒɿʒ刽", + "value": 427196286, + "periodSeconds": 1048864116 + } + ] + }, + "scaleDown": { + "stabilizationWindowSeconds": -342705708, + "selectPolicy": "褎weLJèux", + "policies": [ + { + "type": "VƋZ1Ůđ眊ľǎɳ,ǿ飏", + "value": 2040455355, + "periodSeconds": 1505972335 + } + ] + } + } + }, + "status": { + "observedGeneration": -115578794491385044, + "currentReplicas": 474119379, + "desiredReplicas": 1923334396, + "currentMetrics": [ + { + "type": "0Ƹ[Ęİ榌U", + "object": { + "metric": { + "name": "48", + "selector": { + "matchLabels": { + "hA9..9__Y-H-Mqpt._.-_..05c.---qy-_5_S.d5a3Jb": "46g_4....1..jtFe8b_A_..P1s-V.9.4..9..c_uo3Pa__n-Di" + }, + "matchExpressions": [ + { + "key": "Dp665O_4Gj._BXt.O-7___-Y_um-_8r--684._-_188", + "operator": "NotIn", + "values": [ + "XK5._..O_.J_-G_--V-42E_--o90G_A4..-L..-__0N_N.O30-_u._-2T" + ] + } + ] + } + }, + "current": { + "value": "124", + "averageValue": "472", + "averageUtilization": -1666319281 + }, + "describedObject": { + "kind": "55", + "name": "56", + "apiVersion": "57" + } + }, + "pods": { + "metric": { + "name": "58", + "selector": { + "matchLabels": { + "5.-_--.VEa-_gn.8-c.3": "F._oX-F9_.5vN5.25aWx.2aM214_.-C" + }, + "matchExpressions": [ + { + "key": "4ds4-4tz9x--j.1l11q5--uk5mj-94-8134i5k6q6--5tu-tie4-7--gm4p-8y-9-te5/H._____K_g1cXfr.4_.-_-_-...1py_8-3..s._.x.2K_2qu_0S-CqWD", + "operator": "Exists" + } + ] + } + }, + "current": { + "value": "378", + "averageValue": "328", + "averageUtilization": -1050824692 + } + }, + "resource": { + "name": "反-n覦灲閈誹ʅ蕉ɼ搳ǭ濑箨ʨ", + "current": { + "value": "113", + "averageValue": "653", + "averageUtilization": 1190831814 + } + }, + "containerResource": { + "name": "腂ǂǚŜEuEy", + "current": { + "value": "77", + "averageValue": "394", + "averageUtilization": -1945921250 + }, + "container": "65" + }, + "external": { + "metric": { + "name": "66", + "selector": { + "matchLabels": { + "Tvw39F_C-rtSY.g._2F7.-_e..Or_-.3OHgt._U.-x_rC9..__-6_k.N-2B_Ve": "fh4.caTz_.g.w-o.8_WT-M.3_-1y_8E" + }, + "matchExpressions": [ + { + "key": "n_H-.___._D8.TS-jJ.Ys_Mop34_-2", + "operator": "DoesNotExist" + } + ] + } + }, + "current": { + "value": "444", + "averageValue": "797", + "averageUtilization": 1928526133 + } + } + } + ], + "conditions": [ + { + "type": "44矕", + "status": "ƱÁR»淹揀", + "lastTransitionTime": "2026-05-26T09:35:23Z", + "reason": "73", + "message": "74" + } + ] + } +} diff --git a/staging/src/k8s.io/api/testdata/HEAD/autoscaling.v2.HorizontalPodAutoscaler.pb b/staging/src/k8s.io/api/testdata/HEAD/autoscaling.v2.HorizontalPodAutoscaler.pb new file mode 100644 index 000000000000..cb8ed3c56802 Binary files /dev/null and b/staging/src/k8s.io/api/testdata/HEAD/autoscaling.v2.HorizontalPodAutoscaler.pb differ diff --git a/staging/src/k8s.io/api/testdata/HEAD/autoscaling.v2.HorizontalPodAutoscaler.yaml b/staging/src/k8s.io/api/testdata/HEAD/autoscaling.v2.HorizontalPodAutoscaler.yaml new file mode 100644 index 000000000000..750730466408 --- /dev/null +++ b/staging/src/k8s.io/api/testdata/HEAD/autoscaling.v2.HorizontalPodAutoscaler.yaml @@ -0,0 +1,189 @@ +apiVersion: autoscaling/v2 +kind: HorizontalPodAutoscaler +metadata: + annotations: + "9": "10" + clusterName: "15" + creationTimestamp: "2061-09-19T18:13:36Z" + deletionGracePeriodSeconds: -4955867275792137171 + finalizers: + - "14" + generateName: "3" + generation: 8071137005907523419 + labels: + "7": "8" + managedFields: + - apiVersion: "17" + fieldsType: "18" + manager: "16" + operation: 鐊唊飙Ş-U圴÷a/ɔ}摁(湗Ć] + subresource: "19" + name: "2" + namespace: "4" + ownerReferences: + - apiVersion: "11" + blockOwnerDeletion: true + controller: false + kind: "12" + name: "13" + uid: Dz廔ȇ{sŊƏp + resourceVersion: "11042405498087606203" + selfLink: "5" + uid: "7" +spec: + behavior: + scaleDown: + policies: + - periodSeconds: 1505972335 + type: VƋZ1Ůđ眊ľǎɳ,ǿ飏 + value: 2040455355 + selectPolicy: 褎weLJèux + stabilizationWindowSeconds: -342705708 + scaleUp: + policies: + - periodSeconds: 1048864116 + type: ȫ焗捏ĨFħ籘Àǒɿʒ刽 + value: 427196286 + selectPolicy: Ƿ裚瓶釆Ɗ+j忊 + stabilizationWindowSeconds: -648954478 + maxReplicas: -1971381490 + metrics: + - containerResource: + container: "40" + name: Ɋł/擇ɦĽ胚O醔ɍ厶耈  + target: + averageUtilization: -1105572246 + averageValue: "151" + type: 禒Ƙá腿ħ缶.蒅 + value: "999" + external: + metric: + name: "41" + selector: + matchExpressions: + - key: 1-1-x1z-j4kh6oqu-or---40--87-1wp6.759s-3------6tv27r-m8w-6-9-35d383-iq-ay1z25-3-vj73d/Y.t--_0..--_6yV07-_.___gO-d.iUaCw + operator: DoesNotExist + matchLabels: + wcGnP-w-Sf5_O1: "1_70" + target: + averageUtilization: 747521320 + averageValue: "799" + type: ʣy豎@ɀ羭,铻OŤ + value: "830" + object: + describedObject: + apiVersion: "25" + kind: "23" + name: "24" + metric: + name: "26" + selector: + matchExpressions: + - key: 816m59-dx8----i--5-8t36b0/D7r__.am6-4_WE-_JTrcd-2.-__E_Sv__26KX_R7 + operator: DoesNotExist + matchLabels: + QQ.N2.1.L.l-Y._.4: 0.d.__Gg8-2_kS91.e5K-_e63_-_3-n-_-__3u-.__G + target: + averageUtilization: 1001983654 + averageValue: "39" + type: 凗蓏Ŋ蛊ĉy緅縕>Ž + value: "309" + pods: + metric: + name: "33" + selector: + matchExpressions: + - key: w.__-___196-.dX_iv1H.__.h-J-M.9_T.q-o7.y-SQ.A + operator: NotIn + values: + - 0.N.-.Kj8..3s--_4..I_l...-ym-._k + matchLabels: + 8-10pq-0-7-9-2-ekg-071a-2y-y-o0-5q-21.6h/87_2fNc5-_.-RX-82_g50_uL: 6N_._a69 + target: + averageUtilization: -1980941277 + averageValue: "800" + type: 抴ŨfZhUʎ浵ɲõ + value: "303" + resource: + name: 倱< + target: + averageUtilization: 580681683 + averageValue: "404" + type: ź贩j瀉 + value: "621" + type: 枊a8衍`Ĩɘ.蘯6ċV夸eɑeʤ脽ě + minReplicas: 896585016 + scaleTargetRef: + apiVersion: "22" + kind: "20" + name: "21" +status: + conditions: + - lastTransitionTime: "2026-05-26T09:35:23Z" + message: "74" + reason: "73" + status: ƱÁR»淹揀 + type: 44矕 + currentMetrics: + - containerResource: + container: "65" + current: + averageUtilization: -1945921250 + averageValue: "394" + value: "77" + name: 腂ǂǚŜEuEy + external: + current: + averageUtilization: 1928526133 + averageValue: "797" + value: "444" + metric: + name: "66" + selector: + matchExpressions: + - key: n_H-.___._D8.TS-jJ.Ys_Mop34_-2 + operator: DoesNotExist + matchLabels: + Tvw39F_C-rtSY.g._2F7.-_e..Or_-.3OHgt._U.-x_rC9..__-6_k.N-2B_Ve: fh4.caTz_.g.w-o.8_WT-M.3_-1y_8E + object: + current: + averageUtilization: -1666319281 + averageValue: "472" + value: "124" + describedObject: + apiVersion: "57" + kind: "55" + name: "56" + metric: + name: "48" + selector: + matchExpressions: + - key: Dp665O_4Gj._BXt.O-7___-Y_um-_8r--684._-_188 + operator: NotIn + values: + - XK5._..O_.J_-G_--V-42E_--o90G_A4..-L..-__0N_N.O30-_u._-2T + matchLabels: + hA9..9__Y-H-Mqpt._.-_..05c.---qy-_5_S.d5a3Jb: 46g_4....1..jtFe8b_A_..P1s-V.9.4..9..c_uo3Pa__n-Di + pods: + current: + averageUtilization: -1050824692 + averageValue: "328" + value: "378" + metric: + name: "58" + selector: + matchExpressions: + - key: 4ds4-4tz9x--j.1l11q5--uk5mj-94-8134i5k6q6--5tu-tie4-7--gm4p-8y-9-te5/H._____K_g1cXfr.4_.-_-_-...1py_8-3..s._.x.2K_2qu_0S-CqWD + operator: Exists + matchLabels: + 5.-_--.VEa-_gn.8-c.3: F._oX-F9_.5vN5.25aWx.2aM214_.-C + resource: + current: + averageUtilization: 1190831814 + averageValue: "653" + value: "113" + name: 反-n覦灲閈誹ʅ蕉ɼ搳ǭ濑箨ʨ + type: 0Ƹ[Ęİ榌U + currentReplicas: 474119379 + desiredReplicas: 1923334396 + observedGeneration: -115578794491385044 diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/containerresourcemetricsource.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/containerresourcemetricsource.go new file mode 100644 index 000000000000..15ef216d1bc9 --- /dev/null +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/containerresourcemetricsource.go @@ -0,0 +1,61 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v2 + +import ( + v1 "k8s.io/api/core/v1" +) + +// ContainerResourceMetricSourceApplyConfiguration represents an declarative configuration of the ContainerResourceMetricSource type for use +// with apply. +type ContainerResourceMetricSourceApplyConfiguration struct { + Name *v1.ResourceName `json:"name,omitempty"` + Target *MetricTargetApplyConfiguration `json:"target,omitempty"` + Container *string `json:"container,omitempty"` +} + +// ContainerResourceMetricSourceApplyConfiguration constructs an declarative configuration of the ContainerResourceMetricSource type for use with +// apply. +func ContainerResourceMetricSource() *ContainerResourceMetricSourceApplyConfiguration { + return &ContainerResourceMetricSourceApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *ContainerResourceMetricSourceApplyConfiguration) WithName(value v1.ResourceName) *ContainerResourceMetricSourceApplyConfiguration { + b.Name = &value + return b +} + +// WithTarget sets the Target field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Target field is set to the value of the last call. +func (b *ContainerResourceMetricSourceApplyConfiguration) WithTarget(value *MetricTargetApplyConfiguration) *ContainerResourceMetricSourceApplyConfiguration { + b.Target = value + return b +} + +// WithContainer sets the Container field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Container field is set to the value of the last call. +func (b *ContainerResourceMetricSourceApplyConfiguration) WithContainer(value string) *ContainerResourceMetricSourceApplyConfiguration { + b.Container = &value + return b +} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/containerresourcemetricstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/containerresourcemetricstatus.go new file mode 100644 index 000000000000..34213bca3f4c --- /dev/null +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/containerresourcemetricstatus.go @@ -0,0 +1,61 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v2 + +import ( + v1 "k8s.io/api/core/v1" +) + +// ContainerResourceMetricStatusApplyConfiguration represents an declarative configuration of the ContainerResourceMetricStatus type for use +// with apply. +type ContainerResourceMetricStatusApplyConfiguration struct { + Name *v1.ResourceName `json:"name,omitempty"` + Current *MetricValueStatusApplyConfiguration `json:"current,omitempty"` + Container *string `json:"container,omitempty"` +} + +// ContainerResourceMetricStatusApplyConfiguration constructs an declarative configuration of the ContainerResourceMetricStatus type for use with +// apply. +func ContainerResourceMetricStatus() *ContainerResourceMetricStatusApplyConfiguration { + return &ContainerResourceMetricStatusApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *ContainerResourceMetricStatusApplyConfiguration) WithName(value v1.ResourceName) *ContainerResourceMetricStatusApplyConfiguration { + b.Name = &value + return b +} + +// WithCurrent sets the Current field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Current field is set to the value of the last call. +func (b *ContainerResourceMetricStatusApplyConfiguration) WithCurrent(value *MetricValueStatusApplyConfiguration) *ContainerResourceMetricStatusApplyConfiguration { + b.Current = value + return b +} + +// WithContainer sets the Container field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Container field is set to the value of the last call. +func (b *ContainerResourceMetricStatusApplyConfiguration) WithContainer(value string) *ContainerResourceMetricStatusApplyConfiguration { + b.Container = &value + return b +} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/crossversionobjectreference.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/crossversionobjectreference.go new file mode 100644 index 000000000000..19045706dc8c --- /dev/null +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/crossversionobjectreference.go @@ -0,0 +1,57 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v2 + +// CrossVersionObjectReferenceApplyConfiguration represents an declarative configuration of the CrossVersionObjectReference type for use +// with apply. +type CrossVersionObjectReferenceApplyConfiguration struct { + Kind *string `json:"kind,omitempty"` + Name *string `json:"name,omitempty"` + APIVersion *string `json:"apiVersion,omitempty"` +} + +// CrossVersionObjectReferenceApplyConfiguration constructs an declarative configuration of the CrossVersionObjectReference type for use with +// apply. +func CrossVersionObjectReference() *CrossVersionObjectReferenceApplyConfiguration { + return &CrossVersionObjectReferenceApplyConfiguration{} +} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *CrossVersionObjectReferenceApplyConfiguration) WithKind(value string) *CrossVersionObjectReferenceApplyConfiguration { + b.Kind = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *CrossVersionObjectReferenceApplyConfiguration) WithName(value string) *CrossVersionObjectReferenceApplyConfiguration { + b.Name = &value + return b +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *CrossVersionObjectReferenceApplyConfiguration) WithAPIVersion(value string) *CrossVersionObjectReferenceApplyConfiguration { + b.APIVersion = &value + return b +} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/externalmetricsource.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/externalmetricsource.go new file mode 100644 index 000000000000..11a8eff263d5 --- /dev/null +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/externalmetricsource.go @@ -0,0 +1,48 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v2 + +// ExternalMetricSourceApplyConfiguration represents an declarative configuration of the ExternalMetricSource type for use +// with apply. +type ExternalMetricSourceApplyConfiguration struct { + Metric *MetricIdentifierApplyConfiguration `json:"metric,omitempty"` + Target *MetricTargetApplyConfiguration `json:"target,omitempty"` +} + +// ExternalMetricSourceApplyConfiguration constructs an declarative configuration of the ExternalMetricSource type for use with +// apply. +func ExternalMetricSource() *ExternalMetricSourceApplyConfiguration { + return &ExternalMetricSourceApplyConfiguration{} +} + +// WithMetric sets the Metric field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Metric field is set to the value of the last call. +func (b *ExternalMetricSourceApplyConfiguration) WithMetric(value *MetricIdentifierApplyConfiguration) *ExternalMetricSourceApplyConfiguration { + b.Metric = value + return b +} + +// WithTarget sets the Target field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Target field is set to the value of the last call. +func (b *ExternalMetricSourceApplyConfiguration) WithTarget(value *MetricTargetApplyConfiguration) *ExternalMetricSourceApplyConfiguration { + b.Target = value + return b +} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/externalmetricstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/externalmetricstatus.go new file mode 100644 index 000000000000..3b1a0329b81a --- /dev/null +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/externalmetricstatus.go @@ -0,0 +1,48 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v2 + +// ExternalMetricStatusApplyConfiguration represents an declarative configuration of the ExternalMetricStatus type for use +// with apply. +type ExternalMetricStatusApplyConfiguration struct { + Metric *MetricIdentifierApplyConfiguration `json:"metric,omitempty"` + Current *MetricValueStatusApplyConfiguration `json:"current,omitempty"` +} + +// ExternalMetricStatusApplyConfiguration constructs an declarative configuration of the ExternalMetricStatus type for use with +// apply. +func ExternalMetricStatus() *ExternalMetricStatusApplyConfiguration { + return &ExternalMetricStatusApplyConfiguration{} +} + +// WithMetric sets the Metric field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Metric field is set to the value of the last call. +func (b *ExternalMetricStatusApplyConfiguration) WithMetric(value *MetricIdentifierApplyConfiguration) *ExternalMetricStatusApplyConfiguration { + b.Metric = value + return b +} + +// WithCurrent sets the Current field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Current field is set to the value of the last call. +func (b *ExternalMetricStatusApplyConfiguration) WithCurrent(value *MetricValueStatusApplyConfiguration) *ExternalMetricStatusApplyConfiguration { + b.Current = value + return b +} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/horizontalpodautoscaler.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/horizontalpodautoscaler.go new file mode 100644 index 000000000000..af805488ecc7 --- /dev/null +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/horizontalpodautoscaler.go @@ -0,0 +1,276 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v2 + +import ( + autoscalingv2 "k8s.io/api/autoscaling/v2" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + managedfields "k8s.io/apimachinery/pkg/util/managedfields" + internal "k8s.io/client-go/applyconfigurations/internal" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// HorizontalPodAutoscalerApplyConfiguration represents an declarative configuration of the HorizontalPodAutoscaler type for use +// with apply. +type HorizontalPodAutoscalerApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *HorizontalPodAutoscalerSpecApplyConfiguration `json:"spec,omitempty"` + Status *HorizontalPodAutoscalerStatusApplyConfiguration `json:"status,omitempty"` +} + +// HorizontalPodAutoscaler constructs an declarative configuration of the HorizontalPodAutoscaler type for use with +// apply. +func HorizontalPodAutoscaler(name, namespace string) *HorizontalPodAutoscalerApplyConfiguration { + b := &HorizontalPodAutoscalerApplyConfiguration{} + b.WithName(name) + b.WithNamespace(namespace) + b.WithKind("HorizontalPodAutoscaler") + b.WithAPIVersion("autoscaling/v2") + return b +} + +// ExtractHorizontalPodAutoscaler extracts the applied configuration owned by fieldManager from +// horizontalPodAutoscaler. If no managedFields are found in horizontalPodAutoscaler for fieldManager, a +// HorizontalPodAutoscalerApplyConfiguration is returned with only the Name, Namespace (if applicable), +// APIVersion and Kind populated. It is possible that no managed fields were found for because other +// field managers have taken ownership of all the fields previously owned by fieldManager, or because +// the fieldManager never owned fields any fields. +// horizontalPodAutoscaler must be a unmodified HorizontalPodAutoscaler API object that was retrieved from the Kubernetes API. +// ExtractHorizontalPodAutoscaler provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +// Experimental! +func ExtractHorizontalPodAutoscaler(horizontalPodAutoscaler *autoscalingv2.HorizontalPodAutoscaler, fieldManager string) (*HorizontalPodAutoscalerApplyConfiguration, error) { + return extractHorizontalPodAutoscaler(horizontalPodAutoscaler, fieldManager, "") +} + +// ExtractHorizontalPodAutoscalerStatus is the same as ExtractHorizontalPodAutoscaler except +// that it extracts the status subresource applied configuration. +// Experimental! +func ExtractHorizontalPodAutoscalerStatus(horizontalPodAutoscaler *autoscalingv2.HorizontalPodAutoscaler, fieldManager string) (*HorizontalPodAutoscalerApplyConfiguration, error) { + return extractHorizontalPodAutoscaler(horizontalPodAutoscaler, fieldManager, "status") +} + +func extractHorizontalPodAutoscaler(horizontalPodAutoscaler *autoscalingv2.HorizontalPodAutoscaler, fieldManager string, subresource string) (*HorizontalPodAutoscalerApplyConfiguration, error) { + b := &HorizontalPodAutoscalerApplyConfiguration{} + err := managedfields.ExtractInto(horizontalPodAutoscaler, internal.Parser().Type("io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(horizontalPodAutoscaler.Name) + b.WithNamespace(horizontalPodAutoscaler.Namespace) + + b.WithKind("HorizontalPodAutoscaler") + b.WithAPIVersion("autoscaling/v2") + return b, nil +} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *HorizontalPodAutoscalerApplyConfiguration) WithKind(value string) *HorizontalPodAutoscalerApplyConfiguration { + b.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *HorizontalPodAutoscalerApplyConfiguration) WithAPIVersion(value string) *HorizontalPodAutoscalerApplyConfiguration { + b.APIVersion = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *HorizontalPodAutoscalerApplyConfiguration) WithName(value string) *HorizontalPodAutoscalerApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Name = &value + return b +} + +// WithGenerateName sets the GenerateName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GenerateName field is set to the value of the last call. +func (b *HorizontalPodAutoscalerApplyConfiguration) WithGenerateName(value string) *HorizontalPodAutoscalerApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *HorizontalPodAutoscalerApplyConfiguration) WithNamespace(value string) *HorizontalPodAutoscalerApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Namespace = &value + return b +} + +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *HorizontalPodAutoscalerApplyConfiguration) WithSelfLink(value string) *HorizontalPodAutoscalerApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + +// WithUID sets the UID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UID field is set to the value of the last call. +func (b *HorizontalPodAutoscalerApplyConfiguration) WithUID(value types.UID) *HorizontalPodAutoscalerApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *HorizontalPodAutoscalerApplyConfiguration) WithResourceVersion(value string) *HorizontalPodAutoscalerApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *HorizontalPodAutoscalerApplyConfiguration) WithGeneration(value int64) *HorizontalPodAutoscalerApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CreationTimestamp field is set to the value of the last call. +func (b *HorizontalPodAutoscalerApplyConfiguration) WithCreationTimestamp(value metav1.Time) *HorizontalPodAutoscalerApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionTimestamp field is set to the value of the last call. +func (b *HorizontalPodAutoscalerApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *HorizontalPodAutoscalerApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *HorizontalPodAutoscalerApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *HorizontalPodAutoscalerApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *HorizontalPodAutoscalerApplyConfiguration) WithLabels(entries map[string]string) *HorizontalPodAutoscalerApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *HorizontalPodAutoscalerApplyConfiguration) WithAnnotations(entries map[string]string) *HorizontalPodAutoscalerApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *HorizontalPodAutoscalerApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *HorizontalPodAutoscalerApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.OwnerReferences = append(b.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *HorizontalPodAutoscalerApplyConfiguration) WithFinalizers(values ...string) *HorizontalPodAutoscalerApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.Finalizers = append(b.Finalizers, values[i]) + } + return b +} + +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *HorizontalPodAutoscalerApplyConfiguration) WithClusterName(value string) *HorizontalPodAutoscalerApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + +func (b *HorizontalPodAutoscalerApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithSpec sets the Spec field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Spec field is set to the value of the last call. +func (b *HorizontalPodAutoscalerApplyConfiguration) WithSpec(value *HorizontalPodAutoscalerSpecApplyConfiguration) *HorizontalPodAutoscalerApplyConfiguration { + b.Spec = value + return b +} + +// WithStatus sets the Status field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Status field is set to the value of the last call. +func (b *HorizontalPodAutoscalerApplyConfiguration) WithStatus(value *HorizontalPodAutoscalerStatusApplyConfiguration) *HorizontalPodAutoscalerApplyConfiguration { + b.Status = value + return b +} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/horizontalpodautoscalerbehavior.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/horizontalpodautoscalerbehavior.go new file mode 100644 index 000000000000..e6fdabd7c88b --- /dev/null +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/horizontalpodautoscalerbehavior.go @@ -0,0 +1,48 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v2 + +// HorizontalPodAutoscalerBehaviorApplyConfiguration represents an declarative configuration of the HorizontalPodAutoscalerBehavior type for use +// with apply. +type HorizontalPodAutoscalerBehaviorApplyConfiguration struct { + ScaleUp *HPAScalingRulesApplyConfiguration `json:"scaleUp,omitempty"` + ScaleDown *HPAScalingRulesApplyConfiguration `json:"scaleDown,omitempty"` +} + +// HorizontalPodAutoscalerBehaviorApplyConfiguration constructs an declarative configuration of the HorizontalPodAutoscalerBehavior type for use with +// apply. +func HorizontalPodAutoscalerBehavior() *HorizontalPodAutoscalerBehaviorApplyConfiguration { + return &HorizontalPodAutoscalerBehaviorApplyConfiguration{} +} + +// WithScaleUp sets the ScaleUp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ScaleUp field is set to the value of the last call. +func (b *HorizontalPodAutoscalerBehaviorApplyConfiguration) WithScaleUp(value *HPAScalingRulesApplyConfiguration) *HorizontalPodAutoscalerBehaviorApplyConfiguration { + b.ScaleUp = value + return b +} + +// WithScaleDown sets the ScaleDown field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ScaleDown field is set to the value of the last call. +func (b *HorizontalPodAutoscalerBehaviorApplyConfiguration) WithScaleDown(value *HPAScalingRulesApplyConfiguration) *HorizontalPodAutoscalerBehaviorApplyConfiguration { + b.ScaleDown = value + return b +} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/horizontalpodautoscalercondition.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/horizontalpodautoscalercondition.go new file mode 100644 index 000000000000..c020eccd3d6d --- /dev/null +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/horizontalpodautoscalercondition.go @@ -0,0 +1,81 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v2 + +import ( + v2 "k8s.io/api/autoscaling/v2" + v1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// HorizontalPodAutoscalerConditionApplyConfiguration represents an declarative configuration of the HorizontalPodAutoscalerCondition type for use +// with apply. +type HorizontalPodAutoscalerConditionApplyConfiguration struct { + Type *v2.HorizontalPodAutoscalerConditionType `json:"type,omitempty"` + Status *v1.ConditionStatus `json:"status,omitempty"` + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` + Reason *string `json:"reason,omitempty"` + Message *string `json:"message,omitempty"` +} + +// HorizontalPodAutoscalerConditionApplyConfiguration constructs an declarative configuration of the HorizontalPodAutoscalerCondition type for use with +// apply. +func HorizontalPodAutoscalerCondition() *HorizontalPodAutoscalerConditionApplyConfiguration { + return &HorizontalPodAutoscalerConditionApplyConfiguration{} +} + +// WithType sets the Type field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Type field is set to the value of the last call. +func (b *HorizontalPodAutoscalerConditionApplyConfiguration) WithType(value v2.HorizontalPodAutoscalerConditionType) *HorizontalPodAutoscalerConditionApplyConfiguration { + b.Type = &value + return b +} + +// WithStatus sets the Status field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Status field is set to the value of the last call. +func (b *HorizontalPodAutoscalerConditionApplyConfiguration) WithStatus(value v1.ConditionStatus) *HorizontalPodAutoscalerConditionApplyConfiguration { + b.Status = &value + return b +} + +// WithLastTransitionTime sets the LastTransitionTime field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the LastTransitionTime field is set to the value of the last call. +func (b *HorizontalPodAutoscalerConditionApplyConfiguration) WithLastTransitionTime(value metav1.Time) *HorizontalPodAutoscalerConditionApplyConfiguration { + b.LastTransitionTime = &value + return b +} + +// WithReason sets the Reason field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Reason field is set to the value of the last call. +func (b *HorizontalPodAutoscalerConditionApplyConfiguration) WithReason(value string) *HorizontalPodAutoscalerConditionApplyConfiguration { + b.Reason = &value + return b +} + +// WithMessage sets the Message field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Message field is set to the value of the last call. +func (b *HorizontalPodAutoscalerConditionApplyConfiguration) WithMessage(value string) *HorizontalPodAutoscalerConditionApplyConfiguration { + b.Message = &value + return b +} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/horizontalpodautoscalerspec.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/horizontalpodautoscalerspec.go new file mode 100644 index 000000000000..c36bc3f225c2 --- /dev/null +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/horizontalpodautoscalerspec.go @@ -0,0 +1,80 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v2 + +// HorizontalPodAutoscalerSpecApplyConfiguration represents an declarative configuration of the HorizontalPodAutoscalerSpec type for use +// with apply. +type HorizontalPodAutoscalerSpecApplyConfiguration struct { + ScaleTargetRef *CrossVersionObjectReferenceApplyConfiguration `json:"scaleTargetRef,omitempty"` + MinReplicas *int32 `json:"minReplicas,omitempty"` + MaxReplicas *int32 `json:"maxReplicas,omitempty"` + Metrics []MetricSpecApplyConfiguration `json:"metrics,omitempty"` + Behavior *HorizontalPodAutoscalerBehaviorApplyConfiguration `json:"behavior,omitempty"` +} + +// HorizontalPodAutoscalerSpecApplyConfiguration constructs an declarative configuration of the HorizontalPodAutoscalerSpec type for use with +// apply. +func HorizontalPodAutoscalerSpec() *HorizontalPodAutoscalerSpecApplyConfiguration { + return &HorizontalPodAutoscalerSpecApplyConfiguration{} +} + +// WithScaleTargetRef sets the ScaleTargetRef field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ScaleTargetRef field is set to the value of the last call. +func (b *HorizontalPodAutoscalerSpecApplyConfiguration) WithScaleTargetRef(value *CrossVersionObjectReferenceApplyConfiguration) *HorizontalPodAutoscalerSpecApplyConfiguration { + b.ScaleTargetRef = value + return b +} + +// WithMinReplicas sets the MinReplicas field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the MinReplicas field is set to the value of the last call. +func (b *HorizontalPodAutoscalerSpecApplyConfiguration) WithMinReplicas(value int32) *HorizontalPodAutoscalerSpecApplyConfiguration { + b.MinReplicas = &value + return b +} + +// WithMaxReplicas sets the MaxReplicas field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the MaxReplicas field is set to the value of the last call. +func (b *HorizontalPodAutoscalerSpecApplyConfiguration) WithMaxReplicas(value int32) *HorizontalPodAutoscalerSpecApplyConfiguration { + b.MaxReplicas = &value + return b +} + +// WithMetrics adds the given value to the Metrics field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Metrics field. +func (b *HorizontalPodAutoscalerSpecApplyConfiguration) WithMetrics(values ...*MetricSpecApplyConfiguration) *HorizontalPodAutoscalerSpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithMetrics") + } + b.Metrics = append(b.Metrics, *values[i]) + } + return b +} + +// WithBehavior sets the Behavior field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Behavior field is set to the value of the last call. +func (b *HorizontalPodAutoscalerSpecApplyConfiguration) WithBehavior(value *HorizontalPodAutoscalerBehaviorApplyConfiguration) *HorizontalPodAutoscalerSpecApplyConfiguration { + b.Behavior = value + return b +} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/horizontalpodautoscalerstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/horizontalpodautoscalerstatus.go new file mode 100644 index 000000000000..d4d551df8561 --- /dev/null +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/horizontalpodautoscalerstatus.go @@ -0,0 +1,98 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v2 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// HorizontalPodAutoscalerStatusApplyConfiguration represents an declarative configuration of the HorizontalPodAutoscalerStatus type for use +// with apply. +type HorizontalPodAutoscalerStatusApplyConfiguration struct { + ObservedGeneration *int64 `json:"observedGeneration,omitempty"` + LastScaleTime *v1.Time `json:"lastScaleTime,omitempty"` + CurrentReplicas *int32 `json:"currentReplicas,omitempty"` + DesiredReplicas *int32 `json:"desiredReplicas,omitempty"` + CurrentMetrics []MetricStatusApplyConfiguration `json:"currentMetrics,omitempty"` + Conditions []HorizontalPodAutoscalerConditionApplyConfiguration `json:"conditions,omitempty"` +} + +// HorizontalPodAutoscalerStatusApplyConfiguration constructs an declarative configuration of the HorizontalPodAutoscalerStatus type for use with +// apply. +func HorizontalPodAutoscalerStatus() *HorizontalPodAutoscalerStatusApplyConfiguration { + return &HorizontalPodAutoscalerStatusApplyConfiguration{} +} + +// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ObservedGeneration field is set to the value of the last call. +func (b *HorizontalPodAutoscalerStatusApplyConfiguration) WithObservedGeneration(value int64) *HorizontalPodAutoscalerStatusApplyConfiguration { + b.ObservedGeneration = &value + return b +} + +// WithLastScaleTime sets the LastScaleTime field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the LastScaleTime field is set to the value of the last call. +func (b *HorizontalPodAutoscalerStatusApplyConfiguration) WithLastScaleTime(value v1.Time) *HorizontalPodAutoscalerStatusApplyConfiguration { + b.LastScaleTime = &value + return b +} + +// WithCurrentReplicas sets the CurrentReplicas field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CurrentReplicas field is set to the value of the last call. +func (b *HorizontalPodAutoscalerStatusApplyConfiguration) WithCurrentReplicas(value int32) *HorizontalPodAutoscalerStatusApplyConfiguration { + b.CurrentReplicas = &value + return b +} + +// WithDesiredReplicas sets the DesiredReplicas field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DesiredReplicas field is set to the value of the last call. +func (b *HorizontalPodAutoscalerStatusApplyConfiguration) WithDesiredReplicas(value int32) *HorizontalPodAutoscalerStatusApplyConfiguration { + b.DesiredReplicas = &value + return b +} + +// WithCurrentMetrics adds the given value to the CurrentMetrics field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the CurrentMetrics field. +func (b *HorizontalPodAutoscalerStatusApplyConfiguration) WithCurrentMetrics(values ...*MetricStatusApplyConfiguration) *HorizontalPodAutoscalerStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithCurrentMetrics") + } + b.CurrentMetrics = append(b.CurrentMetrics, *values[i]) + } + return b +} + +// WithConditions adds the given value to the Conditions field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Conditions field. +func (b *HorizontalPodAutoscalerStatusApplyConfiguration) WithConditions(values ...*HorizontalPodAutoscalerConditionApplyConfiguration) *HorizontalPodAutoscalerStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithConditions") + } + b.Conditions = append(b.Conditions, *values[i]) + } + return b +} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/hpascalingpolicy.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/hpascalingpolicy.go new file mode 100644 index 000000000000..139f0fb5c75d --- /dev/null +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/hpascalingpolicy.go @@ -0,0 +1,61 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v2 + +import ( + v2 "k8s.io/api/autoscaling/v2" +) + +// HPAScalingPolicyApplyConfiguration represents an declarative configuration of the HPAScalingPolicy type for use +// with apply. +type HPAScalingPolicyApplyConfiguration struct { + Type *v2.HPAScalingPolicyType `json:"type,omitempty"` + Value *int32 `json:"value,omitempty"` + PeriodSeconds *int32 `json:"periodSeconds,omitempty"` +} + +// HPAScalingPolicyApplyConfiguration constructs an declarative configuration of the HPAScalingPolicy type for use with +// apply. +func HPAScalingPolicy() *HPAScalingPolicyApplyConfiguration { + return &HPAScalingPolicyApplyConfiguration{} +} + +// WithType sets the Type field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Type field is set to the value of the last call. +func (b *HPAScalingPolicyApplyConfiguration) WithType(value v2.HPAScalingPolicyType) *HPAScalingPolicyApplyConfiguration { + b.Type = &value + return b +} + +// WithValue sets the Value field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Value field is set to the value of the last call. +func (b *HPAScalingPolicyApplyConfiguration) WithValue(value int32) *HPAScalingPolicyApplyConfiguration { + b.Value = &value + return b +} + +// WithPeriodSeconds sets the PeriodSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the PeriodSeconds field is set to the value of the last call. +func (b *HPAScalingPolicyApplyConfiguration) WithPeriodSeconds(value int32) *HPAScalingPolicyApplyConfiguration { + b.PeriodSeconds = &value + return b +} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/hpascalingrules.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/hpascalingrules.go new file mode 100644 index 000000000000..e768076aa4a0 --- /dev/null +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/hpascalingrules.go @@ -0,0 +1,66 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v2 + +import ( + v2 "k8s.io/api/autoscaling/v2" +) + +// HPAScalingRulesApplyConfiguration represents an declarative configuration of the HPAScalingRules type for use +// with apply. +type HPAScalingRulesApplyConfiguration struct { + StabilizationWindowSeconds *int32 `json:"stabilizationWindowSeconds,omitempty"` + SelectPolicy *v2.ScalingPolicySelect `json:"selectPolicy,omitempty"` + Policies []HPAScalingPolicyApplyConfiguration `json:"policies,omitempty"` +} + +// HPAScalingRulesApplyConfiguration constructs an declarative configuration of the HPAScalingRules type for use with +// apply. +func HPAScalingRules() *HPAScalingRulesApplyConfiguration { + return &HPAScalingRulesApplyConfiguration{} +} + +// WithStabilizationWindowSeconds sets the StabilizationWindowSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the StabilizationWindowSeconds field is set to the value of the last call. +func (b *HPAScalingRulesApplyConfiguration) WithStabilizationWindowSeconds(value int32) *HPAScalingRulesApplyConfiguration { + b.StabilizationWindowSeconds = &value + return b +} + +// WithSelectPolicy sets the SelectPolicy field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelectPolicy field is set to the value of the last call. +func (b *HPAScalingRulesApplyConfiguration) WithSelectPolicy(value v2.ScalingPolicySelect) *HPAScalingRulesApplyConfiguration { + b.SelectPolicy = &value + return b +} + +// WithPolicies adds the given value to the Policies field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Policies field. +func (b *HPAScalingRulesApplyConfiguration) WithPolicies(values ...*HPAScalingPolicyApplyConfiguration) *HPAScalingRulesApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithPolicies") + } + b.Policies = append(b.Policies, *values[i]) + } + return b +} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/metricidentifier.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/metricidentifier.go new file mode 100644 index 000000000000..312ad3ddd6a2 --- /dev/null +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/metricidentifier.go @@ -0,0 +1,52 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v2 + +import ( + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// MetricIdentifierApplyConfiguration represents an declarative configuration of the MetricIdentifier type for use +// with apply. +type MetricIdentifierApplyConfiguration struct { + Name *string `json:"name,omitempty"` + Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"` +} + +// MetricIdentifierApplyConfiguration constructs an declarative configuration of the MetricIdentifier type for use with +// apply. +func MetricIdentifier() *MetricIdentifierApplyConfiguration { + return &MetricIdentifierApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *MetricIdentifierApplyConfiguration) WithName(value string) *MetricIdentifierApplyConfiguration { + b.Name = &value + return b +} + +// WithSelector sets the Selector field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Selector field is set to the value of the last call. +func (b *MetricIdentifierApplyConfiguration) WithSelector(value *v1.LabelSelectorApplyConfiguration) *MetricIdentifierApplyConfiguration { + b.Selector = value + return b +} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/metricspec.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/metricspec.go new file mode 100644 index 000000000000..094ead6c16d6 --- /dev/null +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/metricspec.go @@ -0,0 +1,88 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v2 + +import ( + v2 "k8s.io/api/autoscaling/v2" +) + +// MetricSpecApplyConfiguration represents an declarative configuration of the MetricSpec type for use +// with apply. +type MetricSpecApplyConfiguration struct { + Type *v2.MetricSourceType `json:"type,omitempty"` + Object *ObjectMetricSourceApplyConfiguration `json:"object,omitempty"` + Pods *PodsMetricSourceApplyConfiguration `json:"pods,omitempty"` + Resource *ResourceMetricSourceApplyConfiguration `json:"resource,omitempty"` + ContainerResource *ContainerResourceMetricSourceApplyConfiguration `json:"containerResource,omitempty"` + External *ExternalMetricSourceApplyConfiguration `json:"external,omitempty"` +} + +// MetricSpecApplyConfiguration constructs an declarative configuration of the MetricSpec type for use with +// apply. +func MetricSpec() *MetricSpecApplyConfiguration { + return &MetricSpecApplyConfiguration{} +} + +// WithType sets the Type field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Type field is set to the value of the last call. +func (b *MetricSpecApplyConfiguration) WithType(value v2.MetricSourceType) *MetricSpecApplyConfiguration { + b.Type = &value + return b +} + +// WithObject sets the Object field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Object field is set to the value of the last call. +func (b *MetricSpecApplyConfiguration) WithObject(value *ObjectMetricSourceApplyConfiguration) *MetricSpecApplyConfiguration { + b.Object = value + return b +} + +// WithPods sets the Pods field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Pods field is set to the value of the last call. +func (b *MetricSpecApplyConfiguration) WithPods(value *PodsMetricSourceApplyConfiguration) *MetricSpecApplyConfiguration { + b.Pods = value + return b +} + +// WithResource sets the Resource field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Resource field is set to the value of the last call. +func (b *MetricSpecApplyConfiguration) WithResource(value *ResourceMetricSourceApplyConfiguration) *MetricSpecApplyConfiguration { + b.Resource = value + return b +} + +// WithContainerResource sets the ContainerResource field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ContainerResource field is set to the value of the last call. +func (b *MetricSpecApplyConfiguration) WithContainerResource(value *ContainerResourceMetricSourceApplyConfiguration) *MetricSpecApplyConfiguration { + b.ContainerResource = value + return b +} + +// WithExternal sets the External field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the External field is set to the value of the last call. +func (b *MetricSpecApplyConfiguration) WithExternal(value *ExternalMetricSourceApplyConfiguration) *MetricSpecApplyConfiguration { + b.External = value + return b +} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/metricstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/metricstatus.go new file mode 100644 index 000000000000..c65ad446f0f3 --- /dev/null +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/metricstatus.go @@ -0,0 +1,88 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v2 + +import ( + v2 "k8s.io/api/autoscaling/v2" +) + +// MetricStatusApplyConfiguration represents an declarative configuration of the MetricStatus type for use +// with apply. +type MetricStatusApplyConfiguration struct { + Type *v2.MetricSourceType `json:"type,omitempty"` + Object *ObjectMetricStatusApplyConfiguration `json:"object,omitempty"` + Pods *PodsMetricStatusApplyConfiguration `json:"pods,omitempty"` + Resource *ResourceMetricStatusApplyConfiguration `json:"resource,omitempty"` + ContainerResource *ContainerResourceMetricStatusApplyConfiguration `json:"containerResource,omitempty"` + External *ExternalMetricStatusApplyConfiguration `json:"external,omitempty"` +} + +// MetricStatusApplyConfiguration constructs an declarative configuration of the MetricStatus type for use with +// apply. +func MetricStatus() *MetricStatusApplyConfiguration { + return &MetricStatusApplyConfiguration{} +} + +// WithType sets the Type field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Type field is set to the value of the last call. +func (b *MetricStatusApplyConfiguration) WithType(value v2.MetricSourceType) *MetricStatusApplyConfiguration { + b.Type = &value + return b +} + +// WithObject sets the Object field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Object field is set to the value of the last call. +func (b *MetricStatusApplyConfiguration) WithObject(value *ObjectMetricStatusApplyConfiguration) *MetricStatusApplyConfiguration { + b.Object = value + return b +} + +// WithPods sets the Pods field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Pods field is set to the value of the last call. +func (b *MetricStatusApplyConfiguration) WithPods(value *PodsMetricStatusApplyConfiguration) *MetricStatusApplyConfiguration { + b.Pods = value + return b +} + +// WithResource sets the Resource field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Resource field is set to the value of the last call. +func (b *MetricStatusApplyConfiguration) WithResource(value *ResourceMetricStatusApplyConfiguration) *MetricStatusApplyConfiguration { + b.Resource = value + return b +} + +// WithContainerResource sets the ContainerResource field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ContainerResource field is set to the value of the last call. +func (b *MetricStatusApplyConfiguration) WithContainerResource(value *ContainerResourceMetricStatusApplyConfiguration) *MetricStatusApplyConfiguration { + b.ContainerResource = value + return b +} + +// WithExternal sets the External field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the External field is set to the value of the last call. +func (b *MetricStatusApplyConfiguration) WithExternal(value *ExternalMetricStatusApplyConfiguration) *MetricStatusApplyConfiguration { + b.External = value + return b +} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/metrictarget.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/metrictarget.go new file mode 100644 index 000000000000..f301e4d2be25 --- /dev/null +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/metrictarget.go @@ -0,0 +1,71 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v2 + +import ( + v2 "k8s.io/api/autoscaling/v2" + resource "k8s.io/apimachinery/pkg/api/resource" +) + +// MetricTargetApplyConfiguration represents an declarative configuration of the MetricTarget type for use +// with apply. +type MetricTargetApplyConfiguration struct { + Type *v2.MetricTargetType `json:"type,omitempty"` + Value *resource.Quantity `json:"value,omitempty"` + AverageValue *resource.Quantity `json:"averageValue,omitempty"` + AverageUtilization *int32 `json:"averageUtilization,omitempty"` +} + +// MetricTargetApplyConfiguration constructs an declarative configuration of the MetricTarget type for use with +// apply. +func MetricTarget() *MetricTargetApplyConfiguration { + return &MetricTargetApplyConfiguration{} +} + +// WithType sets the Type field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Type field is set to the value of the last call. +func (b *MetricTargetApplyConfiguration) WithType(value v2.MetricTargetType) *MetricTargetApplyConfiguration { + b.Type = &value + return b +} + +// WithValue sets the Value field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Value field is set to the value of the last call. +func (b *MetricTargetApplyConfiguration) WithValue(value resource.Quantity) *MetricTargetApplyConfiguration { + b.Value = &value + return b +} + +// WithAverageValue sets the AverageValue field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the AverageValue field is set to the value of the last call. +func (b *MetricTargetApplyConfiguration) WithAverageValue(value resource.Quantity) *MetricTargetApplyConfiguration { + b.AverageValue = &value + return b +} + +// WithAverageUtilization sets the AverageUtilization field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the AverageUtilization field is set to the value of the last call. +func (b *MetricTargetApplyConfiguration) WithAverageUtilization(value int32) *MetricTargetApplyConfiguration { + b.AverageUtilization = &value + return b +} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/metricvaluestatus.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/metricvaluestatus.go new file mode 100644 index 000000000000..e8474b18905e --- /dev/null +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/metricvaluestatus.go @@ -0,0 +1,61 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v2 + +import ( + resource "k8s.io/apimachinery/pkg/api/resource" +) + +// MetricValueStatusApplyConfiguration represents an declarative configuration of the MetricValueStatus type for use +// with apply. +type MetricValueStatusApplyConfiguration struct { + Value *resource.Quantity `json:"value,omitempty"` + AverageValue *resource.Quantity `json:"averageValue,omitempty"` + AverageUtilization *int32 `json:"averageUtilization,omitempty"` +} + +// MetricValueStatusApplyConfiguration constructs an declarative configuration of the MetricValueStatus type for use with +// apply. +func MetricValueStatus() *MetricValueStatusApplyConfiguration { + return &MetricValueStatusApplyConfiguration{} +} + +// WithValue sets the Value field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Value field is set to the value of the last call. +func (b *MetricValueStatusApplyConfiguration) WithValue(value resource.Quantity) *MetricValueStatusApplyConfiguration { + b.Value = &value + return b +} + +// WithAverageValue sets the AverageValue field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the AverageValue field is set to the value of the last call. +func (b *MetricValueStatusApplyConfiguration) WithAverageValue(value resource.Quantity) *MetricValueStatusApplyConfiguration { + b.AverageValue = &value + return b +} + +// WithAverageUtilization sets the AverageUtilization field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the AverageUtilization field is set to the value of the last call. +func (b *MetricValueStatusApplyConfiguration) WithAverageUtilization(value int32) *MetricValueStatusApplyConfiguration { + b.AverageUtilization = &value + return b +} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/objectmetricsource.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/objectmetricsource.go new file mode 100644 index 000000000000..a9482565e069 --- /dev/null +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/objectmetricsource.go @@ -0,0 +1,57 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v2 + +// ObjectMetricSourceApplyConfiguration represents an declarative configuration of the ObjectMetricSource type for use +// with apply. +type ObjectMetricSourceApplyConfiguration struct { + DescribedObject *CrossVersionObjectReferenceApplyConfiguration `json:"describedObject,omitempty"` + Target *MetricTargetApplyConfiguration `json:"target,omitempty"` + Metric *MetricIdentifierApplyConfiguration `json:"metric,omitempty"` +} + +// ObjectMetricSourceApplyConfiguration constructs an declarative configuration of the ObjectMetricSource type for use with +// apply. +func ObjectMetricSource() *ObjectMetricSourceApplyConfiguration { + return &ObjectMetricSourceApplyConfiguration{} +} + +// WithDescribedObject sets the DescribedObject field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DescribedObject field is set to the value of the last call. +func (b *ObjectMetricSourceApplyConfiguration) WithDescribedObject(value *CrossVersionObjectReferenceApplyConfiguration) *ObjectMetricSourceApplyConfiguration { + b.DescribedObject = value + return b +} + +// WithTarget sets the Target field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Target field is set to the value of the last call. +func (b *ObjectMetricSourceApplyConfiguration) WithTarget(value *MetricTargetApplyConfiguration) *ObjectMetricSourceApplyConfiguration { + b.Target = value + return b +} + +// WithMetric sets the Metric field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Metric field is set to the value of the last call. +func (b *ObjectMetricSourceApplyConfiguration) WithMetric(value *MetricIdentifierApplyConfiguration) *ObjectMetricSourceApplyConfiguration { + b.Metric = value + return b +} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/objectmetricstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/objectmetricstatus.go new file mode 100644 index 000000000000..70ba43beddf9 --- /dev/null +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/objectmetricstatus.go @@ -0,0 +1,57 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v2 + +// ObjectMetricStatusApplyConfiguration represents an declarative configuration of the ObjectMetricStatus type for use +// with apply. +type ObjectMetricStatusApplyConfiguration struct { + Metric *MetricIdentifierApplyConfiguration `json:"metric,omitempty"` + Current *MetricValueStatusApplyConfiguration `json:"current,omitempty"` + DescribedObject *CrossVersionObjectReferenceApplyConfiguration `json:"describedObject,omitempty"` +} + +// ObjectMetricStatusApplyConfiguration constructs an declarative configuration of the ObjectMetricStatus type for use with +// apply. +func ObjectMetricStatus() *ObjectMetricStatusApplyConfiguration { + return &ObjectMetricStatusApplyConfiguration{} +} + +// WithMetric sets the Metric field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Metric field is set to the value of the last call. +func (b *ObjectMetricStatusApplyConfiguration) WithMetric(value *MetricIdentifierApplyConfiguration) *ObjectMetricStatusApplyConfiguration { + b.Metric = value + return b +} + +// WithCurrent sets the Current field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Current field is set to the value of the last call. +func (b *ObjectMetricStatusApplyConfiguration) WithCurrent(value *MetricValueStatusApplyConfiguration) *ObjectMetricStatusApplyConfiguration { + b.Current = value + return b +} + +// WithDescribedObject sets the DescribedObject field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DescribedObject field is set to the value of the last call. +func (b *ObjectMetricStatusApplyConfiguration) WithDescribedObject(value *CrossVersionObjectReferenceApplyConfiguration) *ObjectMetricStatusApplyConfiguration { + b.DescribedObject = value + return b +} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/podresourcemetricsource.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/podresourcemetricsource.go new file mode 100644 index 000000000000..86601cc48a89 --- /dev/null +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/podresourcemetricsource.go @@ -0,0 +1,52 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v2 + +import ( + v1 "k8s.io/api/core/v1" +) + +// PodResourceMetricSourceApplyConfiguration represents an declarative configuration of the PodResourceMetricSource type for use +// with apply. +type PodResourceMetricSourceApplyConfiguration struct { + Name *v1.ResourceName `json:"name,omitempty"` + Target *MetricTargetApplyConfiguration `json:"target,omitempty"` +} + +// PodResourceMetricSourceApplyConfiguration constructs an declarative configuration of the PodResourceMetricSource type for use with +// apply. +func PodResourceMetricSource() *PodResourceMetricSourceApplyConfiguration { + return &PodResourceMetricSourceApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *PodResourceMetricSourceApplyConfiguration) WithName(value v1.ResourceName) *PodResourceMetricSourceApplyConfiguration { + b.Name = &value + return b +} + +// WithTarget sets the Target field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Target field is set to the value of the last call. +func (b *PodResourceMetricSourceApplyConfiguration) WithTarget(value *MetricTargetApplyConfiguration) *PodResourceMetricSourceApplyConfiguration { + b.Target = value + return b +} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/podsmetricsource.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/podsmetricsource.go new file mode 100644 index 000000000000..0a7a5c2595ed --- /dev/null +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/podsmetricsource.go @@ -0,0 +1,48 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v2 + +// PodsMetricSourceApplyConfiguration represents an declarative configuration of the PodsMetricSource type for use +// with apply. +type PodsMetricSourceApplyConfiguration struct { + Metric *MetricIdentifierApplyConfiguration `json:"metric,omitempty"` + Target *MetricTargetApplyConfiguration `json:"target,omitempty"` +} + +// PodsMetricSourceApplyConfiguration constructs an declarative configuration of the PodsMetricSource type for use with +// apply. +func PodsMetricSource() *PodsMetricSourceApplyConfiguration { + return &PodsMetricSourceApplyConfiguration{} +} + +// WithMetric sets the Metric field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Metric field is set to the value of the last call. +func (b *PodsMetricSourceApplyConfiguration) WithMetric(value *MetricIdentifierApplyConfiguration) *PodsMetricSourceApplyConfiguration { + b.Metric = value + return b +} + +// WithTarget sets the Target field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Target field is set to the value of the last call. +func (b *PodsMetricSourceApplyConfiguration) WithTarget(value *MetricTargetApplyConfiguration) *PodsMetricSourceApplyConfiguration { + b.Target = value + return b +} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/podsmetricstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/podsmetricstatus.go new file mode 100644 index 000000000000..865fcc33e30d --- /dev/null +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/podsmetricstatus.go @@ -0,0 +1,48 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v2 + +// PodsMetricStatusApplyConfiguration represents an declarative configuration of the PodsMetricStatus type for use +// with apply. +type PodsMetricStatusApplyConfiguration struct { + Metric *MetricIdentifierApplyConfiguration `json:"metric,omitempty"` + Current *MetricValueStatusApplyConfiguration `json:"current,omitempty"` +} + +// PodsMetricStatusApplyConfiguration constructs an declarative configuration of the PodsMetricStatus type for use with +// apply. +func PodsMetricStatus() *PodsMetricStatusApplyConfiguration { + return &PodsMetricStatusApplyConfiguration{} +} + +// WithMetric sets the Metric field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Metric field is set to the value of the last call. +func (b *PodsMetricStatusApplyConfiguration) WithMetric(value *MetricIdentifierApplyConfiguration) *PodsMetricStatusApplyConfiguration { + b.Metric = value + return b +} + +// WithCurrent sets the Current field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Current field is set to the value of the last call. +func (b *PodsMetricStatusApplyConfiguration) WithCurrent(value *MetricValueStatusApplyConfiguration) *PodsMetricStatusApplyConfiguration { + b.Current = value + return b +} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/resourcemetricsource.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/resourcemetricsource.go new file mode 100644 index 000000000000..25a065fef677 --- /dev/null +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/resourcemetricsource.go @@ -0,0 +1,52 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v2 + +import ( + v1 "k8s.io/api/core/v1" +) + +// ResourceMetricSourceApplyConfiguration represents an declarative configuration of the ResourceMetricSource type for use +// with apply. +type ResourceMetricSourceApplyConfiguration struct { + Name *v1.ResourceName `json:"name,omitempty"` + Target *MetricTargetApplyConfiguration `json:"target,omitempty"` +} + +// ResourceMetricSourceApplyConfiguration constructs an declarative configuration of the ResourceMetricSource type for use with +// apply. +func ResourceMetricSource() *ResourceMetricSourceApplyConfiguration { + return &ResourceMetricSourceApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *ResourceMetricSourceApplyConfiguration) WithName(value v1.ResourceName) *ResourceMetricSourceApplyConfiguration { + b.Name = &value + return b +} + +// WithTarget sets the Target field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Target field is set to the value of the last call. +func (b *ResourceMetricSourceApplyConfiguration) WithTarget(value *MetricTargetApplyConfiguration) *ResourceMetricSourceApplyConfiguration { + b.Target = value + return b +} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/resourcemetricstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/resourcemetricstatus.go new file mode 100644 index 000000000000..fb5625afab35 --- /dev/null +++ b/staging/src/k8s.io/client-go/applyconfigurations/autoscaling/v2/resourcemetricstatus.go @@ -0,0 +1,52 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v2 + +import ( + v1 "k8s.io/api/core/v1" +) + +// ResourceMetricStatusApplyConfiguration represents an declarative configuration of the ResourceMetricStatus type for use +// with apply. +type ResourceMetricStatusApplyConfiguration struct { + Name *v1.ResourceName `json:"name,omitempty"` + Current *MetricValueStatusApplyConfiguration `json:"current,omitempty"` +} + +// ResourceMetricStatusApplyConfiguration constructs an declarative configuration of the ResourceMetricStatus type for use with +// apply. +func ResourceMetricStatus() *ResourceMetricStatusApplyConfiguration { + return &ResourceMetricStatusApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *ResourceMetricStatusApplyConfiguration) WithName(value v1.ResourceName) *ResourceMetricStatusApplyConfiguration { + b.Name = &value + return b +} + +// WithCurrent sets the Current field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Current field is set to the value of the last call. +func (b *ResourceMetricStatusApplyConfiguration) WithCurrent(value *MetricValueStatusApplyConfiguration) *ResourceMetricStatusApplyConfiguration { + b.Current = value + return b +} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/internal/internal.go b/staging/src/k8s.io/client-go/applyconfigurations/internal/internal.go index d984fdd153fc..fcedfc1f36c4 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/internal/internal.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/internal/internal.go @@ -1839,6 +1839,362 @@ var schemaYAML = typed.YAMLObject(`types: - name: observedGeneration type: scalar: numeric +- name: io.k8s.api.autoscaling.v2.ContainerResourceMetricSource + map: + fields: + - name: container + type: + scalar: string + default: "" + - name: name + type: + scalar: string + default: "" + - name: target + type: + namedType: io.k8s.api.autoscaling.v2.MetricTarget + default: {} +- name: io.k8s.api.autoscaling.v2.ContainerResourceMetricStatus + map: + fields: + - name: container + type: + scalar: string + default: "" + - name: current + type: + namedType: io.k8s.api.autoscaling.v2.MetricValueStatus + default: {} + - name: name + type: + scalar: string + default: "" +- name: io.k8s.api.autoscaling.v2.CrossVersionObjectReference + map: + fields: + - name: apiVersion + type: + scalar: string + - name: kind + type: + scalar: string + default: "" + - name: name + type: + scalar: string + default: "" +- name: io.k8s.api.autoscaling.v2.ExternalMetricSource + map: + fields: + - name: metric + type: + namedType: io.k8s.api.autoscaling.v2.MetricIdentifier + default: {} + - name: target + type: + namedType: io.k8s.api.autoscaling.v2.MetricTarget + default: {} +- name: io.k8s.api.autoscaling.v2.ExternalMetricStatus + map: + fields: + - name: current + type: + namedType: io.k8s.api.autoscaling.v2.MetricValueStatus + default: {} + - name: metric + type: + namedType: io.k8s.api.autoscaling.v2.MetricIdentifier + default: {} +- name: io.k8s.api.autoscaling.v2.HPAScalingPolicy + map: + fields: + - name: periodSeconds + type: + scalar: numeric + default: 0 + - name: type + type: + scalar: string + default: "" + - name: value + type: + scalar: numeric + default: 0 +- name: io.k8s.api.autoscaling.v2.HPAScalingRules + map: + fields: + - name: policies + type: + list: + elementType: + namedType: io.k8s.api.autoscaling.v2.HPAScalingPolicy + elementRelationship: atomic + - name: selectPolicy + type: + scalar: string + - name: stabilizationWindowSeconds + type: + scalar: numeric +- name: io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler + map: + fields: + - name: apiVersion + type: + scalar: string + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + default: {} + - name: spec + type: + namedType: io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerSpec + default: {} + - name: status + type: + namedType: io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerStatus + default: {} +- name: io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerBehavior + map: + fields: + - name: scaleDown + type: + namedType: io.k8s.api.autoscaling.v2.HPAScalingRules + - name: scaleUp + type: + namedType: io.k8s.api.autoscaling.v2.HPAScalingRules +- name: io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerCondition + map: + fields: + - name: lastTransitionTime + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time + default: {} + - name: message + type: + scalar: string + - name: reason + type: + scalar: string + - name: status + type: + scalar: string + default: "" + - name: type + type: + scalar: string + default: "" +- name: io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerSpec + map: + fields: + - name: behavior + type: + namedType: io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerBehavior + - name: maxReplicas + type: + scalar: numeric + default: 0 + - name: metrics + type: + list: + elementType: + namedType: io.k8s.api.autoscaling.v2.MetricSpec + elementRelationship: atomic + - name: minReplicas + type: + scalar: numeric + - name: scaleTargetRef + type: + namedType: io.k8s.api.autoscaling.v2.CrossVersionObjectReference + default: {} +- name: io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerStatus + map: + fields: + - name: conditions + type: + list: + elementType: + namedType: io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerCondition + elementRelationship: associative + keys: + - type + - name: currentMetrics + type: + list: + elementType: + namedType: io.k8s.api.autoscaling.v2.MetricStatus + elementRelationship: atomic + - name: currentReplicas + type: + scalar: numeric + - name: desiredReplicas + type: + scalar: numeric + default: 0 + - name: lastScaleTime + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time + - name: observedGeneration + type: + scalar: numeric +- name: io.k8s.api.autoscaling.v2.MetricIdentifier + map: + fields: + - name: name + type: + scalar: string + default: "" + - name: selector + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector +- name: io.k8s.api.autoscaling.v2.MetricSpec + map: + fields: + - name: containerResource + type: + namedType: io.k8s.api.autoscaling.v2.ContainerResourceMetricSource + - name: external + type: + namedType: io.k8s.api.autoscaling.v2.ExternalMetricSource + - name: object + type: + namedType: io.k8s.api.autoscaling.v2.ObjectMetricSource + - name: pods + type: + namedType: io.k8s.api.autoscaling.v2.PodsMetricSource + - name: resource + type: + namedType: io.k8s.api.autoscaling.v2.ResourceMetricSource + - name: type + type: + scalar: string + default: "" +- name: io.k8s.api.autoscaling.v2.MetricStatus + map: + fields: + - name: containerResource + type: + namedType: io.k8s.api.autoscaling.v2.ContainerResourceMetricStatus + - name: external + type: + namedType: io.k8s.api.autoscaling.v2.ExternalMetricStatus + - name: object + type: + namedType: io.k8s.api.autoscaling.v2.ObjectMetricStatus + - name: pods + type: + namedType: io.k8s.api.autoscaling.v2.PodsMetricStatus + - name: resource + type: + namedType: io.k8s.api.autoscaling.v2.ResourceMetricStatus + - name: type + type: + scalar: string + default: "" +- name: io.k8s.api.autoscaling.v2.MetricTarget + map: + fields: + - name: averageUtilization + type: + scalar: numeric + - name: averageValue + type: + namedType: io.k8s.apimachinery.pkg.api.resource.Quantity + - name: type + type: + scalar: string + default: "" + - name: value + type: + namedType: io.k8s.apimachinery.pkg.api.resource.Quantity +- name: io.k8s.api.autoscaling.v2.MetricValueStatus + map: + fields: + - name: averageUtilization + type: + scalar: numeric + - name: averageValue + type: + namedType: io.k8s.apimachinery.pkg.api.resource.Quantity + - name: value + type: + namedType: io.k8s.apimachinery.pkg.api.resource.Quantity +- name: io.k8s.api.autoscaling.v2.ObjectMetricSource + map: + fields: + - name: describedObject + type: + namedType: io.k8s.api.autoscaling.v2.CrossVersionObjectReference + default: {} + - name: metric + type: + namedType: io.k8s.api.autoscaling.v2.MetricIdentifier + default: {} + - name: target + type: + namedType: io.k8s.api.autoscaling.v2.MetricTarget + default: {} +- name: io.k8s.api.autoscaling.v2.ObjectMetricStatus + map: + fields: + - name: current + type: + namedType: io.k8s.api.autoscaling.v2.MetricValueStatus + default: {} + - name: describedObject + type: + namedType: io.k8s.api.autoscaling.v2.CrossVersionObjectReference + default: {} + - name: metric + type: + namedType: io.k8s.api.autoscaling.v2.MetricIdentifier + default: {} +- name: io.k8s.api.autoscaling.v2.PodsMetricSource + map: + fields: + - name: metric + type: + namedType: io.k8s.api.autoscaling.v2.MetricIdentifier + default: {} + - name: target + type: + namedType: io.k8s.api.autoscaling.v2.MetricTarget + default: {} +- name: io.k8s.api.autoscaling.v2.PodsMetricStatus + map: + fields: + - name: current + type: + namedType: io.k8s.api.autoscaling.v2.MetricValueStatus + default: {} + - name: metric + type: + namedType: io.k8s.api.autoscaling.v2.MetricIdentifier + default: {} +- name: io.k8s.api.autoscaling.v2.ResourceMetricSource + map: + fields: + - name: name + type: + scalar: string + default: "" + - name: target + type: + namedType: io.k8s.api.autoscaling.v2.MetricTarget + default: {} +- name: io.k8s.api.autoscaling.v2.ResourceMetricStatus + map: + fields: + - name: current + type: + namedType: io.k8s.api.autoscaling.v2.MetricValueStatus + default: {} + - name: name + type: + scalar: string + default: "" - name: io.k8s.api.autoscaling.v2beta1.ContainerResourceMetricSource map: fields: diff --git a/staging/src/k8s.io/client-go/applyconfigurations/utils.go b/staging/src/k8s.io/client-go/applyconfigurations/utils.go index dde8c1e385db..35d0255f7cb6 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/utils.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/utils.go @@ -26,6 +26,7 @@ import ( appsv1beta1 "k8s.io/api/apps/v1beta1" v1beta2 "k8s.io/api/apps/v1beta2" autoscalingv1 "k8s.io/api/autoscaling/v1" + v2 "k8s.io/api/autoscaling/v2" v2beta1 "k8s.io/api/autoscaling/v2beta1" v2beta2 "k8s.io/api/autoscaling/v2beta2" batchv1 "k8s.io/api/batch/v1" @@ -69,6 +70,7 @@ import ( applyconfigurationsappsv1beta1 "k8s.io/client-go/applyconfigurations/apps/v1beta1" appsv1beta2 "k8s.io/client-go/applyconfigurations/apps/v1beta2" applyconfigurationsautoscalingv1 "k8s.io/client-go/applyconfigurations/autoscaling/v1" + autoscalingv2 "k8s.io/client-go/applyconfigurations/autoscaling/v2" autoscalingv2beta1 "k8s.io/client-go/applyconfigurations/autoscaling/v2beta1" autoscalingv2beta2 "k8s.io/client-go/applyconfigurations/autoscaling/v2beta2" applyconfigurationsbatchv1 "k8s.io/client-go/applyconfigurations/batch/v1" @@ -290,6 +292,54 @@ func ForKind(kind schema.GroupVersionKind) interface{} { case autoscalingv1.SchemeGroupVersion.WithKind("ScaleStatus"): return &applyconfigurationsautoscalingv1.ScaleStatusApplyConfiguration{} + // Group=autoscaling, Version=v2 + case v2.SchemeGroupVersion.WithKind("ContainerResourceMetricSource"): + return &autoscalingv2.ContainerResourceMetricSourceApplyConfiguration{} + case v2.SchemeGroupVersion.WithKind("ContainerResourceMetricStatus"): + return &autoscalingv2.ContainerResourceMetricStatusApplyConfiguration{} + case v2.SchemeGroupVersion.WithKind("CrossVersionObjectReference"): + return &autoscalingv2.CrossVersionObjectReferenceApplyConfiguration{} + case v2.SchemeGroupVersion.WithKind("ExternalMetricSource"): + return &autoscalingv2.ExternalMetricSourceApplyConfiguration{} + case v2.SchemeGroupVersion.WithKind("ExternalMetricStatus"): + return &autoscalingv2.ExternalMetricStatusApplyConfiguration{} + case v2.SchemeGroupVersion.WithKind("HorizontalPodAutoscaler"): + return &autoscalingv2.HorizontalPodAutoscalerApplyConfiguration{} + case v2.SchemeGroupVersion.WithKind("HorizontalPodAutoscalerBehavior"): + return &autoscalingv2.HorizontalPodAutoscalerBehaviorApplyConfiguration{} + case v2.SchemeGroupVersion.WithKind("HorizontalPodAutoscalerCondition"): + return &autoscalingv2.HorizontalPodAutoscalerConditionApplyConfiguration{} + case v2.SchemeGroupVersion.WithKind("HorizontalPodAutoscalerSpec"): + return &autoscalingv2.HorizontalPodAutoscalerSpecApplyConfiguration{} + case v2.SchemeGroupVersion.WithKind("HorizontalPodAutoscalerStatus"): + return &autoscalingv2.HorizontalPodAutoscalerStatusApplyConfiguration{} + case v2.SchemeGroupVersion.WithKind("HPAScalingPolicy"): + return &autoscalingv2.HPAScalingPolicyApplyConfiguration{} + case v2.SchemeGroupVersion.WithKind("HPAScalingRules"): + return &autoscalingv2.HPAScalingRulesApplyConfiguration{} + case v2.SchemeGroupVersion.WithKind("MetricIdentifier"): + return &autoscalingv2.MetricIdentifierApplyConfiguration{} + case v2.SchemeGroupVersion.WithKind("MetricSpec"): + return &autoscalingv2.MetricSpecApplyConfiguration{} + case v2.SchemeGroupVersion.WithKind("MetricStatus"): + return &autoscalingv2.MetricStatusApplyConfiguration{} + case v2.SchemeGroupVersion.WithKind("MetricTarget"): + return &autoscalingv2.MetricTargetApplyConfiguration{} + case v2.SchemeGroupVersion.WithKind("MetricValueStatus"): + return &autoscalingv2.MetricValueStatusApplyConfiguration{} + case v2.SchemeGroupVersion.WithKind("ObjectMetricSource"): + return &autoscalingv2.ObjectMetricSourceApplyConfiguration{} + case v2.SchemeGroupVersion.WithKind("ObjectMetricStatus"): + return &autoscalingv2.ObjectMetricStatusApplyConfiguration{} + case v2.SchemeGroupVersion.WithKind("PodsMetricSource"): + return &autoscalingv2.PodsMetricSourceApplyConfiguration{} + case v2.SchemeGroupVersion.WithKind("PodsMetricStatus"): + return &autoscalingv2.PodsMetricStatusApplyConfiguration{} + case v2.SchemeGroupVersion.WithKind("ResourceMetricSource"): + return &autoscalingv2.ResourceMetricSourceApplyConfiguration{} + case v2.SchemeGroupVersion.WithKind("ResourceMetricStatus"): + return &autoscalingv2.ResourceMetricStatusApplyConfiguration{} + // Group=autoscaling, Version=v2beta1 case v2beta1.SchemeGroupVersion.WithKind("ContainerResourceMetricSource"): return &autoscalingv2beta1.ContainerResourceMetricSourceApplyConfiguration{} diff --git a/staging/src/k8s.io/client-go/informers/autoscaling/interface.go b/staging/src/k8s.io/client-go/informers/autoscaling/interface.go index 81e8390147d4..2b3b2d0e50e4 100644 --- a/staging/src/k8s.io/client-go/informers/autoscaling/interface.go +++ b/staging/src/k8s.io/client-go/informers/autoscaling/interface.go @@ -20,6 +20,7 @@ package autoscaling import ( v1 "k8s.io/client-go/informers/autoscaling/v1" + v2 "k8s.io/client-go/informers/autoscaling/v2" v2beta1 "k8s.io/client-go/informers/autoscaling/v2beta1" v2beta2 "k8s.io/client-go/informers/autoscaling/v2beta2" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" @@ -29,6 +30,8 @@ import ( type Interface interface { // V1 provides access to shared informers for resources in V1. V1() v1.Interface + // V2 provides access to shared informers for resources in V2. + V2() v2.Interface // V2beta1 provides access to shared informers for resources in V2beta1. V2beta1() v2beta1.Interface // V2beta2 provides access to shared informers for resources in V2beta2. @@ -51,6 +54,11 @@ func (g *group) V1() v1.Interface { return v1.New(g.factory, g.namespace, g.tweakListOptions) } +// V2 returns a new v2.Interface. +func (g *group) V2() v2.Interface { + return v2.New(g.factory, g.namespace, g.tweakListOptions) +} + // V2beta1 returns a new v2beta1.Interface. func (g *group) V2beta1() v2beta1.Interface { return v2beta1.New(g.factory, g.namespace, g.tweakListOptions) diff --git a/staging/src/k8s.io/client-go/informers/autoscaling/v2/horizontalpodautoscaler.go b/staging/src/k8s.io/client-go/informers/autoscaling/v2/horizontalpodautoscaler.go new file mode 100644 index 000000000000..5ddb3b015f2d --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/autoscaling/v2/horizontalpodautoscaler.go @@ -0,0 +1,90 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by informer-gen. DO NOT EDIT. + +package v2 + +import ( + "context" + time "time" + + autoscalingv2 "k8s.io/api/autoscaling/v2" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + kubernetes "k8s.io/client-go/kubernetes" + v2 "k8s.io/client-go/listers/autoscaling/v2" + cache "k8s.io/client-go/tools/cache" +) + +// HorizontalPodAutoscalerInformer provides access to a shared informer and lister for +// HorizontalPodAutoscalers. +type HorizontalPodAutoscalerInformer interface { + Informer() cache.SharedIndexInformer + Lister() v2.HorizontalPodAutoscalerLister +} + +type horizontalPodAutoscalerInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewHorizontalPodAutoscalerInformer constructs a new informer for HorizontalPodAutoscaler type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewHorizontalPodAutoscalerInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredHorizontalPodAutoscalerInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredHorizontalPodAutoscalerInformer constructs a new informer for HorizontalPodAutoscaler type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredHorizontalPodAutoscalerInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.AutoscalingV2().HorizontalPodAutoscalers(namespace).List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.AutoscalingV2().HorizontalPodAutoscalers(namespace).Watch(context.TODO(), options) + }, + }, + &autoscalingv2.HorizontalPodAutoscaler{}, + resyncPeriod, + indexers, + ) +} + +func (f *horizontalPodAutoscalerInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredHorizontalPodAutoscalerInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *horizontalPodAutoscalerInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&autoscalingv2.HorizontalPodAutoscaler{}, f.defaultInformer) +} + +func (f *horizontalPodAutoscalerInformer) Lister() v2.HorizontalPodAutoscalerLister { + return v2.NewHorizontalPodAutoscalerLister(f.Informer().GetIndexer()) +} diff --git a/staging/src/k8s.io/client-go/informers/autoscaling/v2/interface.go b/staging/src/k8s.io/client-go/informers/autoscaling/v2/interface.go new file mode 100644 index 000000000000..2c71908e4035 --- /dev/null +++ b/staging/src/k8s.io/client-go/informers/autoscaling/v2/interface.go @@ -0,0 +1,45 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by informer-gen. DO NOT EDIT. + +package v2 + +import ( + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" +) + +// Interface provides access to all the informers in this group version. +type Interface interface { + // HorizontalPodAutoscalers returns a HorizontalPodAutoscalerInformer. + HorizontalPodAutoscalers() HorizontalPodAutoscalerInformer +} + +type version struct { + factory internalinterfaces.SharedInformerFactory + namespace string + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// New returns a new Interface. +func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { + return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} +} + +// HorizontalPodAutoscalers returns a HorizontalPodAutoscalerInformer. +func (v *version) HorizontalPodAutoscalers() HorizontalPodAutoscalerInformer { + return &horizontalPodAutoscalerInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} diff --git a/staging/src/k8s.io/client-go/informers/generic.go b/staging/src/k8s.io/client-go/informers/generic.go index c243c9908baa..5b94a2d2a3a7 100644 --- a/staging/src/k8s.io/client-go/informers/generic.go +++ b/staging/src/k8s.io/client-go/informers/generic.go @@ -28,6 +28,7 @@ import ( appsv1beta1 "k8s.io/api/apps/v1beta1" v1beta2 "k8s.io/api/apps/v1beta2" autoscalingv1 "k8s.io/api/autoscaling/v1" + v2 "k8s.io/api/autoscaling/v2" v2beta1 "k8s.io/api/autoscaling/v2beta1" v2beta2 "k8s.io/api/autoscaling/v2beta2" batchv1 "k8s.io/api/batch/v1" @@ -139,6 +140,10 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource case autoscalingv1.SchemeGroupVersion.WithResource("horizontalpodautoscalers"): return &genericInformer{resource: resource.GroupResource(), informer: f.Autoscaling().V1().HorizontalPodAutoscalers().Informer()}, nil + // Group=autoscaling, Version=v2 + case v2.SchemeGroupVersion.WithResource("horizontalpodautoscalers"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Autoscaling().V2().HorizontalPodAutoscalers().Informer()}, nil + // Group=autoscaling, Version=v2beta1 case v2beta1.SchemeGroupVersion.WithResource("horizontalpodautoscalers"): return &genericInformer{resource: resource.GroupResource(), informer: f.Autoscaling().V2beta1().HorizontalPodAutoscalers().Informer()}, nil diff --git a/staging/src/k8s.io/client-go/kubernetes/clientset.go b/staging/src/k8s.io/client-go/kubernetes/clientset.go index 13e13e2b43d2..3e512a7c2e97 100644 --- a/staging/src/k8s.io/client-go/kubernetes/clientset.go +++ b/staging/src/k8s.io/client-go/kubernetes/clientset.go @@ -34,6 +34,7 @@ import ( authorizationv1 "k8s.io/client-go/kubernetes/typed/authorization/v1" authorizationv1beta1 "k8s.io/client-go/kubernetes/typed/authorization/v1beta1" autoscalingv1 "k8s.io/client-go/kubernetes/typed/autoscaling/v1" + autoscalingv2 "k8s.io/client-go/kubernetes/typed/autoscaling/v2" autoscalingv2beta1 "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1" autoscalingv2beta2 "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2" batchv1 "k8s.io/client-go/kubernetes/typed/batch/v1" @@ -84,6 +85,7 @@ type Interface interface { AuthorizationV1() authorizationv1.AuthorizationV1Interface AuthorizationV1beta1() authorizationv1beta1.AuthorizationV1beta1Interface AutoscalingV1() autoscalingv1.AutoscalingV1Interface + AutoscalingV2() autoscalingv2.AutoscalingV2Interface AutoscalingV2beta1() autoscalingv2beta1.AutoscalingV2beta1Interface AutoscalingV2beta2() autoscalingv2beta2.AutoscalingV2beta2Interface BatchV1() batchv1.BatchV1Interface @@ -134,6 +136,7 @@ type Clientset struct { authorizationV1 *authorizationv1.AuthorizationV1Client authorizationV1beta1 *authorizationv1beta1.AuthorizationV1beta1Client autoscalingV1 *autoscalingv1.AutoscalingV1Client + autoscalingV2 *autoscalingv2.AutoscalingV2Client autoscalingV2beta1 *autoscalingv2beta1.AutoscalingV2beta1Client autoscalingV2beta2 *autoscalingv2beta2.AutoscalingV2beta2Client batchV1 *batchv1.BatchV1Client @@ -224,6 +227,11 @@ func (c *Clientset) AutoscalingV1() autoscalingv1.AutoscalingV1Interface { return c.autoscalingV1 } +// AutoscalingV2 retrieves the AutoscalingV2Client +func (c *Clientset) AutoscalingV2() autoscalingv2.AutoscalingV2Interface { + return c.autoscalingV2 +} + // AutoscalingV2beta1 retrieves the AutoscalingV2beta1Client func (c *Clientset) AutoscalingV2beta1() autoscalingv2beta1.AutoscalingV2beta1Interface { return c.autoscalingV2beta1 @@ -473,6 +481,10 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, if err != nil { return nil, err } + cs.autoscalingV2, err = autoscalingv2.NewForConfigAndClient(&configShallowCopy, httpClient) + if err != nil { + return nil, err + } cs.autoscalingV2beta1, err = autoscalingv2beta1.NewForConfigAndClient(&configShallowCopy, httpClient) if err != nil { return nil, err @@ -637,6 +649,7 @@ func New(c rest.Interface) *Clientset { cs.authorizationV1 = authorizationv1.New(c) cs.authorizationV1beta1 = authorizationv1beta1.New(c) cs.autoscalingV1 = autoscalingv1.New(c) + cs.autoscalingV2 = autoscalingv2.New(c) cs.autoscalingV2beta1 = autoscalingv2beta1.New(c) cs.autoscalingV2beta2 = autoscalingv2beta2.New(c) cs.batchV1 = batchv1.New(c) diff --git a/staging/src/k8s.io/client-go/kubernetes/fake/clientset_generated.go b/staging/src/k8s.io/client-go/kubernetes/fake/clientset_generated.go index d4b794b23b70..9ab84ff5dc30 100644 --- a/staging/src/k8s.io/client-go/kubernetes/fake/clientset_generated.go +++ b/staging/src/k8s.io/client-go/kubernetes/fake/clientset_generated.go @@ -46,6 +46,8 @@ import ( fakeauthorizationv1beta1 "k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake" autoscalingv1 "k8s.io/client-go/kubernetes/typed/autoscaling/v1" fakeautoscalingv1 "k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake" + autoscalingv2 "k8s.io/client-go/kubernetes/typed/autoscaling/v2" + fakeautoscalingv2 "k8s.io/client-go/kubernetes/typed/autoscaling/v2/fake" autoscalingv2beta1 "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1" fakeautoscalingv2beta1 "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/fake" autoscalingv2beta2 "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2" @@ -220,6 +222,11 @@ func (c *Clientset) AutoscalingV1() autoscalingv1.AutoscalingV1Interface { return &fakeautoscalingv1.FakeAutoscalingV1{Fake: &c.Fake} } +// AutoscalingV2 retrieves the AutoscalingV2Client +func (c *Clientset) AutoscalingV2() autoscalingv2.AutoscalingV2Interface { + return &fakeautoscalingv2.FakeAutoscalingV2{Fake: &c.Fake} +} + // AutoscalingV2beta1 retrieves the AutoscalingV2beta1Client func (c *Clientset) AutoscalingV2beta1() autoscalingv2beta1.AutoscalingV2beta1Interface { return &fakeautoscalingv2beta1.FakeAutoscalingV2beta1{Fake: &c.Fake} diff --git a/staging/src/k8s.io/client-go/kubernetes/fake/register.go b/staging/src/k8s.io/client-go/kubernetes/fake/register.go index 55617b678aff..c3f0a3d52258 100644 --- a/staging/src/k8s.io/client-go/kubernetes/fake/register.go +++ b/staging/src/k8s.io/client-go/kubernetes/fake/register.go @@ -30,6 +30,7 @@ import ( authorizationv1 "k8s.io/api/authorization/v1" authorizationv1beta1 "k8s.io/api/authorization/v1beta1" autoscalingv1 "k8s.io/api/autoscaling/v1" + autoscalingv2 "k8s.io/api/autoscaling/v2" autoscalingv2beta1 "k8s.io/api/autoscaling/v2beta1" autoscalingv2beta2 "k8s.io/api/autoscaling/v2beta2" batchv1 "k8s.io/api/batch/v1" @@ -85,6 +86,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{ authorizationv1.AddToScheme, authorizationv1beta1.AddToScheme, autoscalingv1.AddToScheme, + autoscalingv2.AddToScheme, autoscalingv2beta1.AddToScheme, autoscalingv2beta2.AddToScheme, batchv1.AddToScheme, diff --git a/staging/src/k8s.io/client-go/kubernetes/scheme/register.go b/staging/src/k8s.io/client-go/kubernetes/scheme/register.go index 8c205177b918..b41466151d4c 100644 --- a/staging/src/k8s.io/client-go/kubernetes/scheme/register.go +++ b/staging/src/k8s.io/client-go/kubernetes/scheme/register.go @@ -30,6 +30,7 @@ import ( authorizationv1 "k8s.io/api/authorization/v1" authorizationv1beta1 "k8s.io/api/authorization/v1beta1" autoscalingv1 "k8s.io/api/autoscaling/v1" + autoscalingv2 "k8s.io/api/autoscaling/v2" autoscalingv2beta1 "k8s.io/api/autoscaling/v2beta1" autoscalingv2beta2 "k8s.io/api/autoscaling/v2beta2" batchv1 "k8s.io/api/batch/v1" @@ -85,6 +86,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{ authorizationv1.AddToScheme, authorizationv1beta1.AddToScheme, autoscalingv1.AddToScheme, + autoscalingv2.AddToScheme, autoscalingv2beta1.AddToScheme, autoscalingv2beta2.AddToScheme, batchv1.AddToScheme, diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2/autoscaling_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2/autoscaling_client.go new file mode 100644 index 000000000000..04d5d0f94985 --- /dev/null +++ b/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2/autoscaling_client.go @@ -0,0 +1,107 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v2 + +import ( + "net/http" + + v2 "k8s.io/api/autoscaling/v2" + "k8s.io/client-go/kubernetes/scheme" + rest "k8s.io/client-go/rest" +) + +type AutoscalingV2Interface interface { + RESTClient() rest.Interface + HorizontalPodAutoscalersGetter +} + +// AutoscalingV2Client is used to interact with features provided by the autoscaling group. +type AutoscalingV2Client struct { + restClient rest.Interface +} + +func (c *AutoscalingV2Client) HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface { + return newHorizontalPodAutoscalers(c, namespace) +} + +// NewForConfig creates a new AutoscalingV2Client for the given config. +// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), +// where httpClient was generated with rest.HTTPClientFor(c). +func NewForConfig(c *rest.Config) (*AutoscalingV2Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + httpClient, err := rest.HTTPClientFor(&config) + if err != nil { + return nil, err + } + return NewForConfigAndClient(&config, httpClient) +} + +// NewForConfigAndClient creates a new AutoscalingV2Client for the given config and http client. +// Note the http client provided takes precedence over the configured transport values. +func NewForConfigAndClient(c *rest.Config, h *http.Client) (*AutoscalingV2Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientForConfigAndClient(&config, h) + if err != nil { + return nil, err + } + return &AutoscalingV2Client{client}, nil +} + +// NewForConfigOrDie creates a new AutoscalingV2Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *AutoscalingV2Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new AutoscalingV2Client for the given RESTClient. +func New(c rest.Interface) *AutoscalingV2Client { + return &AutoscalingV2Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v2.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } + + return nil +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *AutoscalingV2Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2/doc.go b/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2/doc.go new file mode 100644 index 000000000000..86fb4bf582fb --- /dev/null +++ b/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2/doc.go @@ -0,0 +1,20 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated typed clients. +package v2 diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2/fake/doc.go b/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2/fake/doc.go new file mode 100644 index 000000000000..16f44399065e --- /dev/null +++ b/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2/fake/fake_autoscaling_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2/fake/fake_autoscaling_client.go new file mode 100644 index 000000000000..d4b907f4b078 --- /dev/null +++ b/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2/fake/fake_autoscaling_client.go @@ -0,0 +1,40 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + v2 "k8s.io/client-go/kubernetes/typed/autoscaling/v2" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeAutoscalingV2 struct { + *testing.Fake +} + +func (c *FakeAutoscalingV2) HorizontalPodAutoscalers(namespace string) v2.HorizontalPodAutoscalerInterface { + return &FakeHorizontalPodAutoscalers{c, namespace} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeAutoscalingV2) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2/fake/fake_horizontalpodautoscaler.go b/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2/fake/fake_horizontalpodautoscaler.go new file mode 100644 index 000000000000..ca4b24704dba --- /dev/null +++ b/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2/fake/fake_horizontalpodautoscaler.go @@ -0,0 +1,190 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v2 "k8s.io/api/autoscaling/v2" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + autoscalingv2 "k8s.io/client-go/applyconfigurations/autoscaling/v2" + testing "k8s.io/client-go/testing" +) + +// FakeHorizontalPodAutoscalers implements HorizontalPodAutoscalerInterface +type FakeHorizontalPodAutoscalers struct { + Fake *FakeAutoscalingV2 + ns string +} + +var horizontalpodautoscalersResource = schema.GroupVersionResource{Group: "autoscaling", Version: "v2", Resource: "horizontalpodautoscalers"} + +var horizontalpodautoscalersKind = schema.GroupVersionKind{Group: "autoscaling", Version: "v2", Kind: "HorizontalPodAutoscaler"} + +// Get takes name of the horizontalPodAutoscaler, and returns the corresponding horizontalPodAutoscaler object, and an error if there is any. +func (c *FakeHorizontalPodAutoscalers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.HorizontalPodAutoscaler, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(horizontalpodautoscalersResource, c.ns, name), &v2.HorizontalPodAutoscaler{}) + + if obj == nil { + return nil, err + } + return obj.(*v2.HorizontalPodAutoscaler), err +} + +// List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors. +func (c *FakeHorizontalPodAutoscalers) List(ctx context.Context, opts v1.ListOptions) (result *v2.HorizontalPodAutoscalerList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(horizontalpodautoscalersResource, horizontalpodautoscalersKind, c.ns, opts), &v2.HorizontalPodAutoscalerList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v2.HorizontalPodAutoscalerList{ListMeta: obj.(*v2.HorizontalPodAutoscalerList).ListMeta} + for _, item := range obj.(*v2.HorizontalPodAutoscalerList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers. +func (c *FakeHorizontalPodAutoscalers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(horizontalpodautoscalersResource, c.ns, opts)) + +} + +// Create takes the representation of a horizontalPodAutoscaler and creates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any. +func (c *FakeHorizontalPodAutoscalers) Create(ctx context.Context, horizontalPodAutoscaler *v2.HorizontalPodAutoscaler, opts v1.CreateOptions) (result *v2.HorizontalPodAutoscaler, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &v2.HorizontalPodAutoscaler{}) + + if obj == nil { + return nil, err + } + return obj.(*v2.HorizontalPodAutoscaler), err +} + +// Update takes the representation of a horizontalPodAutoscaler and updates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any. +func (c *FakeHorizontalPodAutoscalers) Update(ctx context.Context, horizontalPodAutoscaler *v2.HorizontalPodAutoscaler, opts v1.UpdateOptions) (result *v2.HorizontalPodAutoscaler, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &v2.HorizontalPodAutoscaler{}) + + if obj == nil { + return nil, err + } + return obj.(*v2.HorizontalPodAutoscaler), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeHorizontalPodAutoscalers) UpdateStatus(ctx context.Context, horizontalPodAutoscaler *v2.HorizontalPodAutoscaler, opts v1.UpdateOptions) (*v2.HorizontalPodAutoscaler, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(horizontalpodautoscalersResource, "status", c.ns, horizontalPodAutoscaler), &v2.HorizontalPodAutoscaler{}) + + if obj == nil { + return nil, err + } + return obj.(*v2.HorizontalPodAutoscaler), err +} + +// Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs. +func (c *FakeHorizontalPodAutoscalers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(horizontalpodautoscalersResource, c.ns, name, opts), &v2.HorizontalPodAutoscaler{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeHorizontalPodAutoscalers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(horizontalpodautoscalersResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v2.HorizontalPodAutoscalerList{}) + return err +} + +// Patch applies the patch and returns the patched horizontalPodAutoscaler. +func (c *FakeHorizontalPodAutoscalers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.HorizontalPodAutoscaler, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, name, pt, data, subresources...), &v2.HorizontalPodAutoscaler{}) + + if obj == nil { + return nil, err + } + return obj.(*v2.HorizontalPodAutoscaler), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied horizontalPodAutoscaler. +func (c *FakeHorizontalPodAutoscalers) Apply(ctx context.Context, horizontalPodAutoscaler *autoscalingv2.HorizontalPodAutoscalerApplyConfiguration, opts v1.ApplyOptions) (result *v2.HorizontalPodAutoscaler, err error) { + if horizontalPodAutoscaler == nil { + return nil, fmt.Errorf("horizontalPodAutoscaler provided to Apply must not be nil") + } + data, err := json.Marshal(horizontalPodAutoscaler) + if err != nil { + return nil, err + } + name := horizontalPodAutoscaler.Name + if name == nil { + return nil, fmt.Errorf("horizontalPodAutoscaler.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, *name, types.ApplyPatchType, data), &v2.HorizontalPodAutoscaler{}) + + if obj == nil { + return nil, err + } + return obj.(*v2.HorizontalPodAutoscaler), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeHorizontalPodAutoscalers) ApplyStatus(ctx context.Context, horizontalPodAutoscaler *autoscalingv2.HorizontalPodAutoscalerApplyConfiguration, opts v1.ApplyOptions) (result *v2.HorizontalPodAutoscaler, err error) { + if horizontalPodAutoscaler == nil { + return nil, fmt.Errorf("horizontalPodAutoscaler provided to Apply must not be nil") + } + data, err := json.Marshal(horizontalPodAutoscaler) + if err != nil { + return nil, err + } + name := horizontalPodAutoscaler.Name + if name == nil { + return nil, fmt.Errorf("horizontalPodAutoscaler.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v2.HorizontalPodAutoscaler{}) + + if obj == nil { + return nil, err + } + return obj.(*v2.HorizontalPodAutoscaler), err +} diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2/generated_expansion.go b/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2/generated_expansion.go new file mode 100644 index 000000000000..0470400fdf86 --- /dev/null +++ b/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2/generated_expansion.go @@ -0,0 +1,21 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v2 + +type HorizontalPodAutoscalerExpansion interface{} diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2/horizontalpodautoscaler.go b/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2/horizontalpodautoscaler.go new file mode 100644 index 000000000000..3a077d71dae5 --- /dev/null +++ b/staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2/horizontalpodautoscaler.go @@ -0,0 +1,256 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v2 + +import ( + "context" + json "encoding/json" + "fmt" + "time" + + v2 "k8s.io/api/autoscaling/v2" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + autoscalingv2 "k8s.io/client-go/applyconfigurations/autoscaling/v2" + scheme "k8s.io/client-go/kubernetes/scheme" + rest "k8s.io/client-go/rest" +) + +// HorizontalPodAutoscalersGetter has a method to return a HorizontalPodAutoscalerInterface. +// A group's client should implement this interface. +type HorizontalPodAutoscalersGetter interface { + HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface +} + +// HorizontalPodAutoscalerInterface has methods to work with HorizontalPodAutoscaler resources. +type HorizontalPodAutoscalerInterface interface { + Create(ctx context.Context, horizontalPodAutoscaler *v2.HorizontalPodAutoscaler, opts v1.CreateOptions) (*v2.HorizontalPodAutoscaler, error) + Update(ctx context.Context, horizontalPodAutoscaler *v2.HorizontalPodAutoscaler, opts v1.UpdateOptions) (*v2.HorizontalPodAutoscaler, error) + UpdateStatus(ctx context.Context, horizontalPodAutoscaler *v2.HorizontalPodAutoscaler, opts v1.UpdateOptions) (*v2.HorizontalPodAutoscaler, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v2.HorizontalPodAutoscaler, error) + List(ctx context.Context, opts v1.ListOptions) (*v2.HorizontalPodAutoscalerList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.HorizontalPodAutoscaler, err error) + Apply(ctx context.Context, horizontalPodAutoscaler *autoscalingv2.HorizontalPodAutoscalerApplyConfiguration, opts v1.ApplyOptions) (result *v2.HorizontalPodAutoscaler, err error) + ApplyStatus(ctx context.Context, horizontalPodAutoscaler *autoscalingv2.HorizontalPodAutoscalerApplyConfiguration, opts v1.ApplyOptions) (result *v2.HorizontalPodAutoscaler, err error) + HorizontalPodAutoscalerExpansion +} + +// horizontalPodAutoscalers implements HorizontalPodAutoscalerInterface +type horizontalPodAutoscalers struct { + client rest.Interface + ns string +} + +// newHorizontalPodAutoscalers returns a HorizontalPodAutoscalers +func newHorizontalPodAutoscalers(c *AutoscalingV2Client, namespace string) *horizontalPodAutoscalers { + return &horizontalPodAutoscalers{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the horizontalPodAutoscaler, and returns the corresponding horizontalPodAutoscaler object, and an error if there is any. +func (c *horizontalPodAutoscalers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.HorizontalPodAutoscaler, err error) { + result = &v2.HorizontalPodAutoscaler{} + err = c.client.Get(). + Namespace(c.ns). + Resource("horizontalpodautoscalers"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors. +func (c *horizontalPodAutoscalers) List(ctx context.Context, opts v1.ListOptions) (result *v2.HorizontalPodAutoscalerList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v2.HorizontalPodAutoscalerList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("horizontalpodautoscalers"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers. +func (c *horizontalPodAutoscalers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("horizontalpodautoscalers"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a horizontalPodAutoscaler and creates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any. +func (c *horizontalPodAutoscalers) Create(ctx context.Context, horizontalPodAutoscaler *v2.HorizontalPodAutoscaler, opts v1.CreateOptions) (result *v2.HorizontalPodAutoscaler, err error) { + result = &v2.HorizontalPodAutoscaler{} + err = c.client.Post(). + Namespace(c.ns). + Resource("horizontalpodautoscalers"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(horizontalPodAutoscaler). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a horizontalPodAutoscaler and updates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any. +func (c *horizontalPodAutoscalers) Update(ctx context.Context, horizontalPodAutoscaler *v2.HorizontalPodAutoscaler, opts v1.UpdateOptions) (result *v2.HorizontalPodAutoscaler, err error) { + result = &v2.HorizontalPodAutoscaler{} + err = c.client.Put(). + Namespace(c.ns). + Resource("horizontalpodautoscalers"). + Name(horizontalPodAutoscaler.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(horizontalPodAutoscaler). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *horizontalPodAutoscalers) UpdateStatus(ctx context.Context, horizontalPodAutoscaler *v2.HorizontalPodAutoscaler, opts v1.UpdateOptions) (result *v2.HorizontalPodAutoscaler, err error) { + result = &v2.HorizontalPodAutoscaler{} + err = c.client.Put(). + Namespace(c.ns). + Resource("horizontalpodautoscalers"). + Name(horizontalPodAutoscaler.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(horizontalPodAutoscaler). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs. +func (c *horizontalPodAutoscalers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("horizontalpodautoscalers"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *horizontalPodAutoscalers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("horizontalpodautoscalers"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched horizontalPodAutoscaler. +func (c *horizontalPodAutoscalers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.HorizontalPodAutoscaler, err error) { + result = &v2.HorizontalPodAutoscaler{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("horizontalpodautoscalers"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied horizontalPodAutoscaler. +func (c *horizontalPodAutoscalers) Apply(ctx context.Context, horizontalPodAutoscaler *autoscalingv2.HorizontalPodAutoscalerApplyConfiguration, opts v1.ApplyOptions) (result *v2.HorizontalPodAutoscaler, err error) { + if horizontalPodAutoscaler == nil { + return nil, fmt.Errorf("horizontalPodAutoscaler provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(horizontalPodAutoscaler) + if err != nil { + return nil, err + } + name := horizontalPodAutoscaler.Name + if name == nil { + return nil, fmt.Errorf("horizontalPodAutoscaler.Name must be provided to Apply") + } + result = &v2.HorizontalPodAutoscaler{} + err = c.client.Patch(types.ApplyPatchType). + Namespace(c.ns). + Resource("horizontalpodautoscalers"). + Name(*name). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *horizontalPodAutoscalers) ApplyStatus(ctx context.Context, horizontalPodAutoscaler *autoscalingv2.HorizontalPodAutoscalerApplyConfiguration, opts v1.ApplyOptions) (result *v2.HorizontalPodAutoscaler, err error) { + if horizontalPodAutoscaler == nil { + return nil, fmt.Errorf("horizontalPodAutoscaler provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(horizontalPodAutoscaler) + if err != nil { + return nil, err + } + + name := horizontalPodAutoscaler.Name + if name == nil { + return nil, fmt.Errorf("horizontalPodAutoscaler.Name must be provided to Apply") + } + + result = &v2.HorizontalPodAutoscaler{} + err = c.client.Patch(types.ApplyPatchType). + Namespace(c.ns). + Resource("horizontalpodautoscalers"). + Name(*name). + SubResource("status"). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/staging/src/k8s.io/client-go/listers/autoscaling/v2/expansion_generated.go b/staging/src/k8s.io/client-go/listers/autoscaling/v2/expansion_generated.go new file mode 100644 index 000000000000..97742b77b293 --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/autoscaling/v2/expansion_generated.go @@ -0,0 +1,27 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by lister-gen. DO NOT EDIT. + +package v2 + +// HorizontalPodAutoscalerListerExpansion allows custom methods to be added to +// HorizontalPodAutoscalerLister. +type HorizontalPodAutoscalerListerExpansion interface{} + +// HorizontalPodAutoscalerNamespaceListerExpansion allows custom methods to be added to +// HorizontalPodAutoscalerNamespaceLister. +type HorizontalPodAutoscalerNamespaceListerExpansion interface{} diff --git a/staging/src/k8s.io/client-go/listers/autoscaling/v2/horizontalpodautoscaler.go b/staging/src/k8s.io/client-go/listers/autoscaling/v2/horizontalpodautoscaler.go new file mode 100644 index 000000000000..a5cef2772577 --- /dev/null +++ b/staging/src/k8s.io/client-go/listers/autoscaling/v2/horizontalpodautoscaler.go @@ -0,0 +1,99 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by lister-gen. DO NOT EDIT. + +package v2 + +import ( + v2 "k8s.io/api/autoscaling/v2" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// HorizontalPodAutoscalerLister helps list HorizontalPodAutoscalers. +// All objects returned here must be treated as read-only. +type HorizontalPodAutoscalerLister interface { + // List lists all HorizontalPodAutoscalers in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v2.HorizontalPodAutoscaler, err error) + // HorizontalPodAutoscalers returns an object that can list and get HorizontalPodAutoscalers. + HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerNamespaceLister + HorizontalPodAutoscalerListerExpansion +} + +// horizontalPodAutoscalerLister implements the HorizontalPodAutoscalerLister interface. +type horizontalPodAutoscalerLister struct { + indexer cache.Indexer +} + +// NewHorizontalPodAutoscalerLister returns a new HorizontalPodAutoscalerLister. +func NewHorizontalPodAutoscalerLister(indexer cache.Indexer) HorizontalPodAutoscalerLister { + return &horizontalPodAutoscalerLister{indexer: indexer} +} + +// List lists all HorizontalPodAutoscalers in the indexer. +func (s *horizontalPodAutoscalerLister) List(selector labels.Selector) (ret []*v2.HorizontalPodAutoscaler, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v2.HorizontalPodAutoscaler)) + }) + return ret, err +} + +// HorizontalPodAutoscalers returns an object that can list and get HorizontalPodAutoscalers. +func (s *horizontalPodAutoscalerLister) HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerNamespaceLister { + return horizontalPodAutoscalerNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// HorizontalPodAutoscalerNamespaceLister helps list and get HorizontalPodAutoscalers. +// All objects returned here must be treated as read-only. +type HorizontalPodAutoscalerNamespaceLister interface { + // List lists all HorizontalPodAutoscalers in the indexer for a given namespace. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v2.HorizontalPodAutoscaler, err error) + // Get retrieves the HorizontalPodAutoscaler from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. + Get(name string) (*v2.HorizontalPodAutoscaler, error) + HorizontalPodAutoscalerNamespaceListerExpansion +} + +// horizontalPodAutoscalerNamespaceLister implements the HorizontalPodAutoscalerNamespaceLister +// interface. +type horizontalPodAutoscalerNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all HorizontalPodAutoscalers in the indexer for a given namespace. +func (s horizontalPodAutoscalerNamespaceLister) List(selector labels.Selector) (ret []*v2.HorizontalPodAutoscaler, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v2.HorizontalPodAutoscaler)) + }) + return ret, err +} + +// Get retrieves the HorizontalPodAutoscaler from the indexer for a given namespace and name. +func (s horizontalPodAutoscalerNamespaceLister) Get(name string) (*v2.HorizontalPodAutoscaler, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v2.Resource("horizontalpodautoscaler"), name) + } + return obj.(*v2.HorizontalPodAutoscaler), nil +} diff --git a/test/cmd/get.sh b/test/cmd/get.sh index 7f7ceb0c6111..36e1472eb243 100755 --- a/test/cmd/get.sh +++ b/test/cmd/get.sh @@ -108,7 +108,7 @@ run_kubectl_get_tests() { kube::test::if_has_string "${output_message}" "/apis/apps/v1/namespaces/default/deployments 200 OK" kube::test::if_has_string "${output_message}" "/apis/apps/v1/namespaces/default/replicasets 200 OK" kube::test::if_has_string "${output_message}" "/apis/apps/v1/namespaces/default/statefulsets 200 OK" - kube::test::if_has_string "${output_message}" "/apis/autoscaling/v1/namespaces/default/horizontalpodautoscalers 200" + kube::test::if_has_string "${output_message}" "/apis/autoscaling/v2/namespaces/default/horizontalpodautoscalers 200" kube::test::if_has_string "${output_message}" "/apis/batch/v1/namespaces/default/jobs 200 OK" kube::test::if_has_not_string "${output_message}" "/apis/extensions/v1beta1/namespaces/default/daemonsets 200 OK" kube::test::if_has_not_string "${output_message}" "/apis/extensions/v1beta1/namespaces/default/deployments 200 OK" diff --git a/test/cmd/legacy-script.sh b/test/cmd/legacy-script.sh index 9b9bcd7aa714..1d55570aadb4 100755 --- a/test/cmd/legacy-script.sh +++ b/test/cmd/legacy-script.sh @@ -377,7 +377,7 @@ runTests() { export container_name_field="(index .spec.template.spec.containers 0).name" export hpa_min_field=".spec.minReplicas" export hpa_max_field=".spec.maxReplicas" - export hpa_cpu_field=".spec.targetCPUUtilizationPercentage" + export hpa_cpu_field="(index .spec.metrics 0).resource.target.averageUtilization" export template_labels=".spec.template.metadata.labels.name" export statefulset_replicas_field=".spec.replicas" export statefulset_observed_generation=".status.observedGeneration" diff --git a/test/cmd/save-config.sh b/test/cmd/save-config.sh index cdc952b72fa8..293655be37d8 100755 --- a/test/cmd/save-config.sh +++ b/test/cmd/save-config.sh @@ -87,14 +87,14 @@ run_save_config_tests() { kubectl autoscale -f hack/testdata/frontend-controller.yaml --save-config "${kube_flags[@]}" --max=2 # Post-Condition: hpa "frontend" has configuration annotation grep -q "kubectl.kubernetes.io/last-applied-configuration" <<< "$(kubectl get hpa frontend -o yaml "${kube_flags[@]}")" - # Ensure we can interact with HPA objects in lists through autoscaling/v1 APIs + # Ensure we can interact with HPA objects in lists through autoscaling/v2 APIs output_message=$(kubectl get hpa -o=jsonpath='{.items[0].apiVersion}' 2>&1 "${kube_flags[@]}") - kube::test::if_has_string "${output_message}" 'autoscaling/v1' + kube::test::if_has_string "${output_message}" 'autoscaling/v2' output_message=$(kubectl get hpa.autoscaling -o=jsonpath='{.items[0].apiVersion}' 2>&1 "${kube_flags[@]}") - kube::test::if_has_string "${output_message}" 'autoscaling/v1' + kube::test::if_has_string "${output_message}" 'autoscaling/v2' # tests kubectl group prefix matching output_message=$(kubectl get hpa.autoscal -o=jsonpath='{.items[0].apiVersion}' 2>&1 "${kube_flags[@]}") - kube::test::if_has_string "${output_message}" 'autoscaling/v1' + kube::test::if_has_string "${output_message}" 'autoscaling/v2' # Clean up # Note that we should delete hpa first, otherwise it may fight with the rc reaper. kubectl delete hpa frontend "${kube_flags[@]}" diff --git a/test/integration/apiserver/apply/reset_fields_test.go b/test/integration/apiserver/apply/reset_fields_test.go index b28bc6106e41..55afd075f014 100644 --- a/test/integration/apiserver/apply/reset_fields_test.go +++ b/test/integration/apiserver/apply/reset_fields_test.go @@ -56,6 +56,7 @@ var resetFieldsStatusData = map[schema.GroupVersionResource]string{ gvr("networking.k8s.io", "v1beta1", "ingresses"): `{"status": {"loadBalancer": {"ingress": [{"ip": "127.0.0.2"}]}}}`, gvr("networking.k8s.io", "v1", "ingresses"): `{"status": {"loadBalancer": {"ingress": [{"ip": "127.0.0.2"}]}}}`, gvr("autoscaling", "v1", "horizontalpodautoscalers"): `{"status": {"currentReplicas": 25}}`, + gvr("autoscaling", "v2", "horizontalpodautoscalers"): `{"status": {"currentReplicas": 25}}`, gvr("batch", "v1", "cronjobs"): `{"status": {"lastScheduleTime": "2020-01-01T00:00:00Z"}}`, gvr("batch", "v1beta1", "cronjobs"): `{"status": {"lastScheduleTime": "2020-01-01T00:00:00Z"}}`, gvr("storage.k8s.io", "v1", "volumeattachments"): `{"status": {"attached": false}}`, @@ -110,6 +111,7 @@ var resetFieldsSpecData = map[schema.GroupVersionResource]string{ gvr("apps", "v1", "replicasets"): `{"spec": {"template": {"spec": {"containers": [{"image": "` + image2 + `", "name": "container4"}]}}}}`, gvr("apps", "v1", "statefulsets"): `{"spec": {"selector": {"matchLabels": {"a2": "b2"}}}}`, gvr("autoscaling", "v1", "horizontalpodautoscalers"): `{"spec": {"maxReplicas": 23}}`, + gvr("autoscaling", "v2", "horizontalpodautoscalers"): `{"spec": {"maxReplicas": 23}}`, gvr("autoscaling", "v2beta1", "horizontalpodautoscalers"): `{"spec": {"maxReplicas": 23}}`, gvr("autoscaling", "v2beta2", "horizontalpodautoscalers"): `{"spec": {"maxReplicas": 23}}`, gvr("batch", "v1", "jobs"): `{"spec": {"template": {"spec": {"containers": [{"image": "` + image2 + `", "name": "container1"}]}}}}`, diff --git a/test/integration/apiserver/apply/status_test.go b/test/integration/apiserver/apply/status_test.go index a72991db2214..3695ee49f4f9 100644 --- a/test/integration/apiserver/apply/status_test.go +++ b/test/integration/apiserver/apply/status_test.go @@ -51,6 +51,7 @@ var statusData = map[schema.GroupVersionResource]string{ gvr("networking.k8s.io", "v1beta1", "ingresses"): `{"status": {"loadBalancer": {"ingress": [{"ip": "127.0.0.1"}]}}}`, gvr("networking.k8s.io", "v1", "ingresses"): `{"status": {"loadBalancer": {"ingress": [{"ip": "127.0.0.1"}]}}}`, gvr("autoscaling", "v1", "horizontalpodautoscalers"): `{"status": {"currentReplicas": 5}}`, + gvr("autoscaling", "v2", "horizontalpodautoscalers"): `{"status": {"currentReplicas": 5}}`, gvr("batch", "v1", "cronjobs"): `{"status": {"lastScheduleTime": null}}`, gvr("batch", "v1beta1", "cronjobs"): `{"status": {"lastScheduleTime": null}}`, gvr("storage.k8s.io", "v1", "volumeattachments"): `{"status": {"attached": true}}`, diff --git a/test/integration/etcd/data.go b/test/integration/etcd/data.go index e1adfe6037d6..c4123cbeda74 100644 --- a/test/integration/etcd/data.go +++ b/test/integration/etcd/data.go @@ -131,6 +131,14 @@ func GetEtcdStorageDataForNamespace(namespace string) map[schema.GroupVersionRes }, // -- + // k8s.io/kubernetes/pkg/apis/autoscaling/v2 + gvr("autoscaling", "v2", "horizontalpodautoscalers"): { + Stub: `{"metadata": {"name": "hpa4"}, "spec": {"maxReplicas": 3, "scaleTargetRef": {"kind": "something", "name": "cross"}}}`, + ExpectedEtcdPath: "/registry/horizontalpodautoscalers/" + namespace + "/hpa4", + ExpectedGVK: gvkP("autoscaling", "v1", "HorizontalPodAutoscaler"), + }, + // -- + // k8s.io/kubernetes/pkg/apis/autoscaling/v2beta1 gvr("autoscaling", "v2beta1", "horizontalpodautoscalers"): { Stub: `{"metadata": {"name": "hpa1"}, "spec": {"maxReplicas": 3, "scaleTargetRef": {"kind": "something", "name": "cross"}}}`, diff --git a/vendor/modules.txt b/vendor/modules.txt index cba08df75c3b..94c701f9ce6f 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1279,6 +1279,7 @@ k8s.io/api/authentication/v1beta1 k8s.io/api/authorization/v1 k8s.io/api/authorization/v1beta1 k8s.io/api/autoscaling/v1 +k8s.io/api/autoscaling/v2 k8s.io/api/autoscaling/v2beta1 k8s.io/api/autoscaling/v2beta2 k8s.io/api/batch/v1 @@ -1597,6 +1598,7 @@ k8s.io/client-go/applyconfigurations/apps/v1 k8s.io/client-go/applyconfigurations/apps/v1beta1 k8s.io/client-go/applyconfigurations/apps/v1beta2 k8s.io/client-go/applyconfigurations/autoscaling/v1 +k8s.io/client-go/applyconfigurations/autoscaling/v2 k8s.io/client-go/applyconfigurations/autoscaling/v2beta1 k8s.io/client-go/applyconfigurations/autoscaling/v2beta2 k8s.io/client-go/applyconfigurations/batch/v1 @@ -1654,6 +1656,7 @@ k8s.io/client-go/informers/apps/v1beta1 k8s.io/client-go/informers/apps/v1beta2 k8s.io/client-go/informers/autoscaling k8s.io/client-go/informers/autoscaling/v1 +k8s.io/client-go/informers/autoscaling/v2 k8s.io/client-go/informers/autoscaling/v2beta1 k8s.io/client-go/informers/autoscaling/v2beta2 k8s.io/client-go/informers/batch @@ -1727,6 +1730,8 @@ k8s.io/client-go/kubernetes/typed/authorization/v1beta1 k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake k8s.io/client-go/kubernetes/typed/autoscaling/v1 k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake +k8s.io/client-go/kubernetes/typed/autoscaling/v2 +k8s.io/client-go/kubernetes/typed/autoscaling/v2/fake k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1 k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/fake k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2 @@ -1800,6 +1805,7 @@ k8s.io/client-go/listers/apps/v1 k8s.io/client-go/listers/apps/v1beta1 k8s.io/client-go/listers/apps/v1beta2 k8s.io/client-go/listers/autoscaling/v1 +k8s.io/client-go/listers/autoscaling/v2 k8s.io/client-go/listers/autoscaling/v2beta1 k8s.io/client-go/listers/autoscaling/v2beta2 k8s.io/client-go/listers/batch/v1