| page_title | castai_autoscaler Resource - terraform-provider-castai |
|---|---|
| subcategory | |
| description | CAST AI autoscaler resource to manage autoscaler settings |
CAST AI autoscaler resource to manage autoscaler settings
resource "castai_autoscaler" "castai_autoscaler_policy" {
cluster_id = castai_eks_cluster.test.id
autoscaler_settings {
enabled = true
is_scoped_mode = false
node_templates_partial_matching_enabled = false
unschedulable_pods {
enabled = true
}
cluster_limits {
enabled = true
cpu {
min_cores = 1
max_cores = 10
}
}
node_downscaler {
enabled = true
empty_nodes {
enabled = true
delay_seconds = 90
}
evictor {
enabled = true
dry_run = false
aggressive_mode = false
scoped_mode = false
cycle_interval = "60s"
node_grace_period_minutes = 10
pod_eviction_failure_back_off_interval = "30s"
ignore_pod_disruption_budgets = false
}
}
}
}autoscaler_policies_json(String, Deprecated) autoscaler policies JSON string to override current autoscaler settingsautoscaler_settings(Block List, Max: 1) autoscaler policy definitions to override current autoscaler settings (see below for nested schema)cluster_id(String) CAST AI cluster idtimeouts(Block, Optional) (see below for nested schema)
autoscaler_policies(String) computed value to store full policies configurationid(String) The ID of this resource.
Optional:
cluster_limits(Block List, Max: 1) defines minimum and maximum amount of CPU the cluster can have. (see below for nested schema)enabled(Boolean) enable/disable autoscaler policiesis_scoped_mode(Boolean) run autoscaler in scoped mode. Only marked pods and nodes will be considered.node_downscaler(Block List, Max: 1) node downscaler defines policies for removing nodes based on the configured conditions. (see below for nested schema)node_templates_partial_matching_enabled(Boolean) marks whether partial matching should be used when deciding which custom node template to select.spot_instances(Block List, Max: 1, Deprecated) policy defining whether autoscaler can use spot instances for provisioning additional workloads. (see below for nested schema)unschedulable_pods(Block List, Max: 1) policy defining autoscaler's behavior when unschedulable pods were detected. (see below for nested schema)
Optional:
cpu(Block List, Max: 1) defines the minimum and maximum amount of CPUs for cluster's worker nodes. (see below for nested schema)enabled(Boolean) enable/disable cluster size limits policy.
Optional:
max_cores(Number) defines the maximum allowed amount of vCPUs in the whole cluster.min_cores(Number) defines the minimum allowed amount of CPUs in the whole cluster.
Optional:
empty_nodes(Block List, Max: 1) defines whether Node Downscaler should opt in for removing empty worker nodes when possible. (see below for nested schema)enabled(Boolean) enable/disable node downscaler policy.evictor(Block List, Max: 1) defines the CAST AI Evictor component settings. Evictor watches the pods running in your cluster and looks for ways to compact them into fewer nodes, making nodes empty, which will be removed by the empty worker nodes policy. (see below for nested schema)
Optional:
delay_seconds(Number) period (in seconds) to wait before removing the node. Might be useful to control the aggressiveness of the downscaler.enabled(Boolean) enable/disable the empty worker nodes policy.
Optional:
aggressive_mode(Boolean) enable/disable aggressive mode. By default, Evictor does not target nodes that are running unreplicated pods. This mode will make the Evictor start considering application with just a single replica.cycle_interval(String) configure the interval duration between Evictor operations. This property can be used to lower or raise the frequency of the Evictor's find-and-drain operations.dry_run(Boolean) enable/disable dry-run. This property allows you to prevent the Evictor from carrying any operations out and preview the actions it would take.enabled(Boolean) enable/disable the Evictor policy. This will either install or uninstall the Evictor component in your cluster.ignore_pod_disruption_budgets(Boolean) if enabled then Evictor will attempt to evict pods that have pod disruption budgets configured.node_grace_period_minutes(Number) configure the node grace period which controls the duration which must pass after a node has been created before Evictor starts considering that node.pod_eviction_failure_back_off_interval(String) configure the pod eviction failure back off interval. If pod eviction fails then Evictor will attempt to evict it again after the amount of time specified here.scoped_mode(Boolean) enable/disable scoped mode. By default, Evictor targets all nodes in the cluster. This mode will constrain it to just the nodes which were created by CAST AI.
Optional:
enabled(Boolean, Deprecated) enable/disable spot instances policy.max_reclaim_rate(Number, Deprecated) max allowed reclaim rate when choosing spot instance type. E.g. if the value is 10%, instance types having 10% or higher reclaim rate will not be considered. Set to zero to use all instance types regardless of reclaim rate.spot_backups(Block List, Max: 1, Deprecated) policy defining whether autoscaler can use spot backups instead of spot instances when spot instances are not available. (see below for nested schema)spot_diversity_enabled(Boolean, Deprecated) enable/disable spot diversity policy. When enabled, autoscaler will try to balance between diverse and cost optimal instance types.spot_diversity_price_increase_limit(Number, Deprecated) allowed node configuration price increase when diversifying instance types. E.g. if the value is 10%, then the overall price of diversified instance types can be 10% higher than the price of the optimal configuration.spot_interruption_predictions(Block List, Max: 1, Deprecated) configure the handling of SPOT interruption predictions. (see below for nested schema)
Optional:
enabled(Boolean) enable/disable spot backups policy.spot_backup_restore_rate_seconds(Number) defines interval on how often spot backups restore to real spot should occur.
Optional:
enabled(Boolean) enable/disable spot interruption predictions.spot_interruption_predictions_type(String) define the type of the spot interruption prediction to handle. Allowed values are AWSRebalanceRecommendations, CASTAIInterruptionPredictions.
Optional:
custom_instances_enabled(Boolean, Deprecated) enable/disable custom instances policy.enabled(Boolean) enable/disable unschedulable pods detection policy.headroom(Block List, Max: 1, Deprecated) additional headroom based on cluster's total available capacity for on-demand nodes. (see below for nested schema)headroom_spot(Block List, Max: 1, Deprecated) additional headroom based on cluster's total available capacity for spot nodes. (see below for nested schema)node_constraints(Block List, Max: 1, Deprecated) defines the node constraints that will be applied when autoscaling with Unschedulable Pods policy. (see below for nested schema)pod_pinner(Block List, Max: 1) defines the Cast AI Pod Pinner components settings. (see below for nested schema)
Optional:
cpu_percentage(Number) defines percentage of additional CPU capacity to be added.enabled(Boolean) enable/disable headroom policy.memory_percentage(Number) defines percentage of additional memory capacity to be added.
Optional:
cpu_percentage(Number) defines percentage of additional CPU capacity to be added.enabled(Boolean) enable/disable headroom_spot policy.memory_percentage(Number) defines percentage of additional memory capacity to be added.
Optional:
enabled(Boolean) enable/disable node constraints policy.max_cpu_cores(Number) defines max CPU cores for the node to pick.max_ram_mib(Number) defines max RAM in MiB for the node to pick.min_cpu_cores(Number) defines min CPU cores for the node to pick.min_ram_mib(Number) defines min RAM in MiB for the node to pick.
Optional:
enabled(Boolean) enable/disable the Pod Pinner component's automatic management in your cluster. Default: enabled.
Optional:
create(String)update(String)