From 3312382a356cc60ecb32f97801293c1481efcad5 Mon Sep 17 00:00:00 2001 From: Mike Tougeron Date: Wed, 11 Oct 2023 16:14:44 -0700 Subject: [PATCH] Template the autoDiscovery.clusterName variable in the Helm chart --- charts/cluster-autoscaler/Chart.yaml | 2 +- charts/cluster-autoscaler/templates/deployment.yaml | 6 +++--- charts/cluster-autoscaler/templates/secret.yaml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/charts/cluster-autoscaler/Chart.yaml b/charts/cluster-autoscaler/Chart.yaml index c5219cf940d0..7ca44ac5d2f9 100644 --- a/charts/cluster-autoscaler/Chart.yaml +++ b/charts/cluster-autoscaler/Chart.yaml @@ -11,4 +11,4 @@ name: cluster-autoscaler sources: - https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler type: application -version: 9.29.4 +version: 9.29.5 diff --git a/charts/cluster-autoscaler/templates/deployment.yaml b/charts/cluster-autoscaler/templates/deployment.yaml index 2b5bba272b01..ad6300b3a899 100644 --- a/charts/cluster-autoscaler/templates/deployment.yaml +++ b/charts/cluster-autoscaler/templates/deployment.yaml @@ -88,10 +88,10 @@ spec: {{- end }} {{- else if eq .Values.cloudProvider "magnum" }} {{- if .Values.autoDiscovery.clusterName }} - - --cluster-name={{ .Values.autoDiscovery.clusterName }} + - --cluster-name={{ tpl (.Values.autoDiscovery.clusterName) . }} - --node-group-auto-discovery=magnum:role={{ tpl (join "," .Values.autoDiscovery.roles) . }} {{- else }} - - --cluster-name={{ .Values.magnumClusterName }} + - --cluster-name={{ tpl (.Values.magnumClusterName) . }} {{- end }} {{- else if eq .Values.cloudProvider "clusterapi" }} {{- if or .Values.autoDiscovery.clusterName .Values.autoDiscovery.labels }} @@ -110,7 +110,7 @@ spec: {{- end }} {{- else if eq .Values.cloudProvider "azure" }} {{- if .Values.autoDiscovery.clusterName }} - - --node-group-auto-discovery=label:cluster-autoscaler-enabled=true,cluster-autoscaler-name={{ .Values.autoDiscovery.clusterName }} + - --node-group-auto-discovery=label:cluster-autoscaler-enabled=true,cluster-autoscaler-name={{ tpl (.Values.autoDiscovery.clusterName) . }} {{- end }} {{- end }} {{- if eq .Values.cloudProvider "magnum" }} diff --git a/charts/cluster-autoscaler/templates/secret.yaml b/charts/cluster-autoscaler/templates/secret.yaml index 5096a2249b27..372f85974590 100644 --- a/charts/cluster-autoscaler/templates/secret.yaml +++ b/charts/cluster-autoscaler/templates/secret.yaml @@ -17,7 +17,7 @@ data: SubscriptionID: "{{ .Values.azureSubscriptionID | b64enc }}" TenantID: "{{ .Values.azureTenantID | b64enc }}" VMType: "{{ .Values.azureVMType | b64enc }}" - ClusterName: "{{ .Values.azureClusterName | b64enc }}" + ClusterName: "{{ tpl (.Values.azureClusterName) . | b64enc }}" NodeResourceGroup: "{{ .Values.azureNodeResourceGroup | b64enc }}" {{- else if $isAws }} AwsAccessKeyId: "{{ .Values.awsAccessKeyID | b64enc }}"