Skip to content

Commit

Permalink
Merge pull request #10 from gibizer/self-finalizer
Browse files Browse the repository at this point in the history
Document self finalizer usage
  • Loading branch information
stuggi authored Oct 21, 2022
2 parents bfa664d + c713430 commit 45151ce
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions developer.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,12 @@ immediately get called again with a version of the object which doesn't contain
the changes we just wrote. Worse, this is extremely likely to happen in
practise. Given that we're going to be called again anyway once we call update
we might as well exit after a single update call and wait.
## Self finalizer
There are two reasons to add a finalizer to a CR instance from its reconciler:

1. If the reconciler creates children CR instances with finalizers. See
[#2. in child objects](#Child-objects)

2. If the instance needs specific cleanup actions. For example running a `Job`
when the instance is being deleted. Note that deleting children CRs are
automatic if `OwnerReferece` is set no explict delete is needed there.

0 comments on commit 45151ce

Please sign in to comment.