Repository navigation
finalizer,metaapply: manage finalizers with server-side apply - #95
Merged
Merged
Conversation
ecordell
force-pushed
the
evan/finalizer-apply
branch
2 times, most recently
from
November 9, 2026 13:59
8b01524 to
cca0eb0
Compare
ecordell
marked this pull request as ready for review
November 9, 2026 14:01
ecordell
enabled auto-merge
November 9, 2026 14:23
vroldanbet
reviewed
Nov 9, 2026
ecordell
force-pushed
the
evan/finalizer-apply
branch
from
November 9, 2026 15:20
cca0eb0 to
7b36cfe
Compare
vroldanbet
previously approved these changes
Nov 9, 2026
metaapply applies metadata to an existing object. Each apply includes the uid, so it cannot create an object. Each Applier has its own field manager. finalizer.Finalizer uses metaapply to add and remove one finalizer. An apply cannot remove a finalizer that a different manager also owns. In this case, Remove uses a JSON patch. SetFinalizerHandler uses ApplyFinalizer if it is set. Its AddFinalizer field, GetAddFunc, and GetRemoveFunc are deprecated.
ecordell
force-pushed
the
evan/finalizer-apply
branch
from
November 9, 2026 15:22
7b36cfe to
26b242f
Compare
vroldanbet
approved these changes
Nov 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
metaapplyapplies metadata to an existing object. Each apply includes the uid, so it cannot create an object or change a replacement object. It returnsErrOwnsNonMetadataif its field manager owns fields outside metadata.finalizer.Finalizerusesmetaapplyto add and remove one finalizer. Its field manager isfinalizer:<name>.Finalizer.Removeapplies first. An apply cannot remove a finalizer that a different manager also owns. In this case,Removeuses a JSON patch that tests the uid and the entry.GetAddFuncfinalizers go through this path.SetFinalizerHandlerusesApplyFinalizerif it is set. ItsAddFinalizerfield,GetAddFunc, andGetRemoveFuncare deprecated.