binbashar / le-tf-infra-aws

Terraform code for Leverage Reference Architecture for AWS, designed under optimal configs for the most popular modern web and mobile applications needs.
https://www.binbash.co/leverage
Apache License 2.0
26 stars 8 forks source link

BUG | K8s node group max/min definition for "spot" group is omitted #482

Open juanmatias opened 1 year ago

juanmatias commented 1 year ago

Describe the Bug

In the k8s-eks/cluster layer, in eks-managed-nodes.tf file this definition is set:

https://github.com/binbashar/le-tf-infra-aws/blob/b327a8e5b4eee60d49c01fe02e82b50594b32086/apps-devstg/us-east-1/k8s-eks/cluster/eks-managed-nodes.tf#L173-L188

As it can be seen in the documentation for the module here:

  eks_managed_node_groups = {
    blue = {}
    green = {
      min_size     = 1
      max_size     = 10
      desired_size = 1

      instance_types = ["t3.large"]
      capacity_type  = "SPOT"
    }
  }

only max_size and min_size is accepted, while max_capacity and min_capacity are not taken into account when applying the module.

So, in the example from the RefArch the values in max_capacity and min_capacity are not used, instead defaults are used for max_size and min_size.

Expected Behavior

The max and min values should be configurable from the aforementioned file.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Go to a k8s-eks/cluster layer
  2. Change the value for max_capacity
  3. Enter leverage tf apply
  4. No changes are shown

Screenshots

n/a

Environment (please complete the following information):

Anything that will help us triage the bug will help. Here are some ideas:

Additional Context

n/a