diff --git a/CHANGELOG.md b/CHANGELOG.md index b113039..7289abd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [5.2.0] - 2024-02-16 + +- Allow setting extra values to cluster-autoscaler Helm chart. + ## [5.1.0] - 2024-02-15 - Allow configuring NodeAffinity for ingress-nginx controller. diff --git a/README.md b/README.md index b63d73b..39d739c 100644 --- a/README.md +++ b/README.md @@ -106,11 +106,12 @@ module "eks_main" { } ] - helm_ingress_nginx_enabled = true - helm_cluster_autoscaler_enabled = true - helm_metrics_server_enabled = true - helm_cert_manager_enabled = true - ingress_node_affinity = { + helm_ingress_nginx_enabled = true + helm_cluster_autoscaler_enabled = true + cluster_autoscaler_extra_helm_values = file("${path.root}/resources/helm/values/cluster-autoscaler.yaml") + helm_metrics_server_enabled = true + helm_cert_manager_enabled = true + ingress_node_affinity = { enabled = true, label_key = "nodegroup", label_value = "${var.env}-eks-spot" @@ -253,6 +254,7 @@ module "eks_main" { | helm\_cluster\_autoscaler\_enabled | Set if cluster-autoscaler Helm chart will be installed on the cluster. | `bool` | `false` | no | | cluster\_autoscaler\_chart\_version | Set the version for the chart | `string` | `9.16.1` | no | | cluster\_autoscaler\_priority\_class\_name | allows you to set a priority class | `string` | `""` | no | +| cluster\_autoscaler\_extra\_helm\_values | Raw YAML containing additional cluster-autoscaler Helm values | `string` | `""` | no | | helm\_metrics\_server\_enabled | Set if metrics-server Helm chart will be installed on the cluster. | `bool` | `false` | no | | metrics\_server\_chart\_version | Set the version for the chart | `string` | `1.6.1` | no | | metrics\_server\_priority\_class\_name | allows you to set a priority class | `string` | `""` | no | diff --git a/helm.tf b/helm.tf index 3bb24aa..8bc0014 100644 --- a/helm.tf +++ b/helm.tf @@ -159,6 +159,8 @@ resource "helm_release" "cluster_autoscaler" { value = var.cluster_autoscaler_priority_class_name } + values = [var.cluster_autoscaler_extra_helm_values] + depends_on = [time_sleep.wait_20_seconds] } diff --git a/variables.tf b/variables.tf index 8418a99..c0d439b 100644 --- a/variables.tf +++ b/variables.tf @@ -242,6 +242,10 @@ variable "cluster_autoscaler_priority_class_name" { default = "" } +variable "cluster_autoscaler_extra_helm_values" { + default = "" +} + # metrics-server variable "helm_metrics_server_enabled" { default = false