Skip to content

Commit

Permalink
Merge pull request #197 from tanin47/patch-1
Browse files Browse the repository at this point in the history
Expand on the deletion in Reconcile()
  • Loading branch information
Phillip Wittrock committed Dec 15, 2017
2 parents 5e45c69 + 66b9640 commit 4ad7c1b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/concepts/api_building_overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -356,10 +356,12 @@ Reconcile logic may include:
- creating, updating or deleting other objects in the Kubernetes cluster (e.g. Kubernetes APIs such as Pod)
- creating, updating or deleting resources outside the Kubernetes cluster (e.g. cloud provider resources such as CloudSQL).

**Note:** there is no *deletion* hook defined. To define deletion logic, a [Finalizer](#Delete) must be set
on the Object during creation. This will cause a DeletionTimestamp to be set on the object when it is deleted,
**Note:** there is no *deletion* hook defined. To define deletion logic, a [Finalizer](#delete) must be set
on the Object during creation in `PrepareForCreate`. This will cause a DeletionTimestamp to be set on the object when it is deleted,
resulting in the Reconcile method being invoked.

In Reconcile() for deletion, the corresponding finalizer must be removed (and updated to the storage). Otherwise, the object will never be deleted.

### Using API extensions to manage resources external to the cluster

Controllers may also reconcile Kubernetes APIs with external resources, such as resources
Expand Down

0 comments on commit 4ad7c1b

Please sign in to comment.