Skip to content

feat: add controller to delete errored ACME challenges#98

Merged
scotwells merged 2 commits intomainfrom
fix/certificate-challenges-errored
Jan 26, 2026
Merged

feat: add controller to delete errored ACME challenges#98
scotwells merged 2 commits intomainfrom
fix/certificate-challenges-errored

Conversation

@scotwells
Copy link
Contributor

Add ChallengeReconciler to automatically delete cert-manager Challenge resources that enter an "errored" state for Gateway-related certificates. This triggers cert-manager to create a new challenge and retry the ACME verification process.

The controller:

  • Watches cert-manager Challenge resources
  • Deletes challenges in "errored" state for issuers in ClusterIssuerMap
  • Deletes challenges for namespace-scoped Issuers in per-gateway mode
  • Is enabled by default via DeleteErroredChallenges config option

Closes #94

Add ChallengeReconciler to automatically delete cert-manager Challenge
resources that enter an "errored" state for Gateway-related certificates.
This triggers cert-manager to create a new challenge and retry the ACME
verification process.

The controller:
- Watches cert-manager Challenge resources
- Deletes challenges in "errored" state for issuers in ClusterIssuerMap
- Deletes challenges for namespace-scoped Issuers in per-gateway mode
- Is enabled by default via DeleteErroredChallenges config option

Closes #94
ecv
ecv previously approved these changes Jan 26, 2026
zachsmith1
zachsmith1 previously approved these changes Jan 26, 2026
}

// Check if this challenge is for a Gateway-related issuer
if !r.isGatewayRelatedIssuer(challenge.Spec.IssuerRef) {
Copy link
Contributor

Choose a reason for hiding this comment

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

since this is only for gateway related issuers, does it make sense to watch and reconcile only those in setupwithmanager? that way if something is in the reconcile loop we know we should be operating on it. might save some non-relevant reconciles as well

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@zachsmith1 good call, added a predicate filter in 0f5510f.

Ensures that we only reconcile challenges if they are for one of the cluster
issuers used by the network services operator.
@scotwells scotwells dismissed stale reviews from zachsmith1 and ecv via 0f5510f January 26, 2026 19:22
@scotwells scotwells requested a review from zachsmith1 January 26, 2026 19:22
@scotwells scotwells merged commit 7976f57 into main Jan 26, 2026
10 checks passed
@scotwells scotwells deleted the fix/certificate-challenges-errored branch January 26, 2026 21:40
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.

Certificate not provisioned after challenge reached errored state

3 participants