-
Notifications
You must be signed in to change notification settings - Fork 65
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
feat: add workspace:delete command #586
Conversation
Signed-off-by: Anatoliy Bazko <[email protected]>
Signed-off-by: Anatoliy Bazko <[email protected]>
Signed-off-by: Anatoliy Bazko <[email protected]>
} | ||
}) | ||
tasks.add({ | ||
title: 'Delete namespace', |
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.
Hello. @tolusha workspace can be configured to start workspace with the same namespace with Che...
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. that's why I check
skip: ctx => ctx.infrastructureNamespace === flags.chenamespace,
if it is the same namespace then I won't delete it
@tolusha Are we able to avoid having parameter to the main argument - identifier? |
Is |
That's not possible due to underlying cli tool |
@tolusha Are you sure? Seems we just haven't used it before but it's possible. It's called argument while we use only flags https://oclif.io/docs/args |
That's much better $ ./run workspace:list
Id Name Namespace Status Created Updated
workspaceisyay7xhi8euo94t wksp-r1ua che-che STOPPED 2020-03-19T08:55:23.414Z 2020-03-19T08:55:24.392Z
$ ./run workspace:delete -w workspaceisyay7xhi8euo94t --delete-namespace
Workspace with id 'workspaceisyay7xhi8euo94t' deleted.
Namespace 'che-che' deleted. |
Signed-off-by: Anatoliy Bazko <[email protected]>
Signed-off-by: Anatoliy Bazko <[email protected]>
agree, it is possible. Not sure if it is good practice to use arguments for one command and flags for another. We should be consistent. |
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 still believe argument it's a good thing to consider to be implemented in a perspective of workspace:delete command, but I'm OK with the current state as well.
Signed-off-by: Anatoliy Bazko <[email protected]>
Signed-off-by: Anatoliy Bazko <[email protected]>
[test] |
@sleshchenko |
What does this PR do?
Allows to delete user's workspace and namespace.
Use should have cluster admin rights to delete namespaces
What issues does this PR fix or reference?
eclipse-che/che#16236