Skip to content

Commit

Permalink
feat: introduce autoscaler_settings to autoscaler_policies resour…
Browse files Browse the repository at this point in the history
…ce (#329)
  • Loading branch information
mikenorgate authored Jun 11, 2024
1 parent e070bca commit 85fa100
Show file tree
Hide file tree
Showing 20 changed files with 1,750 additions and 329 deletions.
82 changes: 82 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,88 @@ module "castai-aks-cluster" {
}
```
* [v7.2.X] Deprecated `autoscaler_policies_json` attribute in `castai_autoscaler` resource. Use `autoscaler_settings` instead.
Old configuration:
```hcl
resource "castai_autoscaler" "castai_autoscaler_policies" {
cluster_id = data.castai_eks_clusterid.cluster_id.id // or other reference
autoscaler_policies_json = <<-EOT
{
"enabled": true,
"unschedulablePods": {
"enabled": true
},
"nodeDownscaler": {
"enabled": true,
"emptyNodes": {
"enabled": true
},
"evictor": {
"aggressiveMode": false,
"cycleInterval": "5m10s",
"dryRun": false,
"enabled": true,
"nodeGracePeriodMinutes": 10,
"scopedMode": false
}
},
"nodeTemplatesPartialMatchingEnabled": false,
"clusterLimits": {
"cpu": {
"maxCores": 20,
"minCores": 1
},
"enabled": true
}
}
EOT
}
```
New configuration:
```hcl
resource "castai_autoscaler" "castai_autoscaler_policies" {
cluster_id = data.castai_eks_clusterid.cluster_id.id // or other reference
autoscaler_settings {
enabled = true
node_templates_partial_matching_enabled = false
unschedulable_pods {
enabled = true
}
node_downscaler {
enabled = true
empty_nodes {
enabled = false
}
evictor {
aggressive_mode = false
cycle_interval = "5m10s"
dry_run = false
enabled = true
node_grace_period_minutes = 10
scoped_mode = false
}
}
cluster_limits {
enabled = true
cpu {
max_cores = 20
min_cores = 1
}
}
}
}
```
For more information for `castai-aks-cluster` module follow:
https://github.com/castai/terraform-castai-aks/blob/main/README.md#migrating-from-3xx-to-4xx
If you have used `castai-eks-cluster` or other modules follow:
Expand Down
Loading

0 comments on commit 85fa100

Please sign in to comment.