Class HorizontalPodAutoscalerSpec
- java.lang.Object
-
- io.fabric8.kubernetes.api.model.autoscaling.v1.HorizontalPodAutoscalerSpec
-
- All Implemented Interfaces:
io.fabric8.kubernetes.api.builder.Editable<HorizontalPodAutoscalerSpecBuilder>,io.fabric8.kubernetes.api.model.KubernetesResource,Serializable
@Generated("io.fabric8.kubernetes.schema.generator.model.ModelGenerator") public class HorizontalPodAutoscalerSpec extends Object implements io.fabric8.kubernetes.api.builder.Editable<HorizontalPodAutoscalerSpecBuilder>, io.fabric8.kubernetes.api.model.KubernetesResourcespecification of a horizontal pod autoscaler.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description HorizontalPodAutoscalerSpec()No args constructor for use in serializationHorizontalPodAutoscalerSpec(Integer maxReplicas, Integer minReplicas, CrossVersionObjectReference scaleTargetRef, Integer targetCPUUtilizationPercentage)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HorizontalPodAutoscalerSpecBuilderedit()Map<String,Object>getAdditionalProperties()IntegergetMaxReplicas()maxReplicas is the upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.IntegergetMinReplicas()minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down.CrossVersionObjectReferencegetScaleTargetRef()specification of a horizontal pod autoscaler.IntegergetTargetCPUUtilizationPercentage()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.voidsetAdditionalProperties(Map<String,Object> additionalProperties)voidsetAdditionalProperty(String name, Object value)voidsetMaxReplicas(Integer maxReplicas)maxReplicas is the upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.voidsetMinReplicas(Integer minReplicas)minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down.voidsetScaleTargetRef(CrossVersionObjectReference scaleTargetRef)specification of a horizontal pod autoscaler.voidsetTargetCPUUtilizationPercentage(Integer targetCPUUtilizationPercentage)targetCPUUtilizationPercentage is the target average CPU utilization (represented as a percentage of requested CPU) over all the pods; if not specified the default autoscaling policy will be used.HorizontalPodAutoscalerSpecBuildertoBuilder()
-
-
-
Constructor Detail
-
HorizontalPodAutoscalerSpec
public HorizontalPodAutoscalerSpec()
No args constructor for use in serialization
-
HorizontalPodAutoscalerSpec
public HorizontalPodAutoscalerSpec(Integer maxReplicas, Integer minReplicas, CrossVersionObjectReference scaleTargetRef, Integer targetCPUUtilizationPercentage)
-
-
Method Detail
-
getMaxReplicas
public Integer getMaxReplicas()
maxReplicas is the upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.
-
setMaxReplicas
public void setMaxReplicas(Integer maxReplicas)
maxReplicas is the upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.
-
getMinReplicas
public Integer 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.
-
setMinReplicas
public void setMinReplicas(Integer minReplicas)
minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down. It defaults to 1 pod. minReplicas is allowed to be 0 if the alpha feature gate HPAScaleToZero is enabled and at least one Object or External metric is configured. Scaling is active as long as at least one metric value is available.
-
getScaleTargetRef
public CrossVersionObjectReference getScaleTargetRef()
specification of a horizontal pod autoscaler.
-
setScaleTargetRef
public void setScaleTargetRef(CrossVersionObjectReference scaleTargetRef)
specification of a horizontal pod autoscaler.
-
getTargetCPUUtilizationPercentage
public Integer 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.
-
setTargetCPUUtilizationPercentage
public void setTargetCPUUtilizationPercentage(Integer targetCPUUtilizationPercentage)
targetCPUUtilizationPercentage is the target average CPU utilization (represented as a percentage of requested CPU) over all the pods; if not specified the default autoscaling policy will be used.
-
edit
public HorizontalPodAutoscalerSpecBuilder edit()
- Specified by:
editin interfaceio.fabric8.kubernetes.api.builder.Editable<HorizontalPodAutoscalerSpecBuilder>
-
toBuilder
public HorizontalPodAutoscalerSpecBuilder toBuilder()
-
-