Commit Graph

129 Commits

Author SHA1 Message Date
Jason DeTiberus 150dbdeb64
[cluster-autoscaler] Support using --cloud-config for clusterapi provider
- Leverage --cloud-config to allow for providing a separate kubeconfig for Cluster API management and workload cluster resources
- Allow for fallback to previous behavior when --cloud-config is not specified for backward compatibility
- Provides a --clusterapi-cloud-config-authoritative flag to disable the above fallback behavior and allow for both the management and workload cluster clients to use the in-cluster config
2020-09-21 10:38:06 -04:00
M. Habib Rosyad b7e02047f7 expose max-nodes-total as a metric 2020-08-19 17:43:39 +07:00
Maciek Pytel 3c7727a603 Fixes after vendor update 2020-06-05 17:22:26 +02:00
Maciek Pytel 655b4081f4 Migrate to klog v2 2020-06-05 17:22:26 +02:00
Jakub Tużnik c65a6bb4ea Scalability: Switch to deltaClusterSnapshot
This massively speeds up checking predicates.
2020-04-14 15:27:55 +02:00
Adam Malcontenti-Wilson 8313e969c7 Add support for passing in custom ignore labels 2020-03-17 14:30:03 +11:00
Adam Malcontenti-Wilson 5476125063 Use builder methods to create NodeInfoComparator functions 2020-03-17 13:51:15 +11:00
Andrew McDermott 1efc258b3c config/options: add KubeConfigPath
Access to this is required by cloudprovider/clusterapi.
2020-03-10 10:27:34 +00:00
Aleksandra Malinowska 70ef92a12a Fixes in CA for vendor update 2020-02-13 15:28:29 +01:00
Łukasz Osipiuk dd9fe48f46 Remove filterOutSchedulableSimple 2020-01-29 13:11:38 +01:00
Łukasz Osipiuk a5abeaf94c Add /debug/pprof http handler 2020-01-28 11:13:29 +01:00
Łukasz Osipiuk b4c8bbb12c Fixes around metrics/ handler 2019-11-22 14:07:10 +01:00
Colin Murphy 7f0a42b023 Add additional AWS labels.
Whitelist additional node labels for AWS CNI custom networking and
EC2 lifecycle.

Move AWS ignored node labels to AWS specific file.
2019-10-25 17:17:02 -04:00
Jiaxin Shan 7eb864502c Load AWS EC2 Instance Types dynamically 2019-10-14 17:19:42 -07:00
Mayank Kumar 3268f79359 Switch leader election mechanism to use lease objects 2019-09-27 23:32:31 -07:00
Krzysztof Jastrzebski 839cdaaa09 Stop disabling Cluster Autoscaler when there is no ready nodes. 2019-09-06 14:45:34 +02:00
t-qini 89a09ccf00 Refactor the corresponding code. 2019-07-22 08:58:51 +08:00
t-qini f7c563ab06 Modify the code as the simple solution proposed by MaciekPytel. 2019-07-18 23:58:05 +08:00
t-qini 622a838c2c Modify nodal similarity rules. 2019-07-09 16:04:40 +08:00
Vivek Bagade 90aa28a077 Move pod packing in upcoming nodes to RunOnce from Estimator for performance improvements 2019-06-19 14:48:47 +02:00
Krzysztof Jastrzebski 4831d76288 Cache cloud provider node instances in cluster state. 2019-05-31 10:11:51 +02:00
Krzysztof Jastrzebski 4247c8b032 Implement functionality which delays node deletion when node has
annotation with  prefix
'delay-deletion.cluster-autoscaler.kubernetes.io/'.
2019-05-17 16:06:17 +02:00
Kubernetes Prow Robot c756ed3953
Merge pull request #1963 from cjbradfield/ignore-taints
add --ignore-taint flag and ignore taints added by TaintNodesByCondition
2019-05-15 02:18:21 -07:00
Chris Bradfield 92ea680f1a Implement an --ignore-taint flag
This change adds support for a user to specify taints to ignore when
considering a node as a template for a node group.
2019-05-14 10:22:59 -07:00
Thomas Hartland 80aa40bda7 Move CA version to own package 2019-05-06 11:30:08 +02:00
Łukasz Osipiuk db4c6f1133 Migrate filter out schedulabe to PodListProcessor 2019-04-15 16:59:13 +02:00
Jiaxin Shan 83ae66cebc Consider GPU utilization in scaling down 2019-04-04 01:12:51 -07:00
Aleksandra Malinowska 600ba8ad10 Fix default scale down delay after delete 2019-04-02 12:47:10 +02:00
Łukasz Osipiuk 34a4262ad8 Remove GKE specific node group comparator
Change-Id: I33131fec9b7972780cffde605a087cd2ad002752
2019-03-11 17:49:59 +01:00
Kubernetes Prow Robot 8944afd901
Merge pull request #1720 from aleksandra-malinowska/events-client
Use separate client for events
2019-02-26 12:00:19 -08:00
Aleksandra Malinowska f304722a1f Use separate client for events 2019-02-25 13:58:54 +01:00
Pengfei Ni 2546d0d97c Move leaderelection options to new packages 2019-02-21 13:45:46 +08:00
Pengfei Ni 4f7600911f Update flag package to k8s.io/component-base/cli/flag 2019-02-21 11:45:33 +08:00
Jacek Kaniuk f054c53c46 Account for kernel reserved memory in capacity calculations 2019-02-08 17:04:07 +01:00
Marcin Wielgus 99f1dcf9d2
Merge branch 'master' into crc-fix-error-format 2019-02-01 17:22:57 +01:00
Vivek Bagade c6b87841ce Added a new method that uses pod packing to filter schedulable pods
filterOutSchedulableByPacking is an alternative to the older
filterOutSchedulable. filterOutSchedulableByPacking sorts pods in
unschedulableCandidates by priority and filters out pods that can be
scheduled on free capacity on existing nodes. It uses a basic packing
approach to do this. Pods with nominatedNodeName set are always
filtered out.

filterOutSchedulableByPacking is set to be used by default, but, this
can be toggled off by setting filter-out-schedulable-pods-uses-packing
flag to false, which would then activate the older and more lenient
filterOutSchedulable(now called filterOutSchedulableSimple).

Added test cases for both methods.
2019-01-25 16:09:51 +05:30
Jacek Kaniuk 0c64e0932a Tainting unneeded nodes as PreferNoSchedule 2019-01-21 13:06:50 +01:00
CodeLingo Bot c0603afdeb Fix error format strings according to best practices from CodeReviewComments
Fix error format strings according to best practices from CodeReviewComments

Fix error format strings according to best practices from CodeReviewComments

Reverted incorrect change to with error format string

Signed-off-by: CodeLingo Bot <hello@codelingo.io>
Signed-off-by: CodeLingoBot <hello@codelingo.io>
Signed-off-by: CodeLingo Bot <hello@codelingo.io>
Signed-off-by: CodeLingo Bot <bot@codelingo.io>

Resolve conflict

Signed-off-by: CodeLingo Bot <hello@codelingo.io>
Signed-off-by: CodeLingoBot <hello@codelingo.io>
Signed-off-by: CodeLingo Bot <hello@codelingo.io>
Signed-off-by: CodeLingo Bot <bot@codelingo.io>

Fix error strings in testscases to remedy failing tests

Signed-off-by: CodeLingo Bot <bot@codelingo.io>

Fix more error strings to remedy failing tests

Signed-off-by: CodeLingo Bot <bot@codelingo.io>
2019-01-11 09:10:31 +13:00
Łukasz Osipiuk d53928a11d Initialize klog 2018-11-26 20:21:23 +01:00
Łukasz Osipiuk 016bf7fc2c Use k8s.io/klog instead github.com/golang/glog 2018-11-26 17:30:31 +01:00
Alex Price 4ae7acbacc add flags to ignore daemonsets and mirror pods when calculating resource utilization of a node
Adds the flag --ignore-daemonsets-utilization and --ignore-mirror-pods-utilization
(defaults to false) and when enabled, factors DaemonSet and mirror pods out when
calculating the resource utilization of a node.
2018-11-23 15:24:25 +11:00
SataQiu a110adf4fb fix typo: posistive -> positive 2018-11-15 15:48:08 +08:00
Aleksandra Malinowska bf6ff4be8e Clean up estimators 2018-11-06 14:15:42 +01:00
Maciej Pytel 01a56a8d73 Add GKE-specific NodeGroupSet processor
Also refactor Balancing processor a bit to make it easily extensible.
2018-10-25 18:50:17 +02:00
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