-
Notifications
You must be signed in to change notification settings - Fork 68
Add annotation for debugging workspace startup #425
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -47,6 +47,10 @@ const ( | |
| // this annotation will be cleared | ||
| DevWorkspaceStopReasonAnnotation = "controller.devfile.io/stopped-by" | ||
|
|
||
| // DevWorkspaceDebugStartAnnotation enables debugging workspace startup if set to "true". If a workspace with this annotation | ||
| // fails to start (i.e. enters the "Failed" phase), its deployment will not be scaled down in order to allow viewing logs, etc. | ||
| DevWorkspaceDebugStartAnnotation = "controller.devfile.io/debug-start" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seems it's a good time(or too late) to agree on a convention on annotations/labels names we use. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah yeah this is tricky -- I'm on the side of using dashes as a convention, since it's similar to common k8s labels such as There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. +1 to use - for a new annotations and properties. |
||
|
|
||
| // WebhookRestartedAtAnnotation holds the the time (unixnano) of when the webhook server was forced to restart by controller | ||
| WebhookRestartedAtAnnotation = "controller.devfile.io/restarted-at" | ||
|
|
||
|
|
||
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.
leaving the deployment in place is the result, but what actually it does - do not initialize stopping of failed/failing workspace.
Do I understand correctly, that with https://github.com/devfile/devworkspace-operator/pull/424/files users are supposed to manually stop workspace before starting it again if debug mode is activated?
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.
That would be the requirement, yes -- it leaves failed workspaces with
spec.started=trueso that you can debug issues (basically it treats workspaces with the annotation similar to how they were treated before #362).The other way to implement this would be to leave the deployment in place for stopped workspaces when the debug annotation is present, which I think is more confusing.
This PR will need to be reworked slightly once #424 is merged.