Skip to content

Commit 1d549c0

Browse files
committed
docs: delineate cert health-gating from re-issuance
Record the boundary between the two cert-failure paths in the gateway controller, per the decision in #260: keep them separate rather than unified behind a single failure detector. Add a short comment at each call site stating the split and why: - Health-gating (evaluateListenerCertHealth) is read-only and gates on any unusable cert. - Fast-track re-issuance (reissueFailedCertificate) mutates and fires only on cert-manager hard-fail (LastFailureTime); expired or missing certs recover via renewal or the isNew path instead. No behavior change; comments only.
1 parent 4a1da1e commit 1d549c0

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

internal/controller/gateway_controller.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,11 @@ func (r *GatewayReconciler) ensureDownstreamGateway(
276276

277277
// Evaluate certificate health once so the listener we propagate and the
278278
// status we report to the user can never disagree.
279+
//
280+
// Deliberately separate from fast-track re-issuance (see
281+
// reissueFailedCertificate): this path is read-only and gates on any
282+
// unusable cert, re-issuance mutates and fires only on cert-manager
283+
// hard-fail (LastFailureTime). See #260.
279284
listenerCertHealth := r.evaluateListenerCertHealth(
280285
ctx,
281286
downstreamClient,
@@ -941,6 +946,11 @@ func (r *GatewayReconciler) ensureListenerCertificates(
941946

942947
// Check if an existing Certificate is stuck in a failed state and
943948
// should be deleted so we can recreate it fresh on the next reconcile.
949+
//
950+
// Deliberately separate from health-gating (see
951+
// evaluateListenerCertHealth): this triggers only on cert-manager
952+
// hard-fail (LastFailureTime), not on every unhealthy cert, since
953+
// expired/missing certs recover via renewal or the isNew path. See #260.
944954
if !isNew {
945955
requeueAfter, gwChanged := r.reissueFailedCertificate(ctx, cert, certName, downstreamGateway, downstreamClient)
946956
if gwChanged {

0 commit comments

Comments
 (0)