Skip to content

Commit

Permalink
DNS: Stop working if the DNSRecord has an error
Browse files Browse the repository at this point in the history
  • Loading branch information
pier-oliviert committed Aug 19, 2024
1 parent 81a3d5c commit cb50519
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/controller/dnsrecord_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ func (r *DNSRecordReconciler) Reconcile(ctx context.Context, req ctrl.Request) (
return ctrl.Result{}, fmt.Errorf("E#5001: Couldn't retrieve the DNSRecord (%s) -- %w", req.NamespacedName, err)
}

if record.CurrentPhase() == dnsrecords.PhaseError {
return ctrl.Result{}, nil
}

if record.CurrentPhase() == dnsrecords.PhaseInitializing {
err := r.createRecord(ctx, &record)
if err != nil {
Expand Down

0 comments on commit cb50519

Please sign in to comment.