Class ManagedClusterPropertiesAutoScalerProfile

java.lang.Object
com.azure.resourcemanager.containerservice.models.ManagedClusterPropertiesAutoScalerProfile

public final class ManagedClusterPropertiesAutoScalerProfile extends Object
Parameters to be applied to the cluster-autoscaler when enabled.
  • Constructor Details

    • ManagedClusterPropertiesAutoScalerProfile

      public ManagedClusterPropertiesAutoScalerProfile()
      Creates an instance of ManagedClusterPropertiesAutoScalerProfile class.
  • Method Details

    • balanceSimilarNodeGroups

      public String balanceSimilarNodeGroups()
      Get the balanceSimilarNodeGroups property: Detects similar node pools and balances the number of nodes between them. Valid values are 'true' and 'false'.
      Returns:
      the balanceSimilarNodeGroups value.
    • withBalanceSimilarNodeGroups

      public ManagedClusterPropertiesAutoScalerProfile withBalanceSimilarNodeGroups(String balanceSimilarNodeGroups)
      Set the balanceSimilarNodeGroups property: Detects similar node pools and balances the number of nodes between them. Valid values are 'true' and 'false'.
      Parameters:
      balanceSimilarNodeGroups - the balanceSimilarNodeGroups value to set.
      Returns:
      the ManagedClusterPropertiesAutoScalerProfile object itself.
    • expander

      public Expander expander()
      Get the expander property: The expander to use when scaling up If not specified, the default is 'random'. See [expanders](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders) for more information.
      Returns:
      the expander value.
    • withExpander

      public ManagedClusterPropertiesAutoScalerProfile withExpander(Expander expander)
      Set the expander property: The expander to use when scaling up If not specified, the default is 'random'. See [expanders](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders) for more information.
      Parameters:
      expander - the expander value to set.
      Returns:
      the ManagedClusterPropertiesAutoScalerProfile object itself.
    • maxEmptyBulkDelete

      public String maxEmptyBulkDelete()
      Get the maxEmptyBulkDelete property: The maximum number of empty nodes that can be deleted at the same time. This must be a positive integer. The default is 10.
      Returns:
      the maxEmptyBulkDelete value.
    • withMaxEmptyBulkDelete

      public ManagedClusterPropertiesAutoScalerProfile withMaxEmptyBulkDelete(String maxEmptyBulkDelete)
      Set the maxEmptyBulkDelete property: The maximum number of empty nodes that can be deleted at the same time. This must be a positive integer. The default is 10.
      Parameters:
      maxEmptyBulkDelete - the maxEmptyBulkDelete value to set.
      Returns:
      the ManagedClusterPropertiesAutoScalerProfile object itself.
    • maxGracefulTerminationSec

      public String maxGracefulTerminationSec()
      Get the maxGracefulTerminationSec property: The maximum number of seconds the cluster autoscaler waits for pod termination when trying to scale down a node. The default is 600.
      Returns:
      the maxGracefulTerminationSec value.
    • withMaxGracefulTerminationSec

      public ManagedClusterPropertiesAutoScalerProfile withMaxGracefulTerminationSec(String maxGracefulTerminationSec)
      Set the maxGracefulTerminationSec property: The maximum number of seconds the cluster autoscaler waits for pod termination when trying to scale down a node. The default is 600.
      Parameters:
      maxGracefulTerminationSec - the maxGracefulTerminationSec value to set.
      Returns:
      the ManagedClusterPropertiesAutoScalerProfile object itself.
    • maxNodeProvisionTime

      public String maxNodeProvisionTime()
      Get the maxNodeProvisionTime property: The maximum time the autoscaler waits for a node to be provisioned. The default is '15m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported.
      Returns:
      the maxNodeProvisionTime value.
    • withMaxNodeProvisionTime

      public ManagedClusterPropertiesAutoScalerProfile withMaxNodeProvisionTime(String maxNodeProvisionTime)
      Set the maxNodeProvisionTime property: The maximum time the autoscaler waits for a node to be provisioned. The default is '15m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported.
      Parameters:
      maxNodeProvisionTime - the maxNodeProvisionTime value to set.
      Returns:
      the ManagedClusterPropertiesAutoScalerProfile object itself.
    • maxTotalUnreadyPercentage

      public String maxTotalUnreadyPercentage()
      Get the maxTotalUnreadyPercentage property: The maximum percentage of unready nodes in the cluster. After this percentage is exceeded, cluster autoscaler halts operations. The default is 45. The maximum is 100 and the minimum is 0.
      Returns:
      the maxTotalUnreadyPercentage value.
    • withMaxTotalUnreadyPercentage

      public ManagedClusterPropertiesAutoScalerProfile withMaxTotalUnreadyPercentage(String maxTotalUnreadyPercentage)
      Set the maxTotalUnreadyPercentage property: The maximum percentage of unready nodes in the cluster. After this percentage is exceeded, cluster autoscaler halts operations. The default is 45. The maximum is 100 and the minimum is 0.
      Parameters:
      maxTotalUnreadyPercentage - the maxTotalUnreadyPercentage value to set.
      Returns:
      the ManagedClusterPropertiesAutoScalerProfile object itself.
    • newPodScaleUpDelay

      public String newPodScaleUpDelay()
      Get the newPodScaleUpDelay property: Ignore unscheduled pods before they're a certain age. For scenarios like burst/batch scale where you don't want CA to act before the kubernetes scheduler could schedule all the pods, you can tell CA to ignore unscheduled pods before they're a certain age. The default is '0s'. Values must be an integer followed by a unit ('s' for seconds, 'm' for minutes, 'h' for hours, etc).
      Returns:
      the newPodScaleUpDelay value.
    • withNewPodScaleUpDelay

      public ManagedClusterPropertiesAutoScalerProfile withNewPodScaleUpDelay(String newPodScaleUpDelay)
      Set the newPodScaleUpDelay property: Ignore unscheduled pods before they're a certain age. For scenarios like burst/batch scale where you don't want CA to act before the kubernetes scheduler could schedule all the pods, you can tell CA to ignore unscheduled pods before they're a certain age. The default is '0s'. Values must be an integer followed by a unit ('s' for seconds, 'm' for minutes, 'h' for hours, etc).
      Parameters:
      newPodScaleUpDelay - the newPodScaleUpDelay value to set.
      Returns:
      the ManagedClusterPropertiesAutoScalerProfile object itself.
    • okTotalUnreadyCount

      public String okTotalUnreadyCount()
      Get the okTotalUnreadyCount property: The number of allowed unready nodes, irrespective of max-total-unready-percentage. This must be an integer. The default is 3.
      Returns:
      the okTotalUnreadyCount value.
    • withOkTotalUnreadyCount

      public ManagedClusterPropertiesAutoScalerProfile withOkTotalUnreadyCount(String okTotalUnreadyCount)
      Set the okTotalUnreadyCount property: The number of allowed unready nodes, irrespective of max-total-unready-percentage. This must be an integer. The default is 3.
      Parameters:
      okTotalUnreadyCount - the okTotalUnreadyCount value to set.
      Returns:
      the ManagedClusterPropertiesAutoScalerProfile object itself.
    • scanInterval

      public String scanInterval()
      Get the scanInterval property: How often cluster is reevaluated for scale up or down. The default is '10'. Values must be an integer number of seconds.
      Returns:
      the scanInterval value.
    • withScanInterval

      public ManagedClusterPropertiesAutoScalerProfile withScanInterval(String scanInterval)
      Set the scanInterval property: How often cluster is reevaluated for scale up or down. The default is '10'. Values must be an integer number of seconds.
      Parameters:
      scanInterval - the scanInterval value to set.
      Returns:
      the ManagedClusterPropertiesAutoScalerProfile object itself.
    • scaleDownDelayAfterAdd

      public String scaleDownDelayAfterAdd()
      Get the scaleDownDelayAfterAdd property: How long after scale up that scale down evaluation resumes The default is '10m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported.
      Returns:
      the scaleDownDelayAfterAdd value.
    • withScaleDownDelayAfterAdd

      public ManagedClusterPropertiesAutoScalerProfile withScaleDownDelayAfterAdd(String scaleDownDelayAfterAdd)
      Set the scaleDownDelayAfterAdd property: How long after scale up that scale down evaluation resumes The default is '10m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported.
      Parameters:
      scaleDownDelayAfterAdd - the scaleDownDelayAfterAdd value to set.
      Returns:
      the ManagedClusterPropertiesAutoScalerProfile object itself.
    • scaleDownDelayAfterDelete

      public String scaleDownDelayAfterDelete()
      Get the scaleDownDelayAfterDelete property: How long after node deletion that scale down evaluation resumes. The default is the scan-interval. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported.
      Returns:
      the scaleDownDelayAfterDelete value.
    • withScaleDownDelayAfterDelete

      public ManagedClusterPropertiesAutoScalerProfile withScaleDownDelayAfterDelete(String scaleDownDelayAfterDelete)
      Set the scaleDownDelayAfterDelete property: How long after node deletion that scale down evaluation resumes. The default is the scan-interval. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported.
      Parameters:
      scaleDownDelayAfterDelete - the scaleDownDelayAfterDelete value to set.
      Returns:
      the ManagedClusterPropertiesAutoScalerProfile object itself.
    • scaleDownDelayAfterFailure

      public String scaleDownDelayAfterFailure()
      Get the scaleDownDelayAfterFailure property: How long after scale down failure that scale down evaluation resumes. The default is '3m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported.
      Returns:
      the scaleDownDelayAfterFailure value.
    • withScaleDownDelayAfterFailure

      public ManagedClusterPropertiesAutoScalerProfile withScaleDownDelayAfterFailure(String scaleDownDelayAfterFailure)
      Set the scaleDownDelayAfterFailure property: How long after scale down failure that scale down evaluation resumes. The default is '3m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported.
      Parameters:
      scaleDownDelayAfterFailure - the scaleDownDelayAfterFailure value to set.
      Returns:
      the ManagedClusterPropertiesAutoScalerProfile object itself.
    • scaleDownUnneededTime

      public String scaleDownUnneededTime()
      Get the scaleDownUnneededTime property: How long a node should be unneeded before it is eligible for scale down. The default is '10m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported.
      Returns:
      the scaleDownUnneededTime value.
    • withScaleDownUnneededTime

      public ManagedClusterPropertiesAutoScalerProfile withScaleDownUnneededTime(String scaleDownUnneededTime)
      Set the scaleDownUnneededTime property: How long a node should be unneeded before it is eligible for scale down. The default is '10m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported.
      Parameters:
      scaleDownUnneededTime - the scaleDownUnneededTime value to set.
      Returns:
      the ManagedClusterPropertiesAutoScalerProfile object itself.
    • scaleDownUnreadyTime

      public String scaleDownUnreadyTime()
      Get the scaleDownUnreadyTime property: How long an unready node should be unneeded before it is eligible for scale down The default is '20m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported.
      Returns:
      the scaleDownUnreadyTime value.
    • withScaleDownUnreadyTime

      public ManagedClusterPropertiesAutoScalerProfile withScaleDownUnreadyTime(String scaleDownUnreadyTime)
      Set the scaleDownUnreadyTime property: How long an unready node should be unneeded before it is eligible for scale down The default is '20m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported.
      Parameters:
      scaleDownUnreadyTime - the scaleDownUnreadyTime value to set.
      Returns:
      the ManagedClusterPropertiesAutoScalerProfile object itself.
    • scaleDownUtilizationThreshold

      public String scaleDownUtilizationThreshold()
      Get the scaleDownUtilizationThreshold property: Node utilization level, defined as sum of requested resources divided by capacity, below which a node can be considered for scale down. The default is '0.5'.
      Returns:
      the scaleDownUtilizationThreshold value.
    • withScaleDownUtilizationThreshold

      public ManagedClusterPropertiesAutoScalerProfile withScaleDownUtilizationThreshold(String scaleDownUtilizationThreshold)
      Set the scaleDownUtilizationThreshold property: Node utilization level, defined as sum of requested resources divided by capacity, below which a node can be considered for scale down. The default is '0.5'.
      Parameters:
      scaleDownUtilizationThreshold - the scaleDownUtilizationThreshold value to set.
      Returns:
      the ManagedClusterPropertiesAutoScalerProfile object itself.
    • skipNodesWithLocalStorage

      public String skipNodesWithLocalStorage()
      Get the skipNodesWithLocalStorage property: If cluster autoscaler will skip deleting nodes with pods with local storage, for example, EmptyDir or HostPath. The default is true.
      Returns:
      the skipNodesWithLocalStorage value.
    • withSkipNodesWithLocalStorage

      public ManagedClusterPropertiesAutoScalerProfile withSkipNodesWithLocalStorage(String skipNodesWithLocalStorage)
      Set the skipNodesWithLocalStorage property: If cluster autoscaler will skip deleting nodes with pods with local storage, for example, EmptyDir or HostPath. The default is true.
      Parameters:
      skipNodesWithLocalStorage - the skipNodesWithLocalStorage value to set.
      Returns:
      the ManagedClusterPropertiesAutoScalerProfile object itself.
    • skipNodesWithSystemPods

      public String skipNodesWithSystemPods()
      Get the skipNodesWithSystemPods property: If cluster autoscaler will skip deleting nodes with pods from kube-system (except for DaemonSet or mirror pods) The default is true.
      Returns:
      the skipNodesWithSystemPods value.
    • withSkipNodesWithSystemPods

      public ManagedClusterPropertiesAutoScalerProfile withSkipNodesWithSystemPods(String skipNodesWithSystemPods)
      Set the skipNodesWithSystemPods property: If cluster autoscaler will skip deleting nodes with pods from kube-system (except for DaemonSet or mirror pods) The default is true.
      Parameters:
      skipNodesWithSystemPods - the skipNodesWithSystemPods value to set.
      Returns:
      the ManagedClusterPropertiesAutoScalerProfile object itself.
    • validate

      public void validate()
      Validates the instance.
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.