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

[Feature request]cascading delete deployment #320

Closed
DjangoPeng opened this issue Aug 17, 2017 · 8 comments
Closed

[Feature request]cascading delete deployment #320

DjangoPeng opened this issue Aug 17, 2017 · 8 comments

Comments

@DjangoPeng
Copy link
Contributor

When I call delete_namespaced_deployment() method, I find that the corresponding replicaSet and Pod are not removed. The same issue was submitted on client-go project here. I'm not sure if there is a way to do the cascading deletion. If yes, where and how to use it? If not, do you have plan to make it?

@DjangoPeng
Copy link
Contributor Author

I found there is a same issue here. According to the discussion, I summaries the usage of cascading deletion:

  1. You need to set the propagation_policy='Foreground' when instantiate client.V1DeleteOptions().
  2. Kubernetes version 1.6+.
# Example 
api_instance = client.ExtensionsV1beta1Api()
api_response = api_instance.delete_namespaced_deployment(name, namespace, client.V1DeleteOptions(propagation_policy='Foreground', grace_period_seconds=5))

In a word, I think we would like update the usage of this API in the documents.

@mbohlool
Copy link
Contributor

Nice, it may worth creating an example or a doc/how-to for this, so other people can benefit from it.

@DjangoPeng
Copy link
Contributor Author

@mbohlool I'd like to make a PR for that tonight.

@mbohlool
Copy link
Contributor

@DjangoPeng I appreciate it.

@DjangoPeng
Copy link
Contributor Author

@mbohlool Sorry for a leave. Today, I'm trying to create a PR to add a usage example of cascading deletion. I wanna ensure is it right to add the example here.

@mbohlool
Copy link
Contributor

Examples should be added to /example folder at the root of the repo.

@DjangoPeng
Copy link
Contributor Author

I find a usage of deployment in the /example/notebooks folder. Would you mind me adding a deployment_examples.py in the /example folder? I think it's better to merge the create_deployment.py into it.

@mbohlool
Copy link
Contributor

More examples are good so go ahead with deployment_examples.py.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants