-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Cascading Deployment Removal #162
Comments
sorry for wrong reply. you are right.orphaned_dependents takes no effect |
doesn't look like a python client issue. More like an upstream feature request. can you do delete cascade with kubectl? If yes, you can use -v9 with kubectl to see what APIs are called. |
On my phone so don't have the link handy but kubectl apparently handles
this itself. I do think you're right in that this is an actual API feature
request more so than a client-python problem.
…On Mar 31, 2017 3:14 AM, "Mehdy Bohlool" ***@***.***> wrote:
doesn't look like a python client issue. More like an upstream feature
request. can you do delete cascade with kubectl? If yes, you can use -v9
with kubectl to see what APIs are called.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#162 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABIzFmxgcdpkEvrl00KyuN9KaoQbkcMrks5rrKfngaJpZM4MsaC8>
.
|
I'm having this same issue, and after further investigation have found out that the current (1.6.1) way of doing this is with the parameter It seems the python client doesn't support this ATM: When can we expect this feature to be implemented? |
Can you guys give 2.0.0a a try. I've updated python client. |
I've tried it, working fine for my application, at least the new options I needed in v1_delete_options.py are working fine. |
@vascofg ,Please I tried the function call below, but I was still unable to archive cascading deletion. Can you help me understand what I am not doing right?
|
Check this, there's a bug with background deletion of deployments:
kubernetes/kubernetes#44046
Use foreground for now.
…On Jun 12, 2017 14:44, "Konrad Djimeli" ***@***.***> wrote:
@vascofg <https://github.com/vascofg> ,Please I tried the function call
below, but I was still unable to archive cascading deletion. Can you help
me understand what I am not doing right?
extensions.delete_namespaced_deployment(name='nginx-deployment',
namespace='default', body=client.V1DeleteOptions(),grace_period_seconds =
56, propagation_policy = \"Background\")
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#162 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAmuScDkn6BsbX7l7J4oqTq6JS6i9mYUks5sDUDXgaJpZM4MsaC8>
.
|
@vascofg, I have also tried |
I think your error is when creating DeleteOptions, try passing parameters to the object constructor, mine looks like this:
Hope it helps |
I have tried |
Is the replicaset being deleted?
…On Jun 13, 2017 15:03, "Konrad Djimeli" ***@***.***> wrote:
I have tried extensions.delete_namespaced_deployment(name='nginx-deployment',
namespace='default', body=client.V1DeleteOptions(propagation_policy="Foreground",
grace_period_seconds=5)), but I am still getting the same result (pods
are not deleted). Thanks alot for the help.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#162 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAmuSXbhucUaGy9lM49AkgdgPtXwFVboks5sDpa0gaJpZM4MsaC8>
.
|
No, the replicaset is not deleted. |
What version of Kubernetes are you running? This feature is only supported
since 1.6.0
On Jun 13, 2017 17:38, "Konrad Djimeli" <[email protected]> wrote:
No, the replicaset not deleted.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#162 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAmuSQCCC11xFAW8cPxCf-2b-lYuYSELks5sDrsPgaJpZM4MsaC8>
.
|
@vascofg, Thanks very much, I just updated my version for Kubernetes and it now works fine. |
When calling
delete_namespaced_deployment
, even withorphaned_dependents
(which doesn't mean I think it means), only the deployment object itself gets removed. This means you've got the ReplicaSet and 1 or more Pods still running.Between garbage collection and ReplicaSet references to the Deployment that created it, there still doesn't seem to be a way to have a
delete
cascade properly.Kinda wondering how others are solving the problem and if maybe there needs to be more development in this area either here or upstream. Merely trying to provide a reliable removal function in my application...
The text was updated successfully, but these errors were encountered: