Class V2HorizontalPodAutoscalerSpec

java.lang.Object
io.micronaut.kubernetes.client.openapi.model.V2HorizontalPodAutoscalerSpec

@Generated("io.micronaut.openapi.generator.JavaMicronautClientCodegen") public class V2HorizontalPodAutoscalerSpec extends Object
HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler.
  • Field Details

  • Constructor Details

  • Method Details

    • 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:
      the maxReplicas property value
    • setMaxReplicas

      public void setMaxReplicas(Integer maxReplicas)
      Set the maxReplicas property value
      Parameters:
      maxReplicas - property value to set
    • maxReplicas

      public V2HorizontalPodAutoscalerSpec maxReplicas(Integer maxReplicas)
      Set maxReplicas in a chainable fashion.
      Returns:
      The same instance of V2HorizontalPodAutoscalerSpec for chaining.
    • getScaleTargetRef

      public V2CrossVersionObjectReference getScaleTargetRef()
      Returns:
      the scaleTargetRef property value
    • setScaleTargetRef

      public void setScaleTargetRef(V2CrossVersionObjectReference scaleTargetRef)
      Set the scaleTargetRef property value
      Parameters:
      scaleTargetRef - property value to set
    • scaleTargetRef

      public V2HorizontalPodAutoscalerSpec scaleTargetRef(V2CrossVersionObjectReference scaleTargetRef)
      Set scaleTargetRef in a chainable fashion.
      Returns:
      The same instance of V2HorizontalPodAutoscalerSpec for chaining.
    • getBehavior

      public V2HorizontalPodAutoscalerBehavior getBehavior()
      Returns:
      the behavior property value
    • setBehavior

      public void setBehavior(V2HorizontalPodAutoscalerBehavior behavior)
      Set the behavior property value
      Parameters:
      behavior - property value to set
    • behavior

      Set behavior in a chainable fashion.
      Returns:
      The same instance of V2HorizontalPodAutoscalerSpec for chaining.
    • getMetrics

      public List<@Valid V2MetricSpec> 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. If not set, the default metric will be set to 80% average CPU utilization.
      Returns:
      the metrics property value
    • setMetrics

      public void setMetrics(List<@Valid V2MetricSpec> metrics)
      Set the metrics property value
      Parameters:
      metrics - property value to set
    • metrics

      public V2HorizontalPodAutoscalerSpec metrics(List<@Valid V2MetricSpec> metrics)
      Set metrics in a chainable fashion.
      Returns:
      The same instance of V2HorizontalPodAutoscalerSpec for chaining.
    • addmetricsItem

      public V2HorizontalPodAutoscalerSpec addmetricsItem(V2MetricSpec metricsItem)
      Add an item to the metrics property in a chainable fashion.
      Returns:
      The same instance of V2HorizontalPodAutoscalerSpec for chaining.
    • 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.
      Returns:
      the minReplicas property value
    • setMinReplicas

      public void setMinReplicas(Integer minReplicas)
      Set the minReplicas property value
      Parameters:
      minReplicas - property value to set
    • minReplicas

      public V2HorizontalPodAutoscalerSpec minReplicas(Integer minReplicas)
      Set minReplicas in a chainable fashion.
      Returns:
      The same instance of V2HorizontalPodAutoscalerSpec for chaining.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object