Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new-pod-scale-up-delay in Cluster Autoscaler spec #10471

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions k8s/crds/kops.k8s.io_clusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,11 @@ spec:
description: 'Image is the docker container used. Default: the
latest supported image for the specified kubernetes version.'
type: string
newPodScaleUpDelay:
description: 'NewPodScaleUpDelay causes cluster autoscaler to
ignore unschedulable pods until they are a certain "age", regardless
of the scan-interval Default: 0s'
type: string
scaleDownUtilizationThreshold:
description: 'ScaleDownUtilizationThreshold determines the utilization
threshold for node scale-down. Default: 0.5'
Expand Down
3 changes: 3 additions & 0 deletions pkg/apis/kops/componentconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -824,6 +824,9 @@ type ClusterAutoscalerConfig struct {
// SkipNodesWithLocalStorage makes cluster autoscaler skip scale-down of nodes with local storage.
// Default: true
SkipNodesWithLocalStorage *bool `json:"skipNodesWithLocalStorage,omitempty"`
// NewPodScaleUpDelay causes cluster autoscaler to ignore unschedulable pods until they are a certain "age", regardless of the scan-interval
// Default: 0s
NewPodScaleUpDelay *string `json:"newPodScaleUpDelay,omitempty"`
// Image is the docker container used.
// Default: the latest supported image for the specified kubernetes version.
Image *string `json:"image,omitempty"`
Expand Down
3 changes: 3 additions & 0 deletions pkg/apis/kops/v1alpha2/componentconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -823,6 +823,9 @@ type ClusterAutoscalerConfig struct {
// SkipNodesWithLocalStorage makes cluster autoscaler skip scale-down of nodes with local storage.
// Default: true
SkipNodesWithLocalStorage *bool `json:"skipNodesWithLocalStorage,omitempty"`
// NewPodScaleUpDelay causes cluster autoscaler to ignore unschedulable pods until they are a certain "age", regardless of the scan-interval
// Default: 0s
NewPodScaleUpDelay *string `json:"newPodScaleUpDelay,omitempty"`
// Image is the docker container used.
// Default: the latest supported image for the specified kubernetes version.
Image *string `json:"image,omitempty"`
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/kops/v1alpha2/zz_generated.conversion.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions pkg/apis/kops/v1alpha2/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions pkg/apis/kops/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions pkg/model/components/clusterautoscaler.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ func (b *ClusterAutoscalerOptionsBuilder) BuildOptions(o interface{}) error {
if cas.BalanceSimilarNodeGroups == nil {
cas.BalanceSimilarNodeGroups = fi.Bool(false)
}
if cas.NewPodScaleUpDelay == nil {
cas.NewPodScaleUpDelay = fi.String("0s")
}

return nil
}
1 change: 1 addition & 0 deletions upup/models/bindata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ spec:
- --scale-down-utilization-threshold={{ .ScaleDownUtilizationThreshold }}
- --skip-nodes-with-local-storage={{ .SkipNodesWithLocalStorage }}
- --skip-nodes-with-system-pods={{ .SkipNodesWithSystemPods }}
- --new-pod-scale-up-delay={{ .NewPodScaleUpDelay }}
- --stderrthreshold=info
- --v=2
ports:
Expand Down