Skip to content

Commit 268e3f0

Browse files
committed
refactor(hrq): Remove unused findHRQForMigration function from rqreconciler
1 parent 7d7f0f5 commit 268e3f0

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

internal/hrq/rqreconciler.go

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -369,33 +369,6 @@ func (r *ResourceQuotaReconciler) deleteLegacyScopedRQ(ctx context.Context, log
369369
return r.deleteRQ(ctx, log, legacyRQ)
370370
}
371371

372-
// // findHRQForMigration finds the HRQ that corresponds to the legacy RQ
373-
// func (r *ResourceQuotaReconciler) findHRQForMigration(ctx context.Context, log logr.Logger, namespace, hrqName string) (*api.HierarchicalResourceQuota, error) {
374-
// r.Forest.Lock()
375-
// ns := r.Forest.Get(namespace)
376-
// ancestryNames := ns.AncestryNames()
377-
// r.Forest.Unlock()
378-
379-
// for _, nsnm := range ancestryNames {
380-
// hrq := &api.HierarchicalResourceQuota{}
381-
// hrqKey := types.NamespacedName{Namespace: nsnm, Name: hrqName}
382-
// log.Info("Checking HRQ for migration", "hrqNamespace", nsnm, "hrqName", hrqName)
383-
384-
// err := r.Get(ctx, hrqKey, hrq)
385-
// if err == nil && hrq.Spec.ScopeSelector != nil {
386-
// // Found scoped HRQ
387-
// log.Info("Found HRQ for migration", "hrqNamespace", nsnm, "hrqName", hrqName)
388-
// return hrq, nil
389-
// }
390-
391-
// if err != nil && !apierrors.IsNotFound(err) {
392-
// return nil, fmt.Errorf("error checking HRQ %s/%s: %w", nsnm, hrqName, err)
393-
// }
394-
// }
395-
396-
// return nil, nil
397-
// }
398-
399372
// OnChangeNamespace enqueues the singleton in a specific namespace to trigger the reconciliation of
400373
// the singleton for a given reason . This occurs in a goroutine so the caller doesn't block; since
401374
// the reconciler is never garbage-collected, this is safe.

0 commit comments

Comments
 (0)