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

new behavior of kompose delete #41

Closed
ngtuna opened this issue Jul 15, 2016 · 8 comments
Closed

new behavior of kompose delete #41

ngtuna opened this issue Jul 15, 2016 · 8 comments
Assignees
Labels
kind/design Categorizes issue or PR as related to design. priority/P1

Comments

@ngtuna
Copy link
Contributor

ngtuna commented Jul 15, 2016

Adding flag -a/--all in order to delete all resources.
Consider to rename to kompose rm

@ngtuna ngtuna added the kind/design Categorizes issue or PR as related to design. label Jul 15, 2016
@ngtuna ngtuna self-assigned this Aug 2, 2016
@janetkuo
Copy link
Member

janetkuo commented Aug 2, 2016

docker-compose rm is used for removing "stopped" service containers, whereas kubectl delete can (and often) be used to remove the running ones.

@ngtuna
Copy link
Contributor Author

ngtuna commented Aug 2, 2016

Thanks @janetkuo for pointing it out. I am not thinking about kompose delete much right now. Paying more attention on kompose up. However, let's say we can have kompose rm to firstly stop containers running on k8s and then remove them. Don't want to be duplicated with kubectl delete but somehow we can add kompose stop to only do stop action. However, we should be very careful to not going into the same way last time when we overlapped kubectl functions. Interactive mode still be good option to go.

@ngtuna
Copy link
Contributor Author

ngtuna commented Aug 16, 2016

So, after some investigating, I see we need a thing is in contrast with kompose up. So I suggest:

- kompose down --file/--bundle <input_file> : delete deployment and svc (default: docker-compose.yml)
- kompose down --all : delete all resources (deployment, rc, svc, ds)

Anything else ?
/cc @janetkuo @Runseb

@janetkuo
Copy link
Member

Is kompose down --all going to delete all resources in the system, regardless if it's created by kompose or not? Not sure if it's expected behavior from the users' perspective -- depends on their work flow

@ngtuna
Copy link
Contributor Author

ngtuna commented Aug 17, 2016

Yes it's a critical action. We can ask for confirmation like this:

$ kompose down --all
This action is going to delete all resources in all namespaces (except kube-system) in the kubernetes cluster. 
Are you sure to continue ? (y/n)

@sebgoa
Copy link
Contributor

sebgoa commented Aug 31, 2016

I don't think kompose down should delete everything. It should only delete the resources that the conversion created.

kompose down -f docker-voting.yml

should delete the deployments and services that it creates.

At least that's what I would expect.

@ngtuna
Copy link
Contributor Author

ngtuna commented Sep 2, 2016

So I will go merging kompose down without supporting --all flag. We can make a follow-up PR for this later.

@ngtuna
Copy link
Contributor Author

ngtuna commented Sep 2, 2016

Close via #113

@ngtuna ngtuna closed this as completed Sep 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/design Categorizes issue or PR as related to design. priority/P1
Projects
None yet
Development

No branches or pull requests

3 participants