Skip to content

Commit

Permalink
addons(cluster-autoscaler): Add newPodScaleUpDelay in clusterAutoscal…
Browse files Browse the repository at this point in the history
…er spec
  • Loading branch information
akshedu committed Dec 19, 2020
1 parent 409d007 commit 830fef7
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 0 deletions.
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

0 comments on commit 830fef7

Please sign in to comment.