Skip to content

controller: flush status once per Reconcile pass#71

Open
tamalsaha wants to merge 1 commit into
masterfrom
refactor/collapse-status-patches
Open

controller: flush status once per Reconcile pass#71
tamalsaha wants to merge 1 commit into
masterfrom
refactor/collapse-status-patches

Conversation

@tamalsaha

Copy link
Copy Markdown
Contributor

Summary

A happy-path reconcile used to issue 4-5 PatchStatus calls — one per intermediate condition, one for DNSRecords, one for the terminal phase. Each was a separate GET+PATCH and a separate UPDATE event on watchers.

Replace `updateEdnsStatus` / `patchDNSRecords` with a `statusUpdate` accumulator that records conditions, phase, and DNSRecords as the reconciler progresses, plus one `patchStatus` call that flushes everything on exit. SetCondition is still per-condition inside the patch closure, so the final server-side condition list is identical.

Test plan

  • `go build ./...`
  • Reconcile an ExternalDNS and confirm a single PATCH per pass in the API server audit log
  • Confirm the resulting Status.Conditions / Phase / DNSRecords match prior behavior

A single happy-path reconcile used to issue 4-5 PatchStatus calls (one
per intermediate condition, one for DNSRecords, one for the terminal
phase). Each call was a separate GET+PATCH and a separate UPDATE event
on watchers.

Replace updateEdnsStatus / patchDNSRecords with a statusUpdate
accumulator that records conditions, phase, and DNSRecords as the
reconciler progresses, and one patchStatus call that flushes everything
on exit. SetCondition is still per-condition inside the patch closure,
so the final on-server condition list is identical to the previous
behavior.

Signed-off-by: Tamal Saha <tamal@appscode.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant