Skip to content

refactor: adjust verification flow to support upcoming registration loop#64

Merged
zachsmith1 merged 1 commit into
feat/adjustRegistrationStatusfrom
feat/registrationstatuscontroller
Oct 8, 2025
Merged

refactor: adjust verification flow to support upcoming registration loop#64
zachsmith1 merged 1 commit into
feat/adjustRegistrationStatusfrom
feat/registrationstatuscontroller

Conversation

@zachsmith1

Copy link
Copy Markdown
Contributor

This pull request refactors the domain verification logic in internal/controller/domain_controller.go to improve code organization and isolation. The main change is the extraction of verification-related operations into a new helper method, which centralizes verification attempts and status updates. Additionally, the status update logic and requeue scheduling have been streamlined to avoid redundant reconciles and improve maintainability.

Refactoring and logic separation:

  • Moved domain verification logic out of the main Reconcile function into a new helper method reconcileVerification, which now handles verification attempts, status mutations, and computes the next verification time.
  • The main Reconcile function now checks if the domain status has changed and updates it if necessary, then requeues based on the next scheduled verification attempt returned by reconcileVerification.
  • The status update and requeue logic previously embedded in verification handling are now consolidated and simplified, reducing potential for repeated reconciles and improving code clarity.

Verification attempt handling:

  • Verification attempts for DNS and HTTP are now performed within a timed context, and the next verification attempt is scheduled based on backoff logic and verification results. Verification scaffolding is cleared when verification succeeds.

Minor cleanups:

  • Removed redundant status update and reconcile logic from the main function, and ensured that conditions are updated and committed back to the domain resource only once per reconcile.

@zachsmith1 zachsmith1 changed the title refactor: adjust verification logic to support upcoming registration loop refactor: adjust verification flow to support upcoming registration loop Oct 8, 2025
@zachsmith1
zachsmith1 merged commit d9fb39b into feat/adjustRegistrationStatus Oct 8, 2025
9 checks passed
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.

2 participants