Package net.stickycode.kuuty.model.v18
Class IoK8sApiAutoscalingV2beta1HorizontalPodAutoscalerSpec
- java.lang.Object
-
- net.stickycode.kuuty.model.v18.IoK8sApiAutoscalingV2beta1HorizontalPodAutoscalerSpec
-
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2020-11-26T11:01:11.402583+13:00[Pacific/Auckland]") public class IoK8sApiAutoscalingV2beta1HorizontalPodAutoscalerSpec extends Object
HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler.
-
-
Field Summary
Fields Modifier and Type Field Description static StringJSON_PROPERTY_MAX_REPLICASstatic StringJSON_PROPERTY_METRICSstatic StringJSON_PROPERTY_MIN_REPLICASstatic StringJSON_PROPERTY_SCALE_TARGET_REF
-
Constructor Summary
Constructors Constructor Description IoK8sApiAutoscalingV2beta1HorizontalPodAutoscalerSpec()
-
Method Summary
-
-
-
Field Detail
-
JSON_PROPERTY_MAX_REPLICAS
public static final String JSON_PROPERTY_MAX_REPLICAS
- See Also:
- Constant Field Values
-
JSON_PROPERTY_METRICS
public static final String JSON_PROPERTY_METRICS
- See Also:
- Constant Field Values
-
JSON_PROPERTY_MIN_REPLICAS
public static final String JSON_PROPERTY_MIN_REPLICAS
- See Also:
- Constant Field Values
-
JSON_PROPERTY_SCALE_TARGET_REF
public static final String JSON_PROPERTY_SCALE_TARGET_REF
- See Also:
- Constant Field Values
-
-
Method Detail
-
maxReplicas
public IoK8sApiAutoscalingV2beta1HorizontalPodAutoscalerSpec maxReplicas(Integer maxReplicas)
-
getMaxReplicas
public Integer getMaxReplicas()
maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up. It cannot be less that minReplicas.- Returns:
- maxReplicas
-
setMaxReplicas
public void setMaxReplicas(Integer maxReplicas)
-
metrics
public IoK8sApiAutoscalingV2beta1HorizontalPodAutoscalerSpec metrics(List<IoK8sApiAutoscalingV2beta1MetricSpec> metrics)
-
addMetricsItem
public IoK8sApiAutoscalingV2beta1HorizontalPodAutoscalerSpec addMetricsItem(IoK8sApiAutoscalingV2beta1MetricSpec metricsItem)
-
getMetrics
@Nullable public List<IoK8sApiAutoscalingV2beta1MetricSpec> getMetrics()
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.- Returns:
- metrics
-
setMetrics
public void setMetrics(List<IoK8sApiAutoscalingV2beta1MetricSpec> metrics)
-
minReplicas
public IoK8sApiAutoscalingV2beta1HorizontalPodAutoscalerSpec minReplicas(Integer minReplicas)
-
getMinReplicas
@Nullable 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.- Returns:
- minReplicas
-
setMinReplicas
public void setMinReplicas(Integer minReplicas)
-
scaleTargetRef
public IoK8sApiAutoscalingV2beta1HorizontalPodAutoscalerSpec scaleTargetRef(IoK8sApiAutoscalingV2beta1CrossVersionObjectReference scaleTargetRef)
-
getScaleTargetRef
public IoK8sApiAutoscalingV2beta1CrossVersionObjectReference getScaleTargetRef()
Get scaleTargetRef- Returns:
- scaleTargetRef
-
setScaleTargetRef
public void setScaleTargetRef(IoK8sApiAutoscalingV2beta1CrossVersionObjectReference scaleTargetRef)
-
-