Skip to content

Commit ceceda7

Browse files
committed
feat: set --enforce-node-group-min-size flag
To change the number of replicas, a user can set the min annotation to the desired number of replicas and cluster-autoscaler will scale up the MachineDeployment.
1 parent fd0f95e commit ceceda7

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

charts/capi-runtime-extensions/templates/cluster-autoscaler/manifests/cluster-autoscaler-configmap.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ data:
178178
- --node-group-auto-discovery=clusterapi:clusterName=tmpl-clustername-tmpl,namespace=tmpl-clusternamespace-tmpl
179179
- --kubeconfig=/cluster/kubeconfig
180180
- --clusterapi-cloud-config-authoritative
181+
- --enforce-node-group-min-size=true
181182
- --logtostderr=true
182183
- --stderrthreshold=info
183184
- --v=4

hack/addons/kustomize/cluster-autoscaler/helm-values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ fullnameOverride: cluster-autoscaler-tmpl-clustername-tmpl
99

1010
cloudProvider: clusterapi
1111

12+
# Always trigger a scale-out if replicas are less than the min.
13+
extraArgs:
14+
enforce-node-group-min-size: true
15+
1216
# Enable it to run in a 1 Node cluster.
1317
tolerations:
1418
- effect: NoSchedule

0 commit comments

Comments
 (0)