Commit Graph

60 Commits

Author SHA1 Message Date
Timothy Palpant 7f6b021cef Add h1 and m5 AWS instance types 2017-12-04 13:16:48 -05:00
Gary Rennie 7942427a17
Set code types for syntax highlighting in README.md 2017-11-28 12:47:34 +00:00
Michael Nikitochkin fa0a66396d
Updated aws instance types. 2017-11-22 22:42:30 +01:00
Michael Nikitochkin 8e1c712f39
Added aws c5 instance types. 2017-11-22 08:28:55 +01:00
Edward Tsang 4104a91991 more spelling fixes 2017-11-02 14:21:36 -07:00
mmerrill3 3d043f73cb Renaming the interface function to Cleanup() for CloudProvider type 2017-11-01 12:41:13 -04:00
mmerrill3 77aa30a5c1 Fixing for issue 252 by implementing a channel to stop the go routine 2017-11-01 11:00:00 -04:00
Seth Pollack ea9aa6fe14 update aws instance types 2017-10-28 21:47:24 -04:00
Maciej Pytel 07511f444a Add Refresh method to cloud provider
This can be used to dynamically update cloud provider
config (in particular list of managed NodeGroups and their
min/max constraints).
Add GKE implementation.
2017-10-24 18:36:29 +02:00
Krzysztof Jastrzebski 56ac572666 Adds resource limits to cloud provider. 2017-10-23 16:06:56 +02:00
Seth Pollack 8309630048 fix formatting 2017-09-10 12:39:09 -04:00
Seth Pollack d87a3e8615 add gpu to node template 2017-09-10 12:25:51 -04:00
Marcin Wielgus 8c1f356cc9 Merge pull request #287 from alok87/run_in_master_ca_Aws
Run CA in master node - aws
2017-09-05 04:57:48 +05:30
Marcin Wielgus e04e880ee7 Merge pull request #298 from sergeylanzman/patch-1
Move regexp.MustCompile in AWS provider to global variable
2017-09-05 04:10:24 +05:30
Sergey Lanzman 41c7901647 Fix typo GetAvilableMachineTypes() => GetAvailableMachineTypes() 2017-09-04 22:17:17 +03:00
Sergey Lanzman 4bc1f7291b Move regexp.MustCompile in AWS provider to global variable
Function AwsRefFromProviderId call many times. If scale down enable this call default every 10 seconds per each node.
regexp.MustCompile it very heavy function and not need call each time
2017-09-04 20:43:22 +03: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
alok87 694f461ae8 Information to run CA in master in aws 2017-09-01 09:30:55 +05:30
Marcin Wielgus f217d4ac93 Do not return error from exist 2017-09-01 00:24:01 +02:00
Marcin Wielgus e9261a249c Merge pull request #284 from mwielgus/nap-5
Node autoprovisioning in scale up
2017-08-31 17:47:25 +05:30
Marcin Wielgus b172926b5e NodeGroupCreate for gce cloud provider 2017-08-31 00:48:40 +02:00
Joel Speed f369843353 Check ASG name list not empty 2017-08-30 13:50:17 +01: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
Ryan Moore 943c5acba7
bump container image version to 0.6.0 2017-08-09 16:03:09 -07:00
Ivan Towlson 902d2414b7 Fixed typoes of name 'Kubernetes' 2017-08-03 14:20:23 +12:00
Seth Pollack e855c7f698
add tests 2017-07-21 08:42:09 -04:00
Seth Pollack c3b86378a2
add taints to AWS node template 2017-07-20 22:07:20 -04:00
Ryan Walls 350ddb2b0c Update readme with permissions for scaling node groups from 0
The code used to scale node groups from 0 requires the `DescribeLaunchConfigurations` permission.
2017-07-13 16:20:13 -06:00
Seth Pollack 314ed88b14
Enable min size 0 in aws 2017-07-10 09:04:18 -04:00
Marcin Wielgus fc43808149 Godeps bump for CA 2017-07-03 22:05:11 +02:00
Yusuke Kuoka dfb481b19f cluster-autoscaler: Fix excessive calls to DescribeAutoScalingGroup
By caching AWS refs for nodes/EC2 instances already known to be not in any of ASGs managed by cluster-autoscaler(CA).

Please beware of the edge case - this method is safe as long as users don't attach nodes by calling AttachInstances API after CA cached them. I believe, even if it was necessary, a warning in the documentation about the edge case is enough for now. If we really need to support the case, I will submit an another PR to invalidate the cache periodically so that CA can detect the formerly cached nodes are attached to ASG(s).

Also refactor AwsManager for less complexity by extracting types, accordingly to the discussion made [here](https://github.com/kubernetes/autoscaler/pull/46#discussion_r117912687)
2017-06-22 16:55:15 +09:00
Yusuke Kuoka 3e8cc02243 cluster-autoscaler: Fix node group auto discovery for AWS not to mix up ASGs from different k8s clusters 2017-06-22 15:59:53 +09:00
Johannes Würbach 2ad85f224e AWS: Fixed link to the detailed explanation
https://github.com/kubernetes/contrib/pull/1552#r75532949 seems to explain the reasoning behind multiple ASGs much better then the previous link target.
2017-06-19 14:34:10 +02:00
Marcin Wielgus 69c77791a2 Fix error types 2017-06-12 21:26:50 +02:00
Marcin Wielgus 2610486772 Merge pull request #84 from ejether/patch-1
Update README.md
2017-05-31 22:44:10 +02:00
Marcin Wielgus e11fa3df27 Merge pull request #86 from mwielgus/price-1
Pricing model interface for CA
2017-05-26 14:22:37 +02:00
Marcin Wielgus bc86bb2676 Pricing model for CA 2017-05-25 11:01:05 +02:00
ejether a3654a2473 Update README.md
Empirically determined that the policy "autoscaling:DescribeAutoScalingTags" is actually "autoscaling:DescribeTags",
2017-05-24 14:03:42 -07:00
Jason Ansel ef173ab691 Update cluster-autoscaler version number in AWS example deployment 2017-05-23 10:18:08 -07:00
Marcin Wielgus bfa105e959 Enable min size 0 in gce 2017-05-16 17:41:58 +02:00
Marcin Wielgus 30cb7a52e5 Merge pull request #11 from mumoshu/node-group-auto-discovery-with-asg-tag
cluster-autoscaler: Re: AWS Autoscaler autodiscover ASG names and sizes
2017-05-10 11:07:58 +02:00
Yusuke Kuoka 5304e9af21 cluster-autoscaler: Fix typos in comments 2017-05-10 11:22:15 +09:00
Yusuke Kuoka e9c7cd0733 cluster-autoscaler: Re: AWS Autoscaler autodiscover ASG names and sizes
This is an alternative implementation of https://github.com/kubernetes/contrib/pull/1982

Notable differences from the original PR are:

* A new flag named `--node-group-auto-discovery` is introduced for opting in to enable the auto-discovery feature.
  * For example, specifying `--cloud-provider aws --node-group-auto-discovery asg:tag=k8s.io/cluster-autoscaler/enabled` instructs CA to auto-discover ASGs tagged with `k8s.io/cluster-autoscaler/enabled` to be used as target node groups
* The new code path introduced by this PR is executed only when `node-group-auto-discovery` is specified. There is relatively less chance to break existing features by introducing this change

Resolves https://github.com/kubernetes/contrib/issues/1956

---

Other notes:

* We rely mainly on the `DescribeTags` API rather than `DescribeAutoScalingGroups` so that AWS can filter out unnecessary ASGs which doesn't belong to the k8s cluster, for us.
  * If we relied on `DescribeAutoScalingGroups` here, as it doesn't support `Filter`ing, we'd need to iterate over ALL the ASGs available in an AWS account, which isn't desirable due to unnecessary excessive API calls and network usages

* Update cloudprovider/aws/README for the new configuration

* Warn abount invalid combination of flags
according to the review comment https://github.com/kubernetes/autoscaler/pull/11#discussion_r113713138

* Emit a validation error when both --nodes and --node-group-auto-discovery are specified
according to the review comment https://github.com/kubernetes/autoscaler/pull/11#discussion_r113958080

TODO/Possible future improvements before recommending this to everyone:

* Cache the result of an auto-discovery for a configurable period, so that we won't invoke DescribeTags and DescribeAutoScalingGroup APIs too many times
2017-05-10 08:36:02 +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 760477c96c Cluster-autoscaler: update aws doc with --stderrthreshold=info flag 2017-03-29 23:47:20 +02: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
Phil Kates c2cb357e7d Return correct ProviderID format from GetAsgNodes
This matches the way that the [gce does it][1] and fixes issues with the
[cluster state][2].

1: https://github.com/kubernetes/contrib/blob/master/cluster-autoscaler/cloudprovider/gce/gce_manager.go#L247
2: https://github.com/kubernetes/contrib/issues/2228#issuecomment-274896211
2017-02-21 12:06:12 -08:00