Skip to content

Commit

Permalink
feat: (IAC-1363) Updated CLUSTER_AUTOSCALER_CHART_VERSION default
Browse files Browse the repository at this point in the history
  • Loading branch information
riragh committed Apr 4, 2024
1 parent 0e5927d commit b509861
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 18 deletions.
2 changes: 1 addition & 1 deletion docs/CONFIG-VARS.md
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ Cluster-autoscaler is currently only used for AWS EKS clusters. GCP GKE and Azur
| CLUSTER_AUTOSCALER_ENABLED | Whether to deploy cluster-autoscaler | bool | true | false | | baseline |
| CLUSTER_AUTOSCALER_CHART_URL | Cluster-autoscaler Helm chart URL | string | See [this document](https://github.com/kubernetes/autoscaler/tree/master/charts) for more information. | false | | baseline |
| CLUSTER_AUTOSCALER_CHART_NAME| Cluster-autoscaler Helm chart name | string | cluster-autoscaler | false | | baseline |
| CLUSTER_AUTOSCALER_CHART_VERSION | Cluster-autoscaler Helm chart version | string | "" | false | If left as "" (empty string), version 9.36.0 is used. <br> See [Artifact Hub](https://artifacthub.io/packages/helm/cluster-autoscaler/cluster-autoscaler) to determine application version| baseline |
| CLUSTER_AUTOSCALER_CHART_VERSION | Cluster-autoscaler Helm chart version | string | 9.36.0 | false | Version `9.36.0` is used for Kubernetes clusters whose version is >= 1.25. For Kubernetes clusters whose version is <= 1.24 please set this variable to avoid errors. See [Artifact Hub](https://artifacthub.io/packages/helm/cluster-autoscaler/cluster-autoscaler) to determine application version. | baseline |
| CLUSTER_AUTOSCALER_CONFIG | Cluster-autoscaler Helm values | string | See [this file](../roles/baseline/defaults/main.yml) for more information. | false | | baseline |
| CLUSTER_AUTOSCALER_ACCOUNT | Cluster autoscaler AWS role ARN | string | | false | Required to enable cluster-autoscaler on AWS | baseline |
| CLUSTER_AUTOSCALER_LOCATION |AWS region where Kubernetes cluster is running | string | us-east-1 | false | | baseline |
Expand Down
6 changes: 1 addition & 5 deletions roles/baseline/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ CLUSTER_AUTOSCALER_NAME: cluster-autoscaler
CLUSTER_AUTOSCALER_NAMESPACE: kube-system
CLUSTER_AUTOSCALER_CHART_NAME: cluster-autoscaler
CLUSTER_AUTOSCALER_CHART_URL: https://kubernetes.github.io/autoscaler
CLUSTER_AUTOSCALER_CHART_VERSION: ""
CLUSTER_AUTOSCALER_CHART_VERSION: 9.36.0
CLUSTER_AUTOSCALER_ACCOUNT: null
CLUSTER_AUTOSCALER_LOCATION: us-east-1
CLUSTER_AUTOSCALER_CONFIG:
Expand All @@ -177,10 +177,6 @@ CLUSTER_AUTOSCALER_CONFIG:
annotations:
eks.amazonaws.com/role-arn: "{{ CLUSTER_AUTOSCALER_ACCOUNT }}"

autoscalerVersions:
api:
chartVersion: 9.36.0

## EBS CSI Driver
EBS_CSI_DRIVER_ENABLED: true
EBS_CSI_DRIVER_NAME: aws-ebs-csi-driver
Expand Down
12 changes: 0 additions & 12 deletions roles/baseline/tasks/cluster-autoscaler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,6 @@
# SPDX-License-Identifier: Apache-2.0

---
- name: Set the default CLUSTER_AUTOSCALER_CHART_VERSION if not specified
when:
- CLUSTER_AUTOSCALER_ENABLED
- CLUSTER_AUTOSCALER_CHART_VERSION|length == 0
tags:
- install
- update
block:
- name: Set the default CLUSTER_AUTOSCALER_CHART_VERSION based on K8s server minor version
set_fact:
CLUSTER_AUTOSCALER_CHART_VERSION: "{{ autoscalerVersions.api.chartVersion }}"

- name: Deploy cluster-autoscaler
kubernetes.core.helm:
name: "{{ CLUSTER_AUTOSCALER_NAME }}"
Expand Down

0 comments on commit b509861

Please sign in to comment.