Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finalizers #207

Merged
merged 3 commits into from May 6, 2022
Merged

Finalizers #207

merged 3 commits into from May 6, 2022

Commits on Apr 21, 2022

  1. Finalizers

    Finalizers allow a reconciler to clean up state for a resource that has
    been deleted by a client, and not yet fully removed. Resources with
    finalizers will stay in this terminating state until all finalizers are
    cleared from the resource.
    
    ParentReconcilers will now reconcile resources that are terminating as
    long as they also have a pending finalizer.
    
    SyncReconcilers have a new, optional, Finalize method that is called
    when the resource is terminating. The Sync method will not be called
    unless SyncDuringFinalization is true. Users are responsible to add and
    clear finalizers from resources.
    
    The AddParentFinalizer and ClearParentFinalizer functions will patch the
    resource. These method work with cast parents objects and use the same
    client the ParentReconciler used to originally load the parent resource,
    so they can be called inside SubReconcilers that use a different client.
    
    ChildReconcilers have a Finalizer field that when set will ensure that
    value is set on the parent resource finalizers before creating/updating
    a child resource. It will also clear that finalizer after the child is
    deleted. When the parent is terminating, the DesiredChild method is not
    called and existing children are deleted.
    
    Signed-off-by: Scott Andrews <andrewssc@vmware.com>
    scothis committed Apr 21, 2022
    Copy the full SHA
    a6cf8bf View commit details
    Browse the repository at this point in the history

Commits on May 3, 2022

  1. review feedback

    Signed-off-by: Scott Andrews <andrewssc@vmware.com>
    scothis committed May 3, 2022
    Copy the full SHA
    ed8b202 View commit details
    Browse the repository at this point in the history

Commits on May 6, 2022

  1. Update reconcilers/reconcilers.go

    Co-authored-by: Max Brauer <mamachanko@users.noreply.github.com>
    scothis and mamachanko committed May 6, 2022
    Copy the full SHA
    7f2cfff View commit details
    Browse the repository at this point in the history