Class V1HorizontalPodAutoscalerSpec
java.lang.Object
io.kubernetes.client.openapi.models.V1HorizontalPodAutoscalerSpec
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
date="2025-02-04T19:05:53.712211Z[Etc/UTC]",
comments="Generator version: 7.6.0")
public class V1HorizontalPodAutoscalerSpec
extends Object
specification of a horizontal pod autoscaler.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanCreate an instance of V1HorizontalPodAutoscalerSpec given an JSON stringmaxReplicas is the upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down.Get scaleTargetReftargetCPUUtilizationPercentage is the target average CPU utilization (represented as a percentage of requested CPU) over all the pods; if not specified the default autoscaling policy will be used.inthashCode()maxReplicas(Integer maxReplicas) minReplicas(Integer minReplicas) scaleTargetRef(V1CrossVersionObjectReference scaleTargetRef) voidsetMaxReplicas(Integer maxReplicas) voidsetMinReplicas(Integer minReplicas) voidsetScaleTargetRef(V1CrossVersionObjectReference scaleTargetRef) voidsetTargetCPUUtilizationPercentage(Integer targetCPUUtilizationPercentage) targetCPUUtilizationPercentage(Integer targetCPUUtilizationPercentage) toJson()Convert an instance of V1HorizontalPodAutoscalerSpec to an JSON stringtoString()static voidvalidateJsonElement(com.google.gson.JsonElement jsonElement) Validates the JSON Element and throws an exception if issues found
-
Field Details
-
SERIALIZED_NAME_MAX_REPLICAS
- See Also:
-
SERIALIZED_NAME_MIN_REPLICAS
- See Also:
-
SERIALIZED_NAME_SCALE_TARGET_REF
- See Also:
-
SERIALIZED_NAME_TARGET_C_P_U_UTILIZATION_PERCENTAGE
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
V1HorizontalPodAutoscalerSpec
public V1HorizontalPodAutoscalerSpec()
-
-
Method Details
-
maxReplicas
-
getMaxReplicas
maxReplicas is the upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.- Returns:
- maxReplicas
-
setMaxReplicas
-
minReplicas
-
getMinReplicas
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.- Returns:
- minReplicas
-
setMinReplicas
-
scaleTargetRef
-
getScaleTargetRef
Get scaleTargetRef- Returns:
- scaleTargetRef
-
setScaleTargetRef
-
targetCPUUtilizationPercentage
public V1HorizontalPodAutoscalerSpec targetCPUUtilizationPercentage(Integer targetCPUUtilizationPercentage) -
getTargetCPUUtilizationPercentage
targetCPUUtilizationPercentage is the target average CPU utilization (represented as a percentage of requested CPU) over all the pods; if not specified the default autoscaling policy will be used.- Returns:
- targetCPUUtilizationPercentage
-
setTargetCPUUtilizationPercentage
-
equals
-
hashCode
public int hashCode() -
toString
-
validateJsonElement
Validates the JSON Element and throws an exception if issues found- Parameters:
jsonElement- JSON Element- Throws:
IOException- if the JSON Element is invalid with respect to V1HorizontalPodAutoscalerSpec
-
fromJson
Create an instance of V1HorizontalPodAutoscalerSpec given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of V1HorizontalPodAutoscalerSpec
- Throws:
IOException- if the JSON string is invalid with respect to V1HorizontalPodAutoscalerSpec
-
toJson
Convert an instance of V1HorizontalPodAutoscalerSpec to an JSON string- Returns:
- JSON string
-