Skip to content

Commit 619b43f

Browse files
feat(k8s): add max_graceful_termination_sec to autoscaler flag (#1572)
Co-authored-by: Rémy Léone <[email protected]>
1 parent 34fad70 commit 619b43f

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

cmd/scw/testdata/test-all-usage-k8s-cluster-create-usage.golden

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ ARGS:
4141
[autoscaler-config.expendable-pods-priority-cutoff] Pods with priority below cutoff will be expendable
4242
[autoscaler-config.scale-down-unneeded-time] How long a node should be unneeded before it is eligible for scale down
4343
[autoscaler-config.scale-down-utilization-threshold] Node utilization level, defined as sum of requested resources divided by capacity, below which a node can be considered for scale down
44+
[autoscaler-config.max-graceful-termination-sec] Maximum number of seconds the cluster autoscaler waits for pod termination when trying to scale down a node
4445
[auto-upgrade.enable] Whether or not auto upgrade is enabled for the cluster
4546
[auto-upgrade.maintenance-window.start-hour] The start hour of the 2-hour maintenance window
4647
[auto-upgrade.maintenance-window.day] The day of the week for the maintenance window (any | monday | tuesday | wednesday | thursday | friday | saturday | sunday)

cmd/scw/testdata/test-all-usage-k8s-cluster-update-usage.golden

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ ARGS:
2626
[autoscaler-config.expendable-pods-priority-cutoff] Pods with priority below cutoff will be expendable
2727
[autoscaler-config.scale-down-unneeded-time] How long a node should be unneeded before it is eligible for scale down
2828
[autoscaler-config.scale-down-utilization-threshold] Node utilization level, defined as sum of requested resources divided by capacity, below which a node can be considered for scale down
29+
[autoscaler-config.max-graceful-termination-sec] Maximum number of seconds the cluster autoscaler waits for pod termination when trying to scale down a node
2930
[enable-dashboard] The new value of the Kubernetes Dashboard enablement
3031
[ingress] The new Ingress Controller for the cluster (unknown_ingress | none | nginx | traefik | traefik2)
3132
[auto-upgrade.enable] Whether or not auto upgrade is enabled for the cluster

internal/namespaces/k8s/v1/k8s_cli.go

+14
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,13 @@ func k8sClusterCreate() *core.Command {
423423
Deprecated: false,
424424
Positional: false,
425425
},
426+
{
427+
Name: "autoscaler-config.max-graceful-termination-sec",
428+
Short: `Maximum number of seconds the cluster autoscaler waits for pod termination when trying to scale down a node`,
429+
Required: false,
430+
Deprecated: false,
431+
Positional: false,
432+
},
426433
{
427434
Name: "auto-upgrade.enable",
428435
Short: `Whether or not auto upgrade is enabled for the cluster`,
@@ -671,6 +678,13 @@ func k8sClusterUpdate() *core.Command {
671678
Deprecated: false,
672679
Positional: false,
673680
},
681+
{
682+
Name: "autoscaler-config.max-graceful-termination-sec",
683+
Short: `Maximum number of seconds the cluster autoscaler waits for pod termination when trying to scale down a node`,
684+
Required: false,
685+
Deprecated: false,
686+
Positional: false,
687+
},
674688
{
675689
Name: "enable-dashboard",
676690
Short: `The new value of the Kubernetes Dashboard enablement`,

0 commit comments

Comments
 (0)