Skip to content

Commit

Permalink
Template the autoDiscovery.clusterName variable in the Helm chart
Browse files Browse the repository at this point in the history
  • Loading branch information
mtougeron committed Oct 11, 2023
1 parent 133fdc7 commit bfe6ea6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion charts/cluster-autoscaler/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ name: cluster-autoscaler
sources:
- https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler
type: application
version: 9.29.3
version: 9.29.4
6 changes: 3 additions & 3 deletions charts/cluster-autoscaler/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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" }}
Expand Down
2 changes: 1 addition & 1 deletion charts/cluster-autoscaler/templates/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,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 eq .Values.cloudProvider "aws" }}
AwsAccessKeyId: "{{ .Values.awsAccessKeyID | b64enc }}"
Expand Down

0 comments on commit bfe6ea6

Please sign in to comment.