Class 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.KubernetesResource
    HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler.
    See Also:
    Serialized Form
    • Constructor Detail

      • HorizontalPodAutoscalerSpec

        public HorizontalPodAutoscalerSpec()
        No args constructor for use in serialization
    • Method Detail

      • 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.
      • setMaxReplicas

        public void setMaxReplicas​(Integer maxReplicas)
        maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up. It cannot be less that minReplicas.
      • getMetrics

        public List<MetricSpec> 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.
      • setMetrics

        public void setMetrics​(List<MetricSpec> metrics)
        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.
      • 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()
        HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler.
      • setScaleTargetRef

        public void setScaleTargetRef​(CrossVersionObjectReference scaleTargetRef)
        HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler.
      • getAdditionalProperties

        public Map<String,​Object> getAdditionalProperties()
      • setAdditionalProperty

        public void setAdditionalProperty​(String name,
                                          Object value)
      • setAdditionalProperties

        public void setAdditionalProperties​(Map<String,​Object> additionalProperties)