From b50986176c8865b594005738bca0de99678a7bf7 Mon Sep 17 00:00:00 2001 From: Ritika Patil Date: Thu, 4 Apr 2024 16:33:33 -0500 Subject: [PATCH] feat: (IAC-1363) Updated CLUSTER_AUTOSCALER_CHART_VERSION default --- docs/CONFIG-VARS.md | 2 +- roles/baseline/defaults/main.yml | 6 +----- roles/baseline/tasks/cluster-autoscaler.yaml | 12 ------------ 3 files changed, 2 insertions(+), 18 deletions(-) diff --git a/docs/CONFIG-VARS.md b/docs/CONFIG-VARS.md index cb53152b..09716df4 100644 --- a/docs/CONFIG-VARS.md +++ b/docs/CONFIG-VARS.md @@ -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.
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 | diff --git a/roles/baseline/defaults/main.yml b/roles/baseline/defaults/main.yml index 4b0ae78d..30e1b686 100644 --- a/roles/baseline/defaults/main.yml +++ b/roles/baseline/defaults/main.yml @@ -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: @@ -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 diff --git a/roles/baseline/tasks/cluster-autoscaler.yaml b/roles/baseline/tasks/cluster-autoscaler.yaml index 5f05bf74..9a872d78 100644 --- a/roles/baseline/tasks/cluster-autoscaler.yaml +++ b/roles/baseline/tasks/cluster-autoscaler.yaml @@ -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 }}"