Merge pull request #6796 from markmandel/finalizer

Expand on Finalizer explanation.
This commit is contained in:
Joseph Heck
2018-01-07 13:25:01 -08:00
committed by GitHub
@@ -192,12 +192,22 @@ metadata:
- finalizer.stable.example.com - finalizer.stable.example.com
``` ```
The first delete request on an object with finalizers merely sets a value for the Finalizers are arbitrary string values, that when present ensure that a hard delete
`metadata.deletionTimestamp` field instead of deleting it. of a resource is not possible while they exist.
This triggers controllers watching the object to execute any finalizers they handle.
Each controller then removes its finalizer from the list and issues the delete request again. The first delete request on an object with finalizers merely sets a value for the
This request only deletes the object if the list of finalizers is now empty, `metadata.deletionTimestamp` field instead of deleting it. Once this value is set,
entries in the `finalizer` list can only be removed.
This triggers controllers watching the object to execute any finalizers they handle.
This will be represented via polling update requests for that
object, until all finalizers have been removed and the resource is deleted.
The time period of polling update can be controlled by `metadata.deletionGracePeriodSeconds`.
It is the responsibility of each controller to removes its finalizer from the list.
Kubernetes will only finally delete the object if the list of finalizers is empty,
meaning all finalizers are done. meaning all finalizers are done.
### Validation ### Validation