Repository navigation
Report ownership conflicts during SSA - #1377
Merged
Merged
Conversation
Reuse the live object already fetched by the apply paths to report ownership conflicts through an optional callback. Controllers can emit a warning before the first write without adding another API lookup. Cover both apply paths, matching owners, skipped objects and creation. Signed-off-by: MyungJoo Song <173995233+DDINGJOO@users.noreply.github.com> Assisted-by: Codex/GPT-6
matheuscscp
reviewed
Nov 11, 2026
matheuscscp
left a comment
Member
There was a problem hiding this comment.
LGTM overall!
Just one blocker 🙏
matheuscscp
force-pushed
the
report-ownership-conflicts
branch
from
November 12, 2026 07:28
ee79a0d to
a36eace
Compare
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
kustomize-controller needs to identify the previous owner of a resource before applying it. A separate lookup adds an API request per resource even though SSA already reads the live object.
Add an optional
OnOwnershipConflictcallback toApplyOptions.ApplyandApplyAllcall it after the skip checks when both objects have complete, different owner label pairs. It receives the resource subject and previous owner so callers can emit their own warning.This supports kustomize-controller #1807 and #1724. Tests cover conflict reporting, same-owner resources, skipped resources, and creation through both apply paths. The controller regression checks that the warning precedes the first PATCH and that the number of GETs drops from two to one.
Validation:
make test-ssa GO_TEST_ARGS='-race -count=1'passes for all five SSA packages.AI assistance used Codex (GPT-6).