Skip to content

Document the conservative ACME challenge scheduler key - #8781

Merged
cert-manager-prow[bot] merged 3 commits into
cert-manager:masterfrom
wallrj:wallrj/docs/acme-challenge-scheduler-key
Jun 15, 2026
Merged

cert-manager-prow[bot] merged 3 commits into
cert-manager:masterfrom
wallrj:wallrj/docs/acme-challenge-scheduler-key

Conversation

@wallrj

@wallrj wallrj commented May 12, 2026 •

Copy link
Copy Markdown
Member

What this PR does

Removes outdated TODO comments in the ACME challenge scheduler and replaces them with documentation explaining why the scheduling key is intentionally conservative.

Related to #8643.

The scheduler currently treats challenges with the same DNS name and challenge type as conflicting, regardless of solver backend. This PR documents the reasoning: different ingress classes, gateways, or DNS providers do not reliably imply independent ACME-visible validation paths.

Related website documentation update: cert-manager/website#2097.

Why

After revisiting the original TODOs, we concluded that the scheduler key should reflect the externally observable validation target, not cert-manager's internal solver configuration:

  • HTTP01 validation is against the same hostname
  • DNS01 validation is against the same _acme-challenge name

Keeping the key coarse avoids making topology-specific assumptions that are not generally valid.

Release note

NONE

@cert-manager-prow cert-manager-prow Bot added release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: no Indicates that at least one commit in this pull request is missing the DCO sign-off message. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. area/acme Indicates a PR directly modifies the ACME Issuer code labels May 12, 2026
@wallrj
wallrj force-pushed the wallrj/docs/acme-challenge-scheduler-key branch from 55737fc to 9d7b4ba Compare May 12, 2026 15:20
@cert-manager-prow cert-manager-prow Bot added dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. and removed dco-signoff: no Indicates that at least one commit in this pull request is missing the DCO sign-off message. labels May 12, 2026
limitations under the License.
*/

// Package scheduler selects which ACME Challenge resources may be marked

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have added package-level documentation here to make the design reasoning easier to find for future maintainers. In particular, this file explains why the scheduler is intentionally conservative about same-name challenges, and why concerns such as multi-tenant isolation and ownership policy are better addressed through admission, approval, policy, or deployment boundaries rather than through scheduler heuristics alone.

@lunarwhite lunarwhite left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

It looks really crystal clear to me. Thanks for taking the time to write this up.

@cert-manager-prow cert-manager-prow Bot added the lgtm Indicates that a PR is ready to be merged. label Jun 15, 2026
@erikgb
erikgb requested a review from Copilot June 15, 2026 17:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes outdated TODO comments in the ACME challenge scheduler and replaces them with explicit documentation explaining why the scheduler’s conflict key intentionally remains conservative (keyed only by DNS name + ACME challenge type), reflecting the externally observable ACME validation target rather than internal solver backend configuration.

Changes:

  • Replaces outdated TODOs in compareChallenges with rationale for a coarse conflict key (DNS name + challenge type).
  • Updates inline scheduler comments to consistently describe “DNS name and type” rather than “domain and solver type”.
  • Adds package-level documentation (doc.go) describing scheduler scope/limitations and the conservative conflict-key rationale.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
pkg/controller/acmechallenges/scheduler/scheduler.go Replaces TODOs and updates comments to document the intentionally conservative scheduling key semantics.
pkg/controller/acmechallenges/scheduler/doc.go Adds package documentation describing scheduler responsibilities and why conflict detection ignores solver backend differences.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@erikgb erikgb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

Thanks, Richard! I see no reason to delay merging this!

@cert-manager-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: erikgb, lunarwhite

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@cert-manager-prow cert-manager-prow Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 15, 2026
@erikgb

erikgb commented Jun 15, 2026

Copy link
Copy Markdown
Member

/test pull-cert-manager-master-e2e-v1-36

@erikgb

erikgb commented Jun 15, 2026

Copy link
Copy Markdown
Member

/kind documentation

@cert-manager-prow cert-manager-prow Bot added kind/documentation Categorizes issue or PR as related to documentation. and removed needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels Jun 15, 2026
@cert-manager-prow
cert-manager-prow Bot merged commit f52ac2a into cert-manager:master Jun 15, 2026
@wallrj
wallrj deleted the wallrj/docs/acme-challenge-scheduler-key branch June 16, 2026 05:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/acme Indicates a PR directly modifies the ACME Issuer code dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. kind/documentation Categorizes issue or PR as related to documentation. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants