Migrate operator handle*Config status writes to MutateAndPatchStatus
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 2.2k
- Forks
- 300
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 184
Description
Background
.claude/rules/operator.md ("Status Writes") requires controllerutil.MutateAndPatchStatus rather than r.Status().Update, because a full-replace Update can clobber the entire Status.Conditions array under concurrent reconciles (JSON merge-patch replaces the array wholesale).
The entire handle*Config family in both mcpserver_controller.go and mcpremoteproxy_controller.go (OIDC, telemetry, external-auth, authServerRef, authz, webhook, …) predates the helper and still calls r.Status().Update. The newly added MCPAuthzConfig watch makes concurrent config reconciles a bit more likely, which raised the question.
Raised by @jhrozek in review of #5564 (and noted on #5563). The agreed plan was to migrate the whole family in one focused sweep rather than piecemeal — piecemeal migration risks the very array-clobber the rule warns about.
Scope
- Migrate all
handle*Configstatus writes in both controllers tocontrollerutil.MutateAndPatchStatus. - Verify each call site holds a freshly-
Getted object and is the sole owner of the conditions array (per the rule's checklist). - One PR, atomic.
Tracked as a follow-up to #5564.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with .claude/rules/operator.md and inspect mcpserver_controller.go and mcpremoteproxy_controller.go for every handle*Config status write. Verify each call site against the rule's fresh-Get and conditions-ownership checklist, then confirm all such writes use MutateAndPatchStatus and the migration is covered in one atomic PR.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- infrastructure
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 58/100