Skip to content

Commit

Permalink
PLT-869:By default setting min and max to 0 for eks cluster (#82)
Browse files Browse the repository at this point in the history
* PLT-896:By default setting min and max to 0 for eks cluster

* set min max default to 0
  • Loading branch information
SivaanandM authored Dec 6, 2023
1 parent f2cd99c commit d2b0e3a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions spectro-cluster-eks.tf
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,9 @@ resource "spectrocloud_cluster_eks" "this" {
name = machine_pool.value.name
update_strategy = try(machine_pool.value.update_strategy, "RollingUpdateScaleOut")
count = machine_pool.value.count
min = try(machine_pool.value.min, machine_pool.value.count) # It is possible for the chosen max to be lesser than the min, or for the count to be out of bounds of min or max. Handle these conditions in the provider for this module or as input validation prior to using this module.
max = try(machine_pool.value.max, machine_pool.value.count)
# The min and max settings for EKS will only be taken into account if the autoscaler pack is added to the cluster. By default, both min and max values are set to 0. To activate autoscaling, assign the desired sizes to both the minimum and maximum settings.
min = try(machine_pool.value.min, 0)
max = try(machine_pool.value.max, 0)
capacity_type = try(machine_pool.value.capacity_type, "on-demand")
instance_type = machine_pool.value.instance_type
az_subnets = can(machine_pool.value.worker_subnets) ? machine_pool.value.worker_subnets : null
Expand Down
4 changes: 2 additions & 2 deletions spectro-cluster-maas.tf
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ resource "spectrocloud_cluster_maas" "this" {
control_plane = try(machine_pool.value.control_plane, false)
control_plane_as_worker = try(machine_pool.value.control_plane_as_worker, false)
count = machine_pool.value.count
min = try(machine_pool.value.min, machine_pool.value.count) # It is possible for the chosen max to be lesser than the min, or for the count to be out of bounds of min or max. Handle these conditions in the provider for this module or as input validation prior to using this module.
max = try(machine_pool.value.max, machine_pool.value.count)
min = try(machine_pool.value.min, 0)
max = try(machine_pool.value.max, 0)
node_repave_interval = can(machine_pool.value.node_repave_interval) ? machine_pool.value.node_repave_interval : null
update_strategy = try(machine_pool.value.update_strategy, "RollingUpdateScaleOut")

Expand Down
4 changes: 2 additions & 2 deletions spectro-cluster-tke.tf
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ resource "spectrocloud_cluster_tke" "this" {
content {
name = machine_pool.value.name
count = machine_pool.value.count
min = try(machine_pool.value.min, machine_pool.value.count)
max = try(machine_pool.value.max, machine_pool.value.count)
min = try(machine_pool.value.min, 0)
max = try(machine_pool.value.max, 0)
instance_type = machine_pool.value.instance_type
az_subnets = machine_pool.value.worker_subnets
disk_size_gb = machine_pool.value.disk_size_gb
Expand Down

0 comments on commit d2b0e3a

Please sign in to comment.