Skip to content

Commit

Permalink
Merge pull request #16672 from rifelpet/automated-cherry-pick-of-#166…
Browse files Browse the repository at this point in the history
…70-origin-release-1.29

Automated cherry pick of #16670: Fix cluster-autoscaler priority expander config
  • Loading branch information
k8s-ci-robot authored Jul 14, 2024
2 parents 97c456c + 7fdf90f commit e0a2707
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion upup/pkg/fi/cloudup/template_functions.go
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,9 @@ func (tf *TemplateFunctions) AddTo(dest template.FuncMap, secretStore fi.SecretS
if cluster.Spec.ClusterAutoscaler.CustomPriorityExpanderConfig != nil {
priorities = cluster.Spec.ClusterAutoscaler.CustomPriorityExpanderConfig
} else {
for name, spec := range tf.GetNodeInstanceGroups() {
igNames := maps.SortedKeys(tf.GetNodeInstanceGroups())
for _, name := range igNames {
spec := tf.GetNodeInstanceGroups()[name]
if spec.Autoscale != nil {
priorities[strconv.Itoa(int(spec.AutoscalePriority))] = append(priorities[strconv.Itoa(int(spec.AutoscalePriority))], fmt.Sprintf("%s.%s", name, tf.ClusterName()))
}
Expand Down

0 comments on commit e0a2707

Please sign in to comment.