Skip to content

Commit

Permalink
fix: Retry on dangling CNAME records
Browse files Browse the repository at this point in the history
  • Loading branch information
jonstacks committed May 29, 2024
1 parent aed3030 commit 87a7333
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions internal/controller/ingress/domain_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,16 @@ func (r *DomainReconciler) SetupWithManager(mgr ctrl.Manager) error {
update: r.update,
delete: r.delete,
errResult: func(op baseControllerOp, cr *ingressv1alpha1.Domain, err error) (reconcile.Result, error) {
// Domain still attached to an edge, probably a race condition.
// Schedule for retry, and hopefully the edge will be gone
// eventually.
if ngrok.IsErrorCode(err, 446) {
retryableErrors := []int{
// Domain still attached to an edge, probably a race condition.
// Schedule for retry, and hopefully the edge will be gone
// eventually.
446,
// Domain has a dangling CNAME record. Other controllers or operators, such as external-dns, might
// be managing the DNS records for the domain and in the process of deleting the CNAME record.
511,
}
if ngrok.IsErrorCode(err, retryableErrors...) {
return ctrl.Result{}, err
}
return reconcileResultFromError(err)
Expand Down

0 comments on commit 87a7333

Please sign in to comment.