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

Commit

Permalink
#47 use Background propagation policy (#54)
Browse files Browse the repository at this point in the history
* #47 use Background propagation policy

* update dependencies
  • Loading branch information
hjacobs committed Jan 31, 2020
1 parent 05414ed commit f4de06c
Show file tree
Hide file tree
Showing 3 changed files with 109 additions and 108 deletions.
3 changes: 2 additions & 1 deletion kube_janitor/janitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ def delete(resource, dry_run: bool):
try:
# force cascading delete also for older objects (e.g. extensions/v1beta1)
# see https://kubernetes.io/docs/concepts/workloads/controllers/garbage-collection/#setting-the-cascading-deletion-policy
resource.delete(propagation_policy="Foreground")
# use "Background" instead of "Foreground" to fix CRD deletion, see https://github.com/hjacobs/kube-janitor/issues/47
resource.delete(propagation_policy="Background")
except Exception as e:
logger.error(
f"Could not delete {resource.kind} {resource.namespace}/{resource.name}: {e}"
Expand Down
Loading

0 comments on commit f4de06c

Please sign in to comment.