Commit Graph

85 Commits

Author SHA1 Message Date
Steve Scaffidi 56b5456269 Fixing nits: renamed newPodScaleUpBuffer -> newPodScaleUpDelay, deleted redundant comment
Change-Id: I7969194d8e07e2fb34029d0d7990341c891d0623
2018-09-17 10:38:28 -04:00
Steve Scaffidi 33b93cbc5f Add configurable delay for pod age before considering for scale-up
- This is intended to address the issue described in https://github.com/kubernetes/autoscaler/issues/923
  - the delay is configurable via a CLI option
  - in production (on AWS) we set this to a value of 2m
  - the delay could possibly be set as low as 30s and still be effective depending on your workload and environment
  - the default of 0 for the CLI option results in no change to the CA's behavior from defaults.

Change-Id: I7e3f36bb48641faaf8a392cca01a12b07fb0ee35
2018-09-14 13:55:09 -04:00
Łukasz Osipiuk 01a2e4d3cf Update leader election configuration after godeps update 2018-09-05 16:54:15 +02:00
Aleksandra Malinowska 90e8a7a2d9 Move initializing defaults out of main 2018-08-02 14:04:03 +02:00
Aleksandra Malinowska 3b1b731c91 Move constructing cloud provider dynamic config structs into cloud provider builder 2018-07-25 13:43:47 +02:00
Aleksandra Malinowska 07e52e6c79 Move creating cloud provider out of context 2018-07-25 13:43:47 +02:00
Aleksandra Malinowska 0976d2aa07 Move autoscaling options out of static 2018-07-25 10:52:37 +02:00
Aleksandra Malinowska 6b94d7172d Move AutoscalingOptions to config/static 2018-07-23 15:52:27 +02:00
Sheldon Kwok 20293c2365 Bump kubernetes.sync and fix main.go with new k8 Godeps 2018-07-17 02:54:35 -07:00
Aleksandra Malinowska 82fa2df52f Lower default expendable pod priority cutoff to -10 2018-07-04 13:45:32 +02:00
Nic Doye ebadbda2b2 issues/933 Consider making UnremovableNodeRecheckTimeout configurable 2018-06-18 11:54:14 +01:00
Łukasz Osipiuk 087a5cc9a9 Respect GPU limits in scale_down 2018-06-13 14:19:59 +02:00
MaciekPytel 705eeb0a7b
Merge pull request #934 from losipiuk/lukaszos/cleanup-how-mult-string-flags-are-handled-in-main-1fdd5
Cleanup how multi-string flags are handled in main()
2018-06-08 14:53:12 +02:00
Łukasz Osipiuk 53fc344eca Cleanup how multi-string flags are handled in main() 2018-06-08 13:36:52 +02:00
Aleksandra Malinowska 3ccfa5be23 Move universal constants to separate module 2018-05-17 18:36:43 +02:00
Aleksandra Malinowska fcc3d004f5 Use bytes instead of MB for memory limits 2018-05-17 17:35:39 +02:00
Aleksandra Malinowska 820f688d2a Update max unready nodes to 45% 2018-05-17 12:51:45 +02:00
Beata Skiba f3a242cc8a Small refactor of main.go 2018-05-15 12:39:33 +02:00
Karol Gołąb 74b540fdab Remove DynamicAutoscaler since it's unused (#851)
* Remove DynamicAutoscaler since it's unused

* Remove configmap flag with its unused-elsewhere dependecies

* gofmt
2018-05-14 20:22:42 +02:00
Karol Gołąb 854fcc1ff8 Remove implementation details (CleanUp) from the interface.
The CleanUp method is instead called directly from the implementation,
when required.
Test updated in a quick way since the mock we're using does not support
AtLeast(1) - thus Times(2).
2018-05-07 15:24:14 +02:00
Krzysztof Jastrzebski 88b769b324 Refactor cluster autoscaler builder and add pod list processor. 2018-04-26 12:37:51 +02:00
Aleksandra Malinowska f98e953eb4 Add regional flag 2018-03-12 14:15:56 +01:00
yank1 ee3f3881b9 fix typo in main file 2018-02-07 00:27:10 +08:00
Marcin Wielgus 88d97c2254
Merge pull request #462 from negz/gcedisco
Support autodetection of GCE managed instance groups by name prefix
2017-12-18 21:08:22 +01:00
Aleksandra Malinowska 312f989c15 Don't register metrics unless on leading master 2017-12-14 16:08:20 +01:00
Nic Cope e96ff07896 Replace the Polling Autoscaler
Node group discovery is now handled by cloudprovider.Refresh() in all cases.
Additionally, explicit node groups can now be used alongside autodiscovery.
2017-12-11 13:09:56 -08:00
Nic Cope 6a704a6cf4 Break down cloud provider builder by provider
The Build method was getting pretty big, this hopefully makes it a little
more readable. It also fixes a few minor error shadowing bugs.
2017-12-11 13:09:56 -08:00
Nic Cope 982f9e41a3 Support autodetection of GCE managed instance groups by name prefix
This commit adds a new usage of the --node-group-auto-discovery flag intended
for use with the GCE cloud provider. GCE instance groups can be automatically
discovered based on a prefix of their group name. Example usage:

--node-group-auto-discovery=mig:prefix=k8s-mig,minNodes=0,maxNodes=10

Note that unlike the existing AWS ASG autodetection functionality we must
specify the min and max nodes in the flag. This is because MIGs store only
a target size in the GCE API - they do not have a min and max size we can
infer via the API.

In order to alleviate this limitation a little we allow multiple uses of the
autodiscovery flag. For example to discover two classes (big and small) of
instance groups with different size limits:

./cluster-autoscaler \
  --node-group-auto-discovery=mig:prefix=k8s-a-small,minNodes=1,maxNodes=10 \
  --node-group-auto-discovery=mig:prefix=k8s-a-big,minNodes=1,maxNodes=100

Zonal clusters (i.e. multizone = false in the cloud config) will detect all
managed instance groups within the cluster's zone. Regional clusters will
detect all matching (zonal) managed instance groups within any of that region's
zones.
2017-12-11 13:09:56 -08:00
Pengfei Ni 8f7d35b4e0 Enable azure options for autoscaler 2017-11-16 21:31:49 +08:00
Marcin Wielgus 2589c43a61
Merge pull request #469 from aleksandra-malinowska/single-unregistered-flag
Remove --unregistered-node-removal-time flag
2017-11-16 13:07:52 +01:00
Aleksandra Malinowska 2ff962e53e Remove --unregistered-node-removal-time flag 2017-11-15 11:11:30 +01:00
Aleksandra Malinowska 11a7d9f137 Fix typos in FAQ 2017-11-14 14:46:09 +01:00
Marcin Wielgus 439fd3c9ec
Merge pull request #411 from krzysztof-jastrzebski/priority
Adds priority preemption support to cluster autoscaler.
2017-11-08 09:09:26 +01:00
Maciej Pytel c376ef3c87 Add metrics for autoprovisioning 2017-10-31 17:42:58 +01:00
Krzysztof Jastrzebski d9c00e5ce1 Adds priority preemption support to cluster autoscaler. 2017-10-23 09:54:56 +02:00
Maciej Pytel 9ded6f9c9e Rename clusterName flag to cluster-name for consistency 2017-10-16 14:11:27 +02:00
Matt Terry 63310ef41a Introduce new flags to control scale down behavior: scale-down-delay-after-delete and scale-down-delay-after-failure, replacing scale-down-trial-interval. scale-down-delay-after-add replaces scale-down-delay 2017-09-18 17:09:44 -07:00
Aleksandra Malinowska 197b05b180 respect minimum cores/memory limit during scale down 2017-09-13 10:10:47 +02:00
Aleksandra Malinowska d43029c180 implement blocking scale up beyond max cores & memory 2017-09-08 12:50:00 +02:00
Marcin Wielgus f9cabf3a1a Merge pull request #297 from bskiba/additional-k
Only consider up to 10% of the nodes as additional candidates for scale down
2017-09-07 04:34:23 +05:30
Sergey Lanzman 415f53cdea Change from deprecated Core to CoreV1 for kube client 2017-09-04 22:16:21 +03:00
Beata Skiba a6c18b87d2 Only consider up to 10% of the nodes as additional candidates for scale down. 2017-09-04 17:37:02 +02:00
Clayton Coleman f411e38bb8
Support resource-lock type configmap for leader election
The lock type parameter was being ignored. Use the new factory method to
instantiate the lock type.
2017-09-03 18:14:46 -04:00
Marcin Wielgus de524a6688 Limit autoprovisioned groups to 15 2017-09-01 18:25:28 +02:00
Marcin Wielgus c0b48e4a15 Merge pull request #285 from mwielgus/loglevel
Set verbosity for each of the glog.Info logs
2017-09-01 16:42:11 +05:30
Marcin Wielgus 2d8f59e23d Set verbosity for each of the glog.Info logs 2017-09-01 12:34:29 +02:00
Beata Skiba 576e4105db Make ScaleDownNonEmptyCandidatesCount a flag. 2017-08-31 15:05:06 +02:00
Marcin Wielgus 19507aa0de Node autoprovisioning flag 2017-08-31 00:48:54 +02:00
Mark Janssen f53fb8b6ed Minor fixes 2017-08-29 23:11:35 +02:00
Marcin Wielgus 81e9226d17 Merge pull request #267 from mwielgus/gke-cp-1
Add GKE mode to GCE cloud provider
2017-08-29 18:26:07 +05:30