Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autoscaler implementation #9612

Closed
wants to merge 14 commits into from
Closed

Autoscaler implementation #9612

wants to merge 14 commits into from

Conversation

ramr
Copy link

@ramr ramr commented Jun 10, 2015

This is step 2 of the autoscaler implementation - building on the types defined by @pweil- in #5492
and the original autoscaler proposal from @smarterclayton at: #2863

To test, define a replication controller and an autoscaler configuration - example at: https://github.com/ramr/autoscaler-k8s-test/blob/master/test-as.json
and the replication controller gets scaled automatically to the min/max limits set in the autoscaler spec.

Or you can use the test repo at https://github.com/ramr/autoscaler-k8s-test

git clone https://github.com/ramr/autoscaler-k8s-test  
cd autoscaler-k8s-test  
make K8S_SOURCE_DIR=~/work/kubernetes test  

and the replicas for the sample replication controller cluster/kubectl.sh get rc, should scale upto a limit of 6 replicas.

PTAL - Any comments/feedback greatly appreciated. Thx

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project, in which case you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

@k8s-bot
Copy link

k8s-bot commented Jun 10, 2015

Can one of the admins verify that this patch is reasonable to test? (reply "ok to test", or if you trust the user, reply "add to whitelist")

If this message is too spammy, please complain to ixdy.

@ramr
Copy link
Author

ramr commented Jun 10, 2015

Signed the CLA.

@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request) and all commit authors, but as best as we can tell these commits were authored by someone else. If that's the case, please add them to this pull request and have them confirm that they're okay with these commits being contributed to Google. If we're mistaken and you did author these commits, just reply here to confirm.

@ramr
Copy link
Author

ramr commented Jun 10, 2015

@pweil- Think the bot requires you to agree as well - since I used the original types from the unmerged PR - #5492

@pweil-
Copy link
Contributor

pweil- commented Jun 10, 2015

Confirmed. I am @pweil- and I endorse this PR (politician smile)

@davidopp davidopp self-assigned this Jun 10, 2015
@ramr
Copy link
Author

ramr commented Jun 16, 2015

(bump) + any way to check the failing builds?
Shippable says The build you're looking for wasn't found..

@smarterclayton FYI

@smarterclayton
Copy link
Contributor

ok to test

@smarterclayton
Copy link
Contributor

 ./hack/verify-description.sh
API file is missing the required field descriptions: ./pkg/api/v1beta3/types.go
API file is missing the required field descriptions: ./pkg/api/v1/types.go

@k8s-bot
Copy link

k8s-bot commented Jun 16, 2015

GCE e2e build/test passed for commit f726fc64c6ec57a81490315b6d44523885ecae7a.

@k8s-bot
Copy link

k8s-bot commented Jun 16, 2015

GCE e2e build/test passed for commit 5813ceb013c61f987bd97b071168e8c972d05535.

@ramr
Copy link
Author

ramr commented Jun 17, 2015

🆘 can't see the Shippable errors The build you're looking for wasn't found.?
Would be nice to know what tests the shippable stuff is running ...

@smarterclayton
Copy link
Contributor

See the shippable yaml file

On Jun 16, 2015, at 10:38 PM, ramr notifications@github.com wrote:

can't see the Shippable errors The build you're looking for wasn't found.?
Would be nice to know what tests the shippable stuff is running ...


Reply to this email directly or view it on GitHub.

@k8s-bot
Copy link

k8s-bot commented Jun 17, 2015

GCE e2e build/test failed for commit 12d8f16186cef9fa26ef8cf0584d479dbfdd0c0a.

@k8s-bot
Copy link

k8s-bot commented Jun 17, 2015

GCE e2e build/test passed for commit c79a4cfaa1fff97ac9add2bb1a1e653d9c1cfe07.

@ramr
Copy link
Author

ramr commented Jun 17, 2015

k - third time's a charm!! PTAL - thx.

// AutoScaleThreshold is a behavior based on statistics used to drive the auto-scaler in scaling decisions.
type AutoScaleThreshold struct {
// Type is the type of threshold being used, intention or value.
Type AutoScaleThresholdType `json:"type,omitempty" description:"auto-scale threshold type; intention or value based"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it wasn't clear to me how value-based works; intention-based is configured in Intentions field, but where is value-based configured?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question - don't think it was anywhere but am not sure if I have the right answer to that.

The types were as defined in the original autoscaler types PR ttps://github.com//pull/5492, and when I started to use them, found a couple of missing configuration pieces to evaluate the thresholds - the value and duration in particular, which I added to the AutoScaleIntentionThresholdConfig struct. Given what the intention thresholds support now, the value based thresholds could simply be folded into the intention based ones (aka just need the intention based thresholds - value based becomes a subset).

Don't know the history/discussions leading to the initial autoscaler types PR, so maybe @pweil- or @smarterclayton can shed more light on that. @pweil- / @smarterclayton ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As the discussion progressed intention based threshold were the way everyone was leaning. I eventually removed the value based thresholds from the code (#5492 (comment)). The type is probably unnecessary at this point unless we intend to add value-based configs.

@k8s-bot
Copy link

k8s-bot commented Jun 30, 2015

GCE e2e build/test failed for commit 988bda5333c3d3d3616d05ce1558cc0d67e0e7fa.

@ramr
Copy link
Author

ramr commented Jun 30, 2015

Ok - this has been around for a while, so had to do some babysitting - rebased this to the latest code.

Can't see the build errors - only see a Build cannot be found error on shippable.

Any comments on what else is needed here + can you please let me know the shippable errors.
I can address the errors + comment re: autoscale threshold type that @davidopp had along w/ anything else that needs to be done here. Thanks.

@k8s-bot
Copy link

k8s-bot commented Jun 30, 2015

GCE e2e build/test passed for commit beb8d3414eb907ea2bf64332aea16780a9490f69.

@davidopp
Copy link
Member

davidopp commented Jul 4, 2015

Unfortunately I don't think we're going to be able to give this attention until 1.0.

@smarterclayton
Copy link
Contributor

@pmorie and I will do the bulk of the review for this, but we probably want
whomever has been involved in autoscaling on the Google side to take a look
as well.

On Jul 4, 2015, at 2:29 AM, David Oppenheimer notifications@github.com
wrote:

Unfortunately I don't think we're going to be able to give this attention
until 1.0.


Reply to this email directly or view it on GitHub
#9612 (comment)
.

@k8s-bot
Copy link

k8s-bot commented Jul 10, 2015

GCE e2e build/test passed for commit b4002170e34681968d829fc8bdf54887df480a5a.

@ramr ramr changed the title [DO NOT MERGE] Autoscaler implementation Autoscaler implementation Jul 10, 2015
@k8s-bot
Copy link

k8s-bot commented Jul 10, 2015

GCE e2e build/test passed for commit b4f91be18b033cd19961a6dc253e6afbfc678dd9.

@piosz piosz added the sig/autoscaling Categorizes an issue or PR as relevant to SIG Autoscaling. label Jul 20, 2015
@bgrant0607
Copy link
Member

cc @davidopp

@smarterclayton
Copy link
Contributor

As discussed offline, if there are others who are interested in picking up
the autoscaler implementation and run with it for 1.1 we'd be happy to
assist or hand that off.

On Tue, Jul 28, 2015 at 7:08 AM, Brian Grant notifications@github.com
wrote:

cc @davidopp https://github.com/davidopp


Reply to this email directly or view it on GitHub
#9612 (comment)
.

Clayton Coleman | Lead Engineer, OpenShift

pweil- and others added 14 commits August 3, 2015 19:27
   * cleanup after code rebase:
   * add PrepareForCreate method to node and namespace strategies
   * fixes for updates to method signatures
   * remove unused imports
   * add the generated conversion functions for the autoscaler types
   * use new rest.StandardStorage for the registry storage
   * test fixes and added new tests
   * add duration and scale by fields
   * add autoscaler interfaces and default generic implementation
   * add scale reconciler
   * add autoscaler monitoring sources support
   * add autoscaler client methods + fake client support
  * Refactor manager
  * Convert to using a work queue
  * Hook into kubernetes and controller manager code
  * Reorganize plugins
  * Copyright
  * Remove deprecated api code for merge/rebase w/ @pweil- changes
  * Some cleanup and renames
  * Remove merged labels
  * More refactoring
  * Add autoscaler registry pieces
  * Setup autoscale manager
  * Add and fix tests
  * Optimize policy assessment if there's no targets to operate on.
  * Add info log messages.
add a new strategy for updating autoscaler status.
interface, regenerate docs and swagger spec and fixup tests for new storage
interface.
@k8s-bot
Copy link

k8s-bot commented Aug 3, 2015

GCE e2e build/test passed for commit aba2814.

@jszczepkowski
Copy link
Contributor

The updated design of simplified pod autoscaler is described in #12087 (all the discussion should take place there). We are planning to implement it as a part of 1.1.

@ramr
Copy link
Author

ramr commented Aug 5, 2015

@jszczepkowski yeah saw that afterwards. Rebased as it was outdated - was on the wait queue for a while now (almost a couple of months). Anyway that's a moot point now ...

@davidopp want me to close this out?

@ncdc
Copy link
Member

ncdc commented Aug 25, 2015

This is superseded by 12087, right?

@jszczepkowski @ramr

@ramr
Copy link
Author

ramr commented Aug 25, 2015

@ncdc yes that is correct - finishing up the paperwork here.
Closing in favor of #12087

@ramr ramr closed this Aug 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/autoscaling Categorizes an issue or PR as relevant to SIG Autoscaling.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants