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

Adding scale up down code for DeploymentController #14209

Merged

Conversation

nikhiljindal
Copy link
Contributor

Ref #1743

Adding code for scaling up down RCs using RollingUpdateStrategy.
Verified manually that it works.

Next steps:

Will send subsequent PRs for the above tasks.

@nikhiljindal
Copy link
Contributor Author

cc @ghodss @ironcladlou

@k8s-github-robot k8s-github-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Sep 18, 2015
@k8s-github-robot
Copy link

Labelling this PR as size/L

@k8s-bot
Copy link

k8s-bot commented Sep 18, 2015

GCE e2e build/test failed for commit 13813a7640484db8a06f440e006d5c1a8a2435d9.

@k8s-bot
Copy link

k8s-bot commented Sep 18, 2015

GCE e2e build/test failed for commit bdd5b89cbb15cec3163fe8ce463cc570354874bb.

return err
}

func (d *DeploymentController) scaleRC(rc *api.ReplicationController, scale int) (*api.ReplicationController, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Does "scale" universally mean "increment/decrement" in our terminology? Or does it sometimes mean "set"? E.g. someone might thing scaleRC means set replicas to the scale argument, not increment/decrement.

Copy link
Contributor

Choose a reason for hiding this comment

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

If it means increment/decrement, leave as is. If it typically means set replicas to count, then I'd recommend renaming to adjustRC.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are right.
Updated the method to take the newReplica size, rather than just the diff.

@ghodss
Copy link
Contributor

ghodss commented Sep 19, 2015

Most comments are just nits, LGTM to merge.

@nikhiljindal
Copy link
Contributor Author

Thanks @ghodss
Updated code as per comments, PTAL!
I assume you will add the LGTM tag when this look goods to you, let me know if you cant add tags (I assume you can)

@ghodss
Copy link
Contributor

ghodss commented Sep 19, 2015

Everything LGTM. I still can't add labels unfortunately but I'll let you know if that changes.

return err
}

oldRCs, err := d.getoldRCs(deployment)
Copy link
Contributor

Choose a reason for hiding this comment

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

getOldRCs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@k8s-bot
Copy link

k8s-bot commented Sep 19, 2015

GCE e2e build/test passed for commit d800fef81b8db9a77890e717ed1cbb31d2ae7592.

@nikhiljindal
Copy link
Contributor Author

Thanks! Updated code as per comments.
Adding the LGTM tag.

@nikhiljindal nikhiljindal added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 19, 2015
@k8s-github-robot
Copy link

Continuous integration appears to have missed, closing and re-opening to trigger it

@k8s-bot
Copy link

k8s-bot commented Sep 19, 2015

GCE e2e build/test passed for commit 89e9691.

@k8s-github-robot
Copy link

@k8s-bot test this [submit-queue is verifying that this PR is safe to merge]

@k8s-bot
Copy link

k8s-bot commented Sep 19, 2015

GCE e2e build/test passed for commit 89e9691.

@k8s-github-robot
Copy link

Automatic merge from submit-queue

k8s-github-robot pushed a commit that referenced this pull request Sep 19, 2015
@k8s-github-robot k8s-github-robot merged commit 7425cd5 into kubernetes:master Sep 19, 2015
@ironcladlou
Copy link
Contributor

Is there going to be a followup PR for availability checking against the scaled up RCs? I have design questions/comments around that aspect.

@ironcladlou
Copy link
Contributor

Nevermind, I can discuss in #14130

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants