spotinst / terraform-spotinst-ocean-eks

[Deprecated] A Terraform module to create an Amazon Elastic Kubernetes Service (EKS) cluster with Ocean.
https://registry.terraform.io/modules/spotinst/ocean-eks/spotinst
Apache License 2.0
21 stars 30 forks source link

Feature to configure autoscaler block and attributes for spotinst-ocean-eks #18

Closed bharatgovindaradjou closed 3 years ago

bharatgovindaradjou commented 3 years ago

Currently ocean-eks module defaults autoscaler configuration to automatic configuration when enabled. The autoscaler is also enabled by default.

autoscaler {
    autoscale_is_enabled     = true
    autoscale_is_auto_config = true
  }
}

The purpose of this issue is to add some flexibility to spotinst/ocean-eks module to make use of the ability to configure autoscaler available in the spotinst_ocean_aws resource.

This gives us infrastructure designers and engineers using spotinst to develop ocean clusters configurable for autoscalers' headroom, cooldown and resource limits and even pass on values to ocean's virtual node groups

autoscaler {
  autoscale_is_enabled     = true
  autoscale_is_auto_config = true
  auto_headroom_percentage = 100
  autoscale_cooldown       = 300

  autoscale_headroom {
    cpu_per_unit    = 1024
    gpu_per_unit    = 0
    memory_per_unit = 512
    num_of_units    = 2
  }

  autoscale_down {
    max_scale_down_percentage = 60
  }

  resource_limits {
    max_vcpu       = 1024
    max_memory_gib = 1500
  }
}
liranp commented 3 years ago

Merged #19.