Skip to content

fix: Don't report a non-entitled wildcard as Pending - #852

Merged
scotwells merged 2 commits into
mainfrom
fix/wildcard-not-entitled-not-pending
Nov 3, 2026
Merged

scotwells merged 2 commits into
mainfrom
fix/wildcard-not-entitled-not-pending

Conversation

@scotwells

Copy link
Copy Markdown
Contributor

Requested by Scot Schuchert-Wells

When the only listener a gateway drops is a wildcard hostname the project is not entitled to, the gateway (and its HTTPProxy) reported Programmed=False with reason Pending. Pending means a certificate is still being issued and will clear on its own, but this case never clears, so the proxy stays Pending indefinitely and looks like a stuck platform reconcile in the HTTPProxy programming metrics.

It now reports ListenersNotValid, matching the listener's own status. A listener waiting on a certificate that is actually being issued still reports Pending.

Adds a case to the gateway status test that fails before the change.

Related: datum-cloud/enhancements#921

A gateway whose only dropped listener is a wildcard hostname the project
is not entitled to reported Programmed=False with reason Pending, which
means the certificate is still being issued and will clear on its own.
It never does, so the HTTPProxy stayed Pending indefinitely and kept
HTTPProxyStuckUnreconciled firing as if the platform were stuck.

Report ListenersNotValid instead, matching the listener's own status.
@scotwells scotwells self-assigned this Nov 3, 2026
@scotwells
scotwells requested review from ecv and kevwilliams November 3, 2026 19:00
The entitlement block is only recorded on the listener's certificate
status by the certificate service, so the summary taken before it still
saw a listener waiting on issuance. Add a reconcile-level test.
@scotwells
scotwells marked this pull request as ready for review November 3, 2026 19:28
@scotwells
scotwells requested a review from a team as a code owner November 3, 2026 19:28

@ecv ecv 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.

Approve.

A gateway whose only dropped listener is a wildcard the project is not entitled to now reports Programmed=False with ListenersNotValid instead of Pending, so the proxy no longer looks like a certificate that will clear on its own.

  • summarizeDroppedListeners moves after the certificate-service step, so the issuanceReason that step records in listenerCertHealth is visible when the drop is summarized. A listener blocked with certificateServiceReasonWildcardNotEntitled no longer counts as "certificate withheld", so allCertWithheld stays false and the reason is not Pending.
  • A certificate that is merely still issuing keeps Pending; the existing table cases for that path are unchanged and pass.
  • Both new tests pin the user-visible outcome: the status table case, and an end-to-end reconcile in TestWildcardNotEntitledIsNotReportedPending that sets the downstream Programmed and still expects ListenersNotValid upstream.

Follow-ups:

  • A gateway that drops one non-entitled wildcard and one listener still waiting on its certificate now reports ListenersNotValid, which hides the one that will clear. Fine as a default, but the condition message should name both.

@kevwilliams kevwilliams 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.

Verified moving the dropped-listener summary after the certificate service is what lets the not-entitled reason be seen, and the new tests cover both the status reason and the reconcile path.

@scotwells
scotwells merged commit 43ccf6e into main Nov 3, 2026
11 checks passed
@scotwells
scotwells deleted the fix/wildcard-not-entitled-not-pending branch November 3, 2026 19:50
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.

3 participants