Class 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
    • 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
      • 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
      • getAdditionalProperties

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

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

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