Class ManagedClusterPropertiesAutoScalerProfile
java.lang.Object
com.azure.resourcemanager.containerservice.models.ManagedClusterPropertiesAutoScalerProfile
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ManagedClusterPropertiesAutoScalerProfile>
public final class ManagedClusterPropertiesAutoScalerProfile
extends Object
implements com.azure.json.JsonSerializable<ManagedClusterPropertiesAutoScalerProfile>
Parameters to be applied to the cluster-autoscaler when enabled.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of ManagedClusterPropertiesAutoScalerProfile class. -
Method Summary
Modifier and TypeMethodDescriptionGet the balanceSimilarNodeGroups property: Valid values are 'true' and 'false'.Get the daemonsetEvictionForEmptyNodes property: If set to true, all daemonset pods on empty nodes will be evicted before deletion of the node.Get the daemonsetEvictionForOccupiedNodes property: If set to true, all daemonset pods on occupied nodes will be evicted before deletion of the node.expander()Get the expander property: If not specified, the default is 'random'.fromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ManagedClusterPropertiesAutoScalerProfile from the JsonReader.Get the ignoreDaemonsetsUtilization property: If set to true, the resources used by daemonset will be taken into account when making scaling down decisions.Get the maxEmptyBulkDelete property: The default is 10.Get the maxGracefulTerminationSec property: The default is 600.Get the maxNodeProvisionTime property: The default is '15m'.Get the maxTotalUnreadyPercentage property: The default is 45.Get the newPodScaleUpDelay property: 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.Get the okTotalUnreadyCount property: This must be an integer.Get the scaleDownDelayAfterAdd property: The default is '10m'.Get the scaleDownDelayAfterDelete property: The default is the scan-interval.Get the scaleDownDelayAfterFailure property: The default is '3m'.Get the scaleDownUnneededTime property: The default is '10m'.Get the scaleDownUnreadyTime property: The default is '20m'.Get the scaleDownUtilizationThreshold property: The default is '0.5'.Get the scanInterval property: The default is '10'.Get the skipNodesWithLocalStorage property: The default is true.Get the skipNodesWithSystemPods property: The default is true.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withBalanceSimilarNodeGroups(String balanceSimilarNodeGroups) Set the balanceSimilarNodeGroups property: Valid values are 'true' and 'false'.withDaemonsetEvictionForEmptyNodes(Boolean daemonsetEvictionForEmptyNodes) Set the daemonsetEvictionForEmptyNodes property: If set to true, all daemonset pods on empty nodes will be evicted before deletion of the node.withDaemonsetEvictionForOccupiedNodes(Boolean daemonsetEvictionForOccupiedNodes) Set the daemonsetEvictionForOccupiedNodes property: If set to true, all daemonset pods on occupied nodes will be evicted before deletion of the node.withExpander(Expander expander) Set the expander property: If not specified, the default is 'random'.withIgnoreDaemonsetsUtilization(Boolean ignoreDaemonsetsUtilization) Set the ignoreDaemonsetsUtilization property: If set to true, the resources used by daemonset will be taken into account when making scaling down decisions.withMaxEmptyBulkDelete(String maxEmptyBulkDelete) Set the maxEmptyBulkDelete property: The default is 10.withMaxGracefulTerminationSec(String maxGracefulTerminationSec) Set the maxGracefulTerminationSec property: The default is 600.withMaxNodeProvisionTime(String maxNodeProvisionTime) Set the maxNodeProvisionTime property: The default is '15m'.withMaxTotalUnreadyPercentage(String maxTotalUnreadyPercentage) Set the maxTotalUnreadyPercentage property: The default is 45.withNewPodScaleUpDelay(String newPodScaleUpDelay) Set the newPodScaleUpDelay property: 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.withOkTotalUnreadyCount(String okTotalUnreadyCount) Set the okTotalUnreadyCount property: This must be an integer.withScaleDownDelayAfterAdd(String scaleDownDelayAfterAdd) Set the scaleDownDelayAfterAdd property: The default is '10m'.withScaleDownDelayAfterDelete(String scaleDownDelayAfterDelete) Set the scaleDownDelayAfterDelete property: The default is the scan-interval.withScaleDownDelayAfterFailure(String scaleDownDelayAfterFailure) Set the scaleDownDelayAfterFailure property: The default is '3m'.withScaleDownUnneededTime(String scaleDownUnneededTime) Set the scaleDownUnneededTime property: The default is '10m'.withScaleDownUnreadyTime(String scaleDownUnreadyTime) Set the scaleDownUnreadyTime property: The default is '20m'.withScaleDownUtilizationThreshold(String scaleDownUtilizationThreshold) Set the scaleDownUtilizationThreshold property: The default is '0.5'.withScanInterval(String scanInterval) Set the scanInterval property: The default is '10'.withSkipNodesWithLocalStorage(String skipNodesWithLocalStorage) Set the skipNodesWithLocalStorage property: The default is true.withSkipNodesWithSystemPods(String skipNodesWithSystemPods) Set the skipNodesWithSystemPods property: The default is true.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
ManagedClusterPropertiesAutoScalerProfile
public ManagedClusterPropertiesAutoScalerProfile()Creates an instance of ManagedClusterPropertiesAutoScalerProfile class.
-
-
Method Details
-
balanceSimilarNodeGroups
Get the balanceSimilarNodeGroups property: Valid values are 'true' and 'false'.- Returns:
- the balanceSimilarNodeGroups value.
-
withBalanceSimilarNodeGroups
public ManagedClusterPropertiesAutoScalerProfile withBalanceSimilarNodeGroups(String balanceSimilarNodeGroups) Set the balanceSimilarNodeGroups property: Valid values are 'true' and 'false'.- Parameters:
balanceSimilarNodeGroups- the balanceSimilarNodeGroups value to set.- Returns:
- the ManagedClusterPropertiesAutoScalerProfile object itself.
-
daemonsetEvictionForEmptyNodes
Get the daemonsetEvictionForEmptyNodes property: If set to true, all daemonset pods on empty nodes will be evicted before deletion of the node. If the daemonset pod cannot be evicted another node will be chosen for scaling. If set to false, the node will be deleted without ensuring that daemonset pods are deleted or evicted.- Returns:
- the daemonsetEvictionForEmptyNodes value.
-
withDaemonsetEvictionForEmptyNodes
public ManagedClusterPropertiesAutoScalerProfile withDaemonsetEvictionForEmptyNodes(Boolean daemonsetEvictionForEmptyNodes) Set the daemonsetEvictionForEmptyNodes property: If set to true, all daemonset pods on empty nodes will be evicted before deletion of the node. If the daemonset pod cannot be evicted another node will be chosen for scaling. If set to false, the node will be deleted without ensuring that daemonset pods are deleted or evicted.- Parameters:
daemonsetEvictionForEmptyNodes- the daemonsetEvictionForEmptyNodes value to set.- Returns:
- the ManagedClusterPropertiesAutoScalerProfile object itself.
-
daemonsetEvictionForOccupiedNodes
Get the daemonsetEvictionForOccupiedNodes property: If set to true, all daemonset pods on occupied nodes will be evicted before deletion of the node. If the daemonset pod cannot be evicted another node will be chosen for scaling. If set to false, the node will be deleted without ensuring that daemonset pods are deleted or evicted.- Returns:
- the daemonsetEvictionForOccupiedNodes value.
-
withDaemonsetEvictionForOccupiedNodes
public ManagedClusterPropertiesAutoScalerProfile withDaemonsetEvictionForOccupiedNodes(Boolean daemonsetEvictionForOccupiedNodes) Set the daemonsetEvictionForOccupiedNodes property: If set to true, all daemonset pods on occupied nodes will be evicted before deletion of the node. If the daemonset pod cannot be evicted another node will be chosen for scaling. If set to false, the node will be deleted without ensuring that daemonset pods are deleted or evicted.- Parameters:
daemonsetEvictionForOccupiedNodes- the daemonsetEvictionForOccupiedNodes value to set.- Returns:
- the ManagedClusterPropertiesAutoScalerProfile object itself.
-
ignoreDaemonsetsUtilization
Get the ignoreDaemonsetsUtilization property: If set to true, the resources used by daemonset will be taken into account when making scaling down decisions.- Returns:
- the ignoreDaemonsetsUtilization value.
-
withIgnoreDaemonsetsUtilization
public ManagedClusterPropertiesAutoScalerProfile withIgnoreDaemonsetsUtilization(Boolean ignoreDaemonsetsUtilization) Set the ignoreDaemonsetsUtilization property: If set to true, the resources used by daemonset will be taken into account when making scaling down decisions.- Parameters:
ignoreDaemonsetsUtilization- the ignoreDaemonsetsUtilization value to set.- Returns:
- the ManagedClusterPropertiesAutoScalerProfile object itself.
-
expander
Get the expander property: 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
Set the expander property: 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
Get the maxEmptyBulkDelete property: The default is 10.- Returns:
- the maxEmptyBulkDelete value.
-
withMaxEmptyBulkDelete
Set the maxEmptyBulkDelete property: The default is 10.- Parameters:
maxEmptyBulkDelete- the maxEmptyBulkDelete value to set.- Returns:
- the ManagedClusterPropertiesAutoScalerProfile object itself.
-
maxGracefulTerminationSec
Get the maxGracefulTerminationSec property: The default is 600.- Returns:
- the maxGracefulTerminationSec value.
-
withMaxGracefulTerminationSec
public ManagedClusterPropertiesAutoScalerProfile withMaxGracefulTerminationSec(String maxGracefulTerminationSec) Set the maxGracefulTerminationSec property: The default is 600.- Parameters:
maxGracefulTerminationSec- the maxGracefulTerminationSec value to set.- Returns:
- the ManagedClusterPropertiesAutoScalerProfile object itself.
-
maxNodeProvisionTime
Get the maxNodeProvisionTime property: 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 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
Get the maxTotalUnreadyPercentage property: 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 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
Get the newPodScaleUpDelay property: 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
Set the newPodScaleUpDelay property: 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
Get the okTotalUnreadyCount property: This must be an integer. The default is 3.- Returns:
- the okTotalUnreadyCount value.
-
withOkTotalUnreadyCount
public ManagedClusterPropertiesAutoScalerProfile withOkTotalUnreadyCount(String okTotalUnreadyCount) Set the okTotalUnreadyCount property: This must be an integer. The default is 3.- Parameters:
okTotalUnreadyCount- the okTotalUnreadyCount value to set.- Returns:
- the ManagedClusterPropertiesAutoScalerProfile object itself.
-
scanInterval
Get the scanInterval property: The default is '10'. Values must be an integer number of seconds.- Returns:
- the scanInterval value.
-
withScanInterval
Set the scanInterval property: 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
Get the scaleDownDelayAfterAdd property: 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: 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
Get the scaleDownDelayAfterDelete property: 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: 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
Get the scaleDownDelayAfterFailure property: 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: 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
Get the scaleDownUnneededTime property: 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: 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
Get the scaleDownUnreadyTime property: 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: 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
Get the scaleDownUtilizationThreshold property: The default is '0.5'.- Returns:
- the scaleDownUtilizationThreshold value.
-
withScaleDownUtilizationThreshold
public ManagedClusterPropertiesAutoScalerProfile withScaleDownUtilizationThreshold(String scaleDownUtilizationThreshold) Set the scaleDownUtilizationThreshold property: The default is '0.5'.- Parameters:
scaleDownUtilizationThreshold- the scaleDownUtilizationThreshold value to set.- Returns:
- the ManagedClusterPropertiesAutoScalerProfile object itself.
-
skipNodesWithLocalStorage
Get the skipNodesWithLocalStorage property: The default is true.- Returns:
- the skipNodesWithLocalStorage value.
-
withSkipNodesWithLocalStorage
public ManagedClusterPropertiesAutoScalerProfile withSkipNodesWithLocalStorage(String skipNodesWithLocalStorage) Set the skipNodesWithLocalStorage property: The default is true.- Parameters:
skipNodesWithLocalStorage- the skipNodesWithLocalStorage value to set.- Returns:
- the ManagedClusterPropertiesAutoScalerProfile object itself.
-
skipNodesWithSystemPods
Get the skipNodesWithSystemPods property: The default is true.- Returns:
- the skipNodesWithSystemPods value.
-
withSkipNodesWithSystemPods
public ManagedClusterPropertiesAutoScalerProfile withSkipNodesWithSystemPods(String skipNodesWithSystemPods) Set the skipNodesWithSystemPods property: 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.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<ManagedClusterPropertiesAutoScalerProfile>- Throws:
IOException
-
fromJson
public static ManagedClusterPropertiesAutoScalerProfile fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of ManagedClusterPropertiesAutoScalerProfile from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of ManagedClusterPropertiesAutoScalerProfile if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IOException- If an error occurs while reading the ManagedClusterPropertiesAutoScalerProfile.
-