-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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 deployment Conditions and oc rollout status #9874
Conversation
|
||
const ( | ||
rolloutStatusLong = ` | ||
Watch the status of the latest rollout, until it's done.` |
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.
Meaning the command waits and blocks and only exit when the rollout is completed? In such case I'd vote for oc rollout watch
or oc rollout status --watch
(exits right away without the flag) for consistency.
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.
This proposal needs to move upstream
On Wed, Jul 20, 2016 at 7:50 PM, Fabiano Franz notifications@github.com
wrote:
In pkg/cmd/cli/cmd/rollout/rollout.go
#9874 (comment):@@ -134,3 +135,20 @@ func NewCmdRolloutUndo(fullName string, f *clientcmd.Factory, out io.Writer) *co
cmd.Example = fmt.Sprintf(rolloutUndoExample, fullName)
return cmd
}
+
+const (
- rolloutStatusLong =
+Watch the status of the latest rollout, until it's done.
Meaning the command waits and blocks and only exit when the rollout is
completed? In such case I'd vote for oc rollout watch or oc rollout
status --watch (exits right away without the flag) for consistency.—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/openshift/origin/pull/9874/files/7384f4c3e74a711cdb73ecb1d1958c1b3dc6f251#r71573627,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADuFf3RedOQQ1cZeVl6Rb8Otb6xPqxmrks5qXl_3gaJpZM4JNVe5
.
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.
Opened kubernetes/kubernetes#30627
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.
There is an issue here: deployment/foo: A deployment is considered complete once foo.spec.replicas == foo.status.updatedReplicas dc/foo: A deployment is considered complete once openshift.io/deployment-phase=Complete is added in the underlying replication controller. This issue screams for Conditions in the deployment config. The DC controller should update a DC that was successfully deployed with a Condition, |
Yes. On Tue, Aug 16, 2016 at 8:44 AM, Michail Kargakis notifications@github.com
|
Blocked for now. Will handle as part of https://trello.com/c/OIggCmzo/699-5-deployments-downstream-conditions |
Added conditions alongside |
rolloutStatusLong = ` | ||
Watch the status of the latest rollout, until it's done.` | ||
|
||
rolloutStatusExample = ` # Watch the status of the latest rollout |
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.
this wont watch when the rollout is complete, just print the status, right?
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.
It watches until the end of the rollout. @fabianofranz asked for a --watch flag that we will default to true to make it clearer: kubernetes/kubernetes#30627
case deployutil.HasImageChangeTrigger(config): | ||
return fmt.Sprintf("Deployment config %q waiting on image update", name), false, nil | ||
case len(config.Spec.Triggers) == 0: | ||
return fmt.Sprintf("Deployment config %q waiting on manual update (use 'oc deploy %s --latest')", name, name), true, nil |
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.
this will be oc rollout latest right?
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.
Yes, will update
// Return as an error. | ||
return fmt.Sprintf("%s\n", cond.Message), true, errors.New(cond.Message) | ||
case cond != nil && cond.Reason == deployutil.PausedDeployReason: | ||
return fmt.Sprintf("Deployment config %q is paused. Unpause to continue watching the status of the rollout.\n", config.Name), true, nil |
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.
s/Unpause/Resume/
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.
ok
LGTM [merge] |
[Test]ing while waiting on the merge queue |
#10773 [test] |
#11240 [test] |
Evaluated for origin test up to 3417ff0 |
continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/9867/) |
#11353 [merge] |
#11074 [merge] |
Evaluated for origin merge up to 3417ff0 |
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/10009/) (Base Commit: 50cc896) (Image: devenv-rhel7_5171) |
@mfojtik @smarterclayton @fabianofranz
Fixes #10994
Trello card: https://trello.com/c/OIggCmzo/699-5-deployments-downstream-conditions