-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Add kubectl rollout status
#19946
Conversation
0b56fec
to
289a8f8
Compare
289a8f8
to
30d88ea
Compare
This is blocked by #19939 since it depends on deployments watch. |
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. |
@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, |
Is this any different than If not, we could wait and add something more customized in 1.3. |
@bgrant0607 yes, this is similar to |
PR #20009 adds availableReplicas to |
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. |
30d88ea
to
84d63dd
Compare
return "", false, err | ||
} | ||
if deployment.Generation <= deployment.Status.ObservedGeneration { | ||
if deployment.Status.UpdatedReplicas == deployment.Spec.Replicas { |
There was a problem hiding this comment.
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.
c7f1a84
to
f308695
Compare
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` |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
Left some comments, feel free to apply lgtm after you address them. |
f308695
to
b57b7e6
Compare
@Kargakis thanks! |
@janetkuo there is also https://github.com/kubernetes/kubernetes/pull/19946/files#r62630896 buried in my previous comments |
Sorry, missed that. Add some questions in the comment. |
b57b7e6
to
5bb8b71
Compare
052c75f
to
67beccc
Compare
GCE e2e build/test passed for commit 67beccc. |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
GCE e2e build/test passed for commit 67beccc. |
Automatic merge from submit-queue |
if err != nil { | ||
return "", false, err | ||
} | ||
if deployment.Generation <= deployment.Status.ObservedGeneration { |
There was a problem hiding this comment.
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?
Pull Request Guidelines
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