Skip to content

Commit 089a447

Browse files
committed
fix
1 parent ce5943a commit 089a447

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

internal/controller/rules2s_controller.go

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -369,26 +369,6 @@ func (r *RuleS2SReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ct
369369
logger.Error(err, "Failed to delete some related IEAgAgRules")
370370
}
371371

372-
// Удаляем финализатор перед удалением ресурса
373-
if controllerutil.ContainsFinalizer(ruleS2S, "netguard.sgroups.io/finalizer") {
374-
logger.Info("Removing finalizer from inactive RuleS2S", "name", ruleS2S.Name)
375-
if err := RemoveFinalizer(ctx, r.Client, ruleS2S, "netguard.sgroups.io/finalizer"); err != nil {
376-
if !errors.IsNotFound(err) {
377-
logger.Error(err, "Failed to remove finalizer from RuleS2S")
378-
return ctrl.Result{}, err
379-
}
380-
}
381-
}
382-
383-
// Удаляем само правило RuleS2S
384-
logger.Info("Auto-deleting inactive RuleS2S", "name", ruleS2S.Name, "namespace", ruleS2S.Namespace)
385-
if err := SafeDeleteAndWait(ctx, r.Client, ruleS2S, 30*time.Second); err != nil {
386-
if !errors.IsNotFound(err) {
387-
logger.Error(err, "Failed to auto-delete inactive RuleS2S", "name", ruleS2S.Name)
388-
return ctrl.Result{}, err
389-
}
390-
}
391-
392372
// Возвращаем пустой Result без RequeueAfter
393373
return ctrl.Result{}, nil
394374
}

0 commit comments

Comments
 (0)