@@ -23,6 +23,7 @@ import (
2323 "fmt"
2424 "sort"
2525 "strings"
26+ "time"
2627
2728 "github.com/adyanth/cloudflare-operator/internal/clients/cf"
2829
@@ -156,7 +157,11 @@ func (r *TunnelBindingReconciler) Reconcile(ctx context.Context, req ctrl.Reques
156157 // TunnelBinding object not found, could have been deleted after reconcile request.
157158 // Owned objects are automatically garbage collected. For additional cleanup logic use finalizers.
158159 // Return and don't requeue
159- r .log .Info ("TunnelBinding deleted, nothing to do" )
160+ r .log .Info ("TunnelBinding deleted, updating config" )
161+ if err = r .configureCloudflareDaemon (); err != nil {
162+ r .log .Error (err , "unable to update config" )
163+ return ctrl.Result {}, err
164+ }
160165 return ctrl.Result {}, nil
161166 }
162167 r .log .Error (err , "unable to fetch TunnelBinding" )
@@ -170,7 +175,8 @@ func (r *TunnelBindingReconciler) Reconcile(ctx context.Context, req ctrl.Reques
170175
171176 // Check if TunnelBinding is marked for deletion
172177 if r .binding .GetDeletionTimestamp () != nil {
173- return ctrl.Result {}, r .deletionLogic ()
178+ // Requeue to update configmap above
179+ return ctrl.Result {RequeueAfter : time .Second }, r .deletionLogic ()
174180 }
175181
176182 if err := r .setStatus (); err != nil {
0 commit comments