Commit Graph

43 Commits

Author SHA1 Message Date
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
Lukasz Piatkowski 856e58d599 rely on listers instead of watch api 2019-04-16 13:47:54 +02:00
Łukasz Osipiuk a331e1ce5d Disable failing priority expander tests 2019-04-12 14:34:05 +02:00
Jiaxin Shan 90666881d3 Move GPULabel and GPUTypes to cloud provider 2019-03-25 13:03:01 -07:00
Lukasz Piatkowski c5ba4b3068 priority expander 2019-03-22 10:43:20 +01:00
Pengfei Ni 128729bae9 Move schedulercache to package nodeinfo 2019-02-21 12:41:08 +08:00
lsytj0413 2c82d0bac5 fix(expander): avoid panic when random expander 2019-02-13 11:44:54 +08:00
Jacek Kaniuk f054c53c46 Account for kernel reserved memory in capacity calculations 2019-02-08 17:04:07 +01:00
Łukasz Osipiuk 016bf7fc2c Use k8s.io/klog instead github.com/golang/glog 2018-11-26 17:30:31 +01:00
Łukasz Osipiuk 41b02870f8 NodeGroup.Nodes() return Instance struct instead instance name
This is preparatory work for handling resource related
(stockout/quota-exceeded) error conditions in CA.
2018-10-26 14:41:18 +02:00
Aleksandra Malinowska 90b67feff2 Make Create() return newly created node group 2018-08-08 14:56:59 +02:00
Pengfei Ni be3dd85503 Update scheduler cache package 2018-06-11 13:54:12 +08:00
Joachim Bartosik bfb70e40ee Allow passing taints to Node Group creation. 2018-05-18 14:33:33 +02:00
Marcin Wielgus 04bec08e84 Compilation fix 2018-03-20 20:11:36 +01:00
Aleksandra Malinowska 4c594db7f8 Run spellchecker 2018-03-15 15:47:49 +01:00
Maciej Pytel d876d74912 Ignore unfitness in price expander if using GPU 2018-03-02 15:50:43 +01:00
Maciej Pytel b7f8622eb2 Create node groups with GPU in scale-up.go
This is still not implemented in cloudprovider.
Extended NewNodeGroup inteface to have a way of passing
parameters for more complex resources.
2017-12-11 13:12:22 +01:00
Edward Tsang 4104a91991 more spelling fixes 2017-11-02 14:21:36 -07:00
Krzysztof Jastrzebski 80a7577399 Unit tests. 2017-09-25 11:37:24 +02:00
Marcin Wielgus f217d4ac93 Do not return error from exist 2017-09-01 00:24:01 +02:00
Marcin Wielgus fe52c01992 Penalty for non-existing node groups in price expander 2017-08-31 11:16:43 +02:00
Marcin Wielgus ac2c471eb1 NAP interface implementation - part 1 2017-08-25 11:17:50 +02:00
Marcin Wielgus a766f676ba Node Autoprovisioning expansion of CloudProvider api 2017-08-18 15:34:24 +02:00
Aleksandra Malinowska c159a90f04 rename test provider package 2017-07-06 16:23:15 +02:00
Marcin Wielgus fc43808149 Godeps bump for CA 2017-07-03 22:05:11 +02:00
Marcin Wielgus 80f17e1142 Move expanders documentation to faq 2017-06-29 13:25:50 +02:00
Marcin Wielgus ddb04529e9 Don't skip node groups that help only besteffort pods in price expander 2017-06-21 15:47:47 +02:00
Marcin Wielgus cd65705bea Fix lint problems in preferred.go 2017-06-12 22:13:00 +02:00
Marcin Wielgus 69c77791a2 Fix error types 2017-06-12 21:26:50 +02:00
Marcin Wielgus e2e171b7b7 Enable pricing in expander factory 2017-06-09 11:09:43 -07:00
Marcin Wielgus 94558d9e90 Combine price and preferred node in price expander 2017-06-01 11:47:00 +02:00
Marcin Wielgus e9ebfb1c35 Preferred node in price-preferred expander 2017-05-30 20:33:10 +02:00
Marcin Wielgus fa87710b1e Price-preferred node expander - part 1 2017-05-30 13:30:22 +02:00
Yusuke Kuoka 5304e9af21 cluster-autoscaler: Fix typos in comments 2017-05-10 11:22:15 +09:00
Marcin Wielgus e8dd60f858 Add a method to NodeGroup for providing a template NodeInfo 2017-05-09 13:36:37 +02:00
Marcin Wielgus 34eb4973f8 Fix imports in cluster autoscaler after migrating it from contrib 2017-04-18 15:42:04 +02:00
Marcin Wielgus 2ffaddb7c0 Cluster-autoscaler: lint 2017-03-02 15:15:07 +01:00
Marcin Wielgus 72a47dc2b2 Cluster-autoscaler: update code for 1.6 k8s sync 2017-03-02 14:34:49 +01:00
Yusuke Kuoka baee799524 cluster-autoscaler: Dynamic Reconfiguration via ConfigMaps
Adds a new optional flag named `configmap` to specify the name of a configmap containing node group specs.

The configmap is polled every `scan-interval` seconds to reconfigure cluster-autoscaler dynamically at runtime.

Example usage:

```
./cluster-autoscaler --v=4 --cloud-provider=aws --skip-nodes-with-local-storage=false --logtostderr --leader-elect=false --configmap=cluster-autoscaler --logtostderr
```

The configmap would look like:

```yaml
kind: ConfigMap
apiVersion: v1
metadata:
  name: cluster-autoscaler
  namespace: kube-system
data:
  settings: |-
    {
      "nodeGroups": [
        {
          "minSize": 1,
          "maxSize": 2,
          "name": "kubeawstest-nodepool1-AutoScaleWorker-1VWD4GAVG35L5"
        }
      ]
    }
 ```

Other notes:

* Make namespace defaults to "kube-system"
according to https://github.com/kubernetes/contrib/pull/2226#discussion_r94144267

* Trigger a full-recreate on a configuration change

according to https://github.com/kubernetes/contrib/pull/2226#issuecomment-269617410

* Introduced `autoscaler/` and moved  all the dynamic/recreatable-at-runtime parts of autoscaler into there (Update: the package is now named `core` according to https://github.com/kubernetes/contrib/pull/2226#issuecomment-273071663)

* Extracted the core of CA(=`func Run()` in `main.go`) into `Autoscaler`

* `DynamicAutoscaler` is a wrapper around `Autoscaler` which achieves reconfiguration of CA by recreating an `Autoscaler` instance on a configmap change.

* Moved `scale_down*.go`, `scale_up*.go` and `utils*.go` into the `autoscaler` package accordingly because they seemed to be meant to be collocated in the same package as the core of CA (which is now implemented as `Autoscaler`)

* Moved the `createEventRecorder` func from the `main` package to the `utils/kubernetes` package to make it importable from both `main` and `autoscaler`
2017-02-24 20:36:47 +09:00
Marcin Wielgus b57ab3b48a Cluster-autoscaler: add NodeReadyPredicate and allow unready nodes in CA 2017-01-18 15:09:59 +01:00
Marcin Wielgus cfc1117a17 Cluster-autoscaler: decrease target size function in cloud provider interface 2017-01-16 15:20:45 +01:00
Marcin Wielgus be796d8218 Cluster-autoscaler: add get nodes function to cloud provider interface 2017-01-04 13:23:57 +01:00
thebigjc 77629b5193 Multiple expansion strategies 2016-12-17 07:40:37 -05:00