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

Add kubectl rollout status #19946

Merged
merged 1 commit into from
May 12, 2016

Conversation

janetkuo
Copy link
Member

@janetkuo janetkuo commented Jan 21, 2016

Pull Request Guidelines

  1. Please read our contributor guidelines.
  2. See our developer guide.
  3. Follow the instructions for labeling and writing a release note for this PR in the block below.
Implement `kubectl rollout status` that can be used to watch a deployment's rollout status

Addresses #17168; depends on #19882 (the "Add kubectl rollout" commit).
See proposal.

Fixes #25235

cc @bgrant0607 @nikhiljindal @ironcladlou @Kargakis @kubernetes/sig-config @kubernetes/kubectl @madhusudancs


This change is Reviewable

@k8s-github-robot k8s-github-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jan 21, 2016
@janetkuo janetkuo force-pushed the kubectl-rollout-status branch from 0b56fec to 289a8f8 Compare January 21, 2016 21:32
@k8s-github-robot k8s-github-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jan 21, 2016
@janetkuo janetkuo force-pushed the kubectl-rollout-status branch from 289a8f8 to 30d88ea Compare January 21, 2016 22:18
@janetkuo janetkuo changed the title WIP: Add kubectl rollout status RFC: Add kubectl rollout status Jan 21, 2016
@janetkuo
Copy link
Member Author

This is blocked by #19939 since it depends on deployments watch.

@ghodss
Copy link
Contributor

ghodss commented Jan 21, 2016

Will this command be able to be made equally useful if the deployment and its rc's do not have any of the annotations set by kubectl deploy? I ask because all our deployment object changes will be done with kubectl apply, and it would be great to still have the rollout status command be just as useful.

@janetkuo
Copy link
Member Author

@ghodss: Based on implementation in #19581 (not merged yet), version annotations will be appended by deployment controller which updates version annotations of a deployment and its RCs when syncing the deployment.

So yes, kubectl rollout status will still be useful if the deployment object changes are done with kubectl apply.

@bgrant0607 bgrant0607 assigned 0xmichalis and unassigned j3ffml Jan 22, 2016
@bgrant0607
Copy link
Member

Is this any different than kubectl get -w deployment/mydep?

If not, we could wait and add something more customized in 1.3.

@janetkuo
Copy link
Member Author

@bgrant0607 yes, this is similar to kubectl get -w deployments. I'll add available replicas to get in another PR and we can deal with kubectl rollout status after 1.2 then.

@janetkuo
Copy link
Member Author

PR #20009 adds availableReplicas to kubectl get deployments.

@bgrant0607
Copy link
Member

I'm going to close this to get it off my radar. It can be reopened after we decided what we want to do here.

@bgrant0607 bgrant0607 closed this Jan 30, 2016
@janetkuo janetkuo reopened this May 5, 2016
@k8s-github-robot k8s-github-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. kind/old-docs size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels May 5, 2016
@janetkuo janetkuo force-pushed the kubectl-rollout-status branch from 30d88ea to 84d63dd Compare May 6, 2016 18:51
@janetkuo janetkuo removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 6, 2016
return "", false, err
}
if deployment.Generation <= deployment.Status.ObservedGeneration {
if deployment.Status.UpdatedReplicas == deployment.Spec.Replicas {
Copy link
Contributor

Choose a reason for hiding this comment

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

I am going to create a helper for this in the perma-failed PR, for now, it's ok. The perma-failed PR will be merged later so I will refactor this.

@janetkuo janetkuo force-pushed the kubectl-rollout-status branch from c7f1a84 to f308695 Compare May 10, 2016 01:43
@janetkuo
Copy link
Member Author

All comments addressed. PTAL

const (
status_long = `Watch the status of current rollout, until it's done.`
status_example = `# Watch the rollout status of a deployment
$ kubectl rollout status deployment/abc`
Copy link
Contributor

Choose a reason for hiding this comment

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

We don't use dollar signs anymore

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed

@0xmichalis
Copy link
Contributor

Left some comments, feel free to apply lgtm after you address them.

@janetkuo janetkuo force-pushed the kubectl-rollout-status branch from f308695 to b57b7e6 Compare May 10, 2016 17:23
@janetkuo janetkuo added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 10, 2016
@janetkuo
Copy link
Member Author

@Kargakis thanks!

@0xmichalis
Copy link
Contributor

@janetkuo there is also https://github.com/kubernetes/kubernetes/pull/19946/files#r62630896 buried in my previous comments

@janetkuo janetkuo removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 10, 2016
@janetkuo
Copy link
Member Author

Sorry, missed that. Add some questions in the comment.

@janetkuo janetkuo force-pushed the kubectl-rollout-status branch from b57b7e6 to 5bb8b71 Compare May 10, 2016 20:41
@janetkuo janetkuo added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 10, 2016
@janetkuo janetkuo force-pushed the kubectl-rollout-status branch from 052c75f to 67beccc Compare May 10, 2016 20:49
@k8s-github-robot k8s-github-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 10, 2016
@0xmichalis 0xmichalis added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 10, 2016
@k8s-bot
Copy link

k8s-bot commented May 10, 2016

GCE e2e build/test passed for commit 67beccc.

@janetkuo janetkuo added this to the v1.3 milestone May 11, 2016
@janetkuo janetkuo added the priority/backlog Higher priority than priority/awaiting-more-evidence. label May 11, 2016
@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 May 12, 2016

GCE e2e build/test passed for commit 67beccc.

@k8s-github-robot
Copy link

Automatic merge from submit-queue

if err != nil {
return "", false, err
}
if deployment.Generation <= deployment.Status.ObservedGeneration {
Copy link
Contributor

Choose a reason for hiding this comment

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

May I know in what condition will the observed generation be greater than the generation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/app-lifecycle area/kubectl lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/backlog Higher priority than priority/awaiting-more-evidence. release-note Denotes a PR that will be considered when it comes time to generate release notes. 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.

9 participants