env0 / k8s-modules

3 stars 2 forks source link

Do not use AWS CLI command #5

Open roni-frantchi opened 2 years ago

roni-frantchi commented 2 years ago

The following resources:


module "suspend_asg_processes_command" {
  source           = "digitickets/cli/aws"
  version          = "4.1.0"
  aws_cli_commands = ["autoscaling", "suspend-processes", "--auto-scaling-group-name ${module.eks.node_groups.deployment.resources.0.autoscaling_groups.0.name}", "--scaling-processes AZRebalance"]
}

module "set_asg_default_cooldown_command" {
  source           = "digitickets/cli/aws"
  version          = "4.1.0"
  aws_cli_commands = ["autoscaling", "update-auto-scaling-group", "--auto-scaling-group-name ${module.eks.node_groups.deployment.resources.0.autoscaling_groups.0.name}", "--default-cooldown 60"]
}

module "enable_asg_metrics_collection" {
  source           = "digitickets/cli/aws"
  version          = "4.1.0"
  aws_cli_commands = ["autoscaling", "enable-metrics-collection ", "--auto-scaling-group-name ${module.eks.node_groups.deployment.resources.0.autoscaling_groups.0.name}", "--granularity \"1Minute\""]
}

Upgrading to v18 of the EKS should allow us to set these for node_groups

roni-frantchi commented 2 years ago

Close the 3 issues in env0/k8s-module

GiliFaroEnv0 commented 2 years ago

Do not use AWS CLI command #5

roni-frantchi commented 2 years ago

This will require us to transition not only to V18, but also to self managed nodes instead of eks managed nodes - we do not wish to make the switch for these, so for now we will stay with the CLI commands

chpl commented 1 week ago

We can remove those if we replace the autoscaler with karpenter.