Skip to content
This repository has been archived by the owner on Oct 3, 2020. It is now read-only.

Commit

Permalink
document propagation_policy
Browse files Browse the repository at this point in the history
  • Loading branch information
hjacobs committed Apr 14, 2019
1 parent d5737be commit 7ec5fa1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pykube/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,13 @@ def update(self):
self.api.raise_for_status(r)
self.set_obj(r.json())

def delete(self, propagation_policy=None):
def delete(self, propagation_policy: str = None):
'''
Delete the Kubernetes resource by calling the API.
The parameter propagation_policy defines whether to cascade the delete. It can be "Foreground", "Background" or "Orphan".
See https://kubernetes.io/docs/concepts/workloads/controllers/garbage-collection/#setting-the-cascading-deletion-policy
'''
if propagation_policy:
options = {"propagationPolicy": propagation_policy}
else:
Expand Down

0 comments on commit 7ec5fa1

Please sign in to comment.