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 workspace:delete command to delete user's workspace #16236

Closed
tolusha opened this issue Mar 5, 2020 · 2 comments
Closed

Add workspace:delete command to delete user's workspace #16236

tolusha opened this issue Mar 5, 2020 · 2 comments
Assignees
Labels
area/chectl Issues related to chectl, the CLI of Che kind/task Internal things, technical debt, and to-do tasks to be performed. severity/P1 Has a major impact to usage or development of the system.
Milestone

Comments

@tolusha
Copy link
Contributor

tolusha commented Mar 5, 2020

Is your task related to a problem? Please describe.

User might work and then go which make his workspaces abandoned. Admins needs a tool to cleanup user's resources.

Describe the solution you'd like

Add workspace:delete command to delete user's workspaces.

Describe alternatives you've considered

Additional context

Check how it works with per-namespace strategy.
downstream issue https://issues.redhat.com/browse/CRW-538

@tolusha tolusha added kind/task Internal things, technical debt, and to-do tasks to be performed. severity/P1 Has a major impact to usage or development of the system. area/chectl Issues related to chectl, the CLI of Che labels Mar 5, 2020
@tolusha tolusha added this to the Backlog - Deploy milestone Mar 5, 2020
@tolusha tolusha mentioned this issue Mar 10, 2020
45 tasks
@sleshchenko
Copy link
Member

sleshchenko commented Mar 10, 2020

@tolusha Could you clarify more about this command?
Is it going to have different flags like

chectl workspace:delete // non-valid
chectl workspace:delete --all-workspaces //delete all available workspaces of the current user
chectl workspace:delete sleshche/java-mysql //delete workspace `java-mysql` of the user `sleshche`
chectl workspace:delete --all-users //delete all workspaces on the Che cluster. Available only for Che Admin

@tolusha
Copy link
Contributor Author

tolusha commented Mar 18, 2020

[16:49:30] tolusha@fractal ~/projects/chectl/bin (ab/delete) $ ./run workspace:list -n abazkoche --access-token=$CHE_ACCESS_TOKEN
  ✔ Verify Kubernetes API...OK (it's OpenShift)
  ✔ Verify if namespace 'abazkoche' exists
  ✔ Retrieving Eclipse Che server URL... http://che-abazkoche.apps.ocp43.codereadyqe.com
  ✔ Eclipse Che status check
  ✔ Get workspaces... done
Id                        Name                 Namespace Status  Created                  Updated 
workspace55z6ay05muvv3wk1 apache-camel-k-qwn6g admin-che STOPPED 2020-03-18T14:45:55.177Z         
[16:49:42] tolusha@fractal ~/projects/chectl/bin (ab/delete) $ ./run workspace:delete -n abazkoche --access-token=$CHE_ACCESS_TOKEN -w workspace55z6ay05muvv3wk1
  ✔ Verify Kubernetes API...OK (it's OpenShift)
  ✔ Verify if namespace 'abazkoche' exists
  ✔ Retrieving Eclipse Che server URL... http://che-abazkoche.apps.ocp43.codereadyqe.com
  ✔ Eclipse Che status check
  ✔ Get workspace with id 'workspace55z6ay05muvv3wk1'... done
  ✔ Delete workspace with id 'workspace55z6ay05muvv3wk1'... done
  ✔ Verify if user namespace exists 'admin-che'... not found
  ↓ Delete user namespace [skipped]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/chectl Issues related to chectl, the CLI of Che kind/task Internal things, technical debt, and to-do tasks to be performed. severity/P1 Has a major impact to usage or development of the system.
Projects
None yet
Development

No branches or pull requests

2 participants