Skip to content

Commit ae8ae90

Browse files
Merge pull request #501 from stuggi/fix_ceilo_reconcile_delete
Fix running reconcileDelete on new instance
2 parents 0fd60c8 + fa9c222 commit ae8ae90

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

controllers/ceilometer_controller.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,12 @@ func (r *CeilometerReconciler) Reconcile(ctx context.Context, req ctrl.Request)
203203
}
204204

205205
// If we're not deleting this and the service object doesn't have our finalizer, add it.
206-
if !instance.DeletionTimestamp.IsZero() && controllerutil.AddFinalizer(instance, helper.GetFinalizer()) || isNewInstance {
206+
if instance.DeletionTimestamp.IsZero() && controllerutil.AddFinalizer(instance, helper.GetFinalizer()) || isNewInstance {
207+
return ctrl.Result{}, nil
208+
}
209+
210+
// Handle service delete
211+
if !instance.DeletionTimestamp.IsZero() {
207212
return r.reconcileDelete(ctx, instance, helper)
208213
}
209214

0 commit comments

Comments
 (0)