Class ClusterAutoscalerSpec
- java.lang.Object
-
- io.fabric8.openshift.api.model.autoscaling.v1.ClusterAutoscalerSpec
-
- All Implemented Interfaces:
io.fabric8.kubernetes.api.builder.Editable<ClusterAutoscalerSpecBuilder>,io.fabric8.kubernetes.api.model.KubernetesResource,Serializable
@Generated("io.fabric8.kubernetes.schema.generator.model.ModelGenerator") public class ClusterAutoscalerSpec extends Object implements io.fabric8.kubernetes.api.builder.Editable<ClusterAutoscalerSpecBuilder>, io.fabric8.kubernetes.api.model.KubernetesResource
Desired state of ClusterAutoscaler resource- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ClusterAutoscalerSpec()No args constructor for use in serializationClusterAutoscalerSpec(Boolean balanceSimilarNodeGroups, List<String> balancingIgnoredLabels, List<String> expanders, Boolean ignoreDaemonsetsUtilization, Integer logVerbosity, String maxNodeProvisionTime, Integer maxPodGracePeriod, Integer podPriorityThreshold, ClusterAutoscalerSpecResourceLimits resourceLimits, ClusterAutoscalerSpecScaleDown scaleDown, Boolean skipNodesWithLocalStorage)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClusterAutoscalerSpecBuilderedit()Map<String,Object>getAdditionalProperties()BooleangetBalanceSimilarNodeGroups()BalanceSimilarNodeGroups enables/disables the `--balance-similar-node-groups` cluster-autoscaler feature.List<String>getBalancingIgnoredLabels()BalancingIgnoredLabels sets "--balancing-ignore-label <label name>" flag on cluster-autoscaler for each listed label.List<String>getExpanders()Sets the type and order of expanders to be used during scale out operations.BooleangetIgnoreDaemonsetsUtilization()Enables/Disables `--ignore-daemonsets-utilization` CA feature flag.IntegergetLogVerbosity()Sets the autoscaler log level.StringgetMaxNodeProvisionTime()Maximum time CA waits for node to be provisionedIntegergetMaxPodGracePeriod()Gives pods graceful termination time before scaling downIntegergetPodPriorityThreshold()To allow users to schedule "best-effort" pods, which shouldn't trigger Cluster Autoscaler actions, but only run when there are spare resources available, More info: https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#how-does-cluster-autoscaler-work-with-pod-priority-and-preemptionClusterAutoscalerSpecResourceLimitsgetResourceLimits()Desired state of ClusterAutoscaler resourceClusterAutoscalerSpecScaleDowngetScaleDown()Desired state of ClusterAutoscaler resourceBooleangetSkipNodesWithLocalStorage()Enables/Disables `--skip-nodes-with-local-storage` CA feature flag.voidsetAdditionalProperties(Map<String,Object> additionalProperties)voidsetAdditionalProperty(String name, Object value)voidsetBalanceSimilarNodeGroups(Boolean balanceSimilarNodeGroups)BalanceSimilarNodeGroups enables/disables the `--balance-similar-node-groups` cluster-autoscaler feature.voidsetBalancingIgnoredLabels(List<String> balancingIgnoredLabels)BalancingIgnoredLabels sets "--balancing-ignore-label <label name>" flag on cluster-autoscaler for each listed label.voidsetExpanders(List<String> expanders)Sets the type and order of expanders to be used during scale out operations.voidsetIgnoreDaemonsetsUtilization(Boolean ignoreDaemonsetsUtilization)Enables/Disables `--ignore-daemonsets-utilization` CA feature flag.voidsetLogVerbosity(Integer logVerbosity)Sets the autoscaler log level.voidsetMaxNodeProvisionTime(String maxNodeProvisionTime)Maximum time CA waits for node to be provisionedvoidsetMaxPodGracePeriod(Integer maxPodGracePeriod)Gives pods graceful termination time before scaling downvoidsetPodPriorityThreshold(Integer podPriorityThreshold)To allow users to schedule "best-effort" pods, which shouldn't trigger Cluster Autoscaler actions, but only run when there are spare resources available, More info: https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#how-does-cluster-autoscaler-work-with-pod-priority-and-preemptionvoidsetResourceLimits(ClusterAutoscalerSpecResourceLimits resourceLimits)Desired state of ClusterAutoscaler resourcevoidsetScaleDown(ClusterAutoscalerSpecScaleDown scaleDown)Desired state of ClusterAutoscaler resourcevoidsetSkipNodesWithLocalStorage(Boolean skipNodesWithLocalStorage)Enables/Disables `--skip-nodes-with-local-storage` CA feature flag.ClusterAutoscalerSpecBuildertoBuilder()
-
-
-
Constructor Detail
-
ClusterAutoscalerSpec
public ClusterAutoscalerSpec()
No args constructor for use in serialization
-
ClusterAutoscalerSpec
public ClusterAutoscalerSpec(Boolean balanceSimilarNodeGroups, List<String> balancingIgnoredLabels, List<String> expanders, Boolean ignoreDaemonsetsUtilization, Integer logVerbosity, String maxNodeProvisionTime, Integer maxPodGracePeriod, Integer podPriorityThreshold, ClusterAutoscalerSpecResourceLimits resourceLimits, ClusterAutoscalerSpecScaleDown scaleDown, Boolean skipNodesWithLocalStorage)
-
-
Method Detail
-
getBalanceSimilarNodeGroups
public Boolean getBalanceSimilarNodeGroups()
BalanceSimilarNodeGroups enables/disables the `--balance-similar-node-groups` cluster-autoscaler feature. This feature will automatically identify node groups with the same instance type and the same set of labels and try to keep the respective sizes of those node groups balanced.
-
setBalanceSimilarNodeGroups
public void setBalanceSimilarNodeGroups(Boolean balanceSimilarNodeGroups)
BalanceSimilarNodeGroups enables/disables the `--balance-similar-node-groups` cluster-autoscaler feature. This feature will automatically identify node groups with the same instance type and the same set of labels and try to keep the respective sizes of those node groups balanced.
-
getBalancingIgnoredLabels
public List<String> getBalancingIgnoredLabels()
BalancingIgnoredLabels sets "--balancing-ignore-label <label name>" flag on cluster-autoscaler for each listed label. This option specifies labels that cluster autoscaler should ignore when considering node group similarity. For example, if you have nodes with "topology.ebs.csi.aws.com/zone" label, you can add name of this label here to prevent cluster autoscaler from spliting nodes into different node groups based on its value.
-
setBalancingIgnoredLabels
public void setBalancingIgnoredLabels(List<String> balancingIgnoredLabels)
BalancingIgnoredLabels sets "--balancing-ignore-label <label name>" flag on cluster-autoscaler for each listed label. This option specifies labels that cluster autoscaler should ignore when considering node group similarity. For example, if you have nodes with "topology.ebs.csi.aws.com/zone" label, you can add name of this label here to prevent cluster autoscaler from spliting nodes into different node groups based on its value.
-
getExpanders
public List<String> getExpanders()
Sets the type and order of expanders to be used during scale out operations. This option specifies an ordered list, highest priority first, of expanders that will be used by the cluster autoscaler to select node groups for expansion when scaling out. Expanders instruct the autoscaler on how to choose node groups when scaling out the cluster. They can be specified in order so that the result from the first expander is used as the input to the second, and so forth. For example, if set to `[LeastWaste, Random]` the autoscaler will first evaluate node groups to determine which will have the least resource waste, if multiple groups are selected the autoscaler will then randomly choose between those groups to determine the group for scaling. The following expanders are available: * LeastWaste - selects the node group that will have the least idle CPU (if tied, unused memory) after scale-up. * Priority - selects the node group that has the highest priority assigned by the user. For details, please see https://github.com/openshift/kubernetes-autoscaler/blob/master/cluster-autoscaler/expander/priority/readme.md * Random - selects the node group randomly. If not specified, the default value is `Random`, available options are: `LeastWaste`, `Priority`, `Random`.
-
setExpanders
public void setExpanders(List<String> expanders)
Sets the type and order of expanders to be used during scale out operations. This option specifies an ordered list, highest priority first, of expanders that will be used by the cluster autoscaler to select node groups for expansion when scaling out. Expanders instruct the autoscaler on how to choose node groups when scaling out the cluster. They can be specified in order so that the result from the first expander is used as the input to the second, and so forth. For example, if set to `[LeastWaste, Random]` the autoscaler will first evaluate node groups to determine which will have the least resource waste, if multiple groups are selected the autoscaler will then randomly choose between those groups to determine the group for scaling. The following expanders are available: * LeastWaste - selects the node group that will have the least idle CPU (if tied, unused memory) after scale-up. * Priority - selects the node group that has the highest priority assigned by the user. For details, please see https://github.com/openshift/kubernetes-autoscaler/blob/master/cluster-autoscaler/expander/priority/readme.md * Random - selects the node group randomly. If not specified, the default value is `Random`, available options are: `LeastWaste`, `Priority`, `Random`.
-
getIgnoreDaemonsetsUtilization
public Boolean getIgnoreDaemonsetsUtilization()
Enables/Disables `--ignore-daemonsets-utilization` CA feature flag. Should CA ignore DaemonSet pods when calculating resource utilization for scaling down. false by default
-
setIgnoreDaemonsetsUtilization
public void setIgnoreDaemonsetsUtilization(Boolean ignoreDaemonsetsUtilization)
Enables/Disables `--ignore-daemonsets-utilization` CA feature flag. Should CA ignore DaemonSet pods when calculating resource utilization for scaling down. false by default
-
getLogVerbosity
public Integer getLogVerbosity()
Sets the autoscaler log level. Default value is 1, level 4 is recommended for DEBUGGING and level 6 will enable almost everything.This option has priority over log level set by the `CLUSTER_AUTOSCALER_VERBOSITY` environment variable.
-
setLogVerbosity
public void setLogVerbosity(Integer logVerbosity)
Sets the autoscaler log level. Default value is 1, level 4 is recommended for DEBUGGING and level 6 will enable almost everything.This option has priority over log level set by the `CLUSTER_AUTOSCALER_VERBOSITY` environment variable.
-
getMaxNodeProvisionTime
public String getMaxNodeProvisionTime()
Maximum time CA waits for node to be provisioned
-
setMaxNodeProvisionTime
public void setMaxNodeProvisionTime(String maxNodeProvisionTime)
Maximum time CA waits for node to be provisioned
-
getMaxPodGracePeriod
public Integer getMaxPodGracePeriod()
Gives pods graceful termination time before scaling down
-
setMaxPodGracePeriod
public void setMaxPodGracePeriod(Integer maxPodGracePeriod)
Gives pods graceful termination time before scaling down
-
getPodPriorityThreshold
public Integer getPodPriorityThreshold()
To allow users to schedule "best-effort" pods, which shouldn't trigger Cluster Autoscaler actions, but only run when there are spare resources available, More info: https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#how-does-cluster-autoscaler-work-with-pod-priority-and-preemption
-
setPodPriorityThreshold
public void setPodPriorityThreshold(Integer podPriorityThreshold)
To allow users to schedule "best-effort" pods, which shouldn't trigger Cluster Autoscaler actions, but only run when there are spare resources available, More info: https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#how-does-cluster-autoscaler-work-with-pod-priority-and-preemption
-
getResourceLimits
public ClusterAutoscalerSpecResourceLimits getResourceLimits()
Desired state of ClusterAutoscaler resource
-
setResourceLimits
public void setResourceLimits(ClusterAutoscalerSpecResourceLimits resourceLimits)
Desired state of ClusterAutoscaler resource
-
getScaleDown
public ClusterAutoscalerSpecScaleDown getScaleDown()
Desired state of ClusterAutoscaler resource
-
setScaleDown
public void setScaleDown(ClusterAutoscalerSpecScaleDown scaleDown)
Desired state of ClusterAutoscaler resource
-
getSkipNodesWithLocalStorage
public Boolean getSkipNodesWithLocalStorage()
Enables/Disables `--skip-nodes-with-local-storage` CA feature flag. If true cluster autoscaler will never delete nodes with pods with local storage, e.g. EmptyDir or HostPath. true by default at autoscaler
-
setSkipNodesWithLocalStorage
public void setSkipNodesWithLocalStorage(Boolean skipNodesWithLocalStorage)
Enables/Disables `--skip-nodes-with-local-storage` CA feature flag. If true cluster autoscaler will never delete nodes with pods with local storage, e.g. EmptyDir or HostPath. true by default at autoscaler
-
edit
public ClusterAutoscalerSpecBuilder edit()
- Specified by:
editin interfaceio.fabric8.kubernetes.api.builder.Editable<ClusterAutoscalerSpecBuilder>
-
toBuilder
public ClusterAutoscalerSpecBuilder toBuilder()
-
-