diff --git a/controllers/tenant/resourcequotas_quota.go b/controllers/tenant/resourcequotas_quota.go index 2f42b9142..180a0142f 100644 --- a/controllers/tenant/resourcequotas_quota.go +++ b/controllers/tenant/resourcequotas_quota.go @@ -110,7 +110,17 @@ func (r *Manager) syncCustomResourceQuotaUsages(ctx context.Context, tenant *cap usedMap[key] = 0 } - usedMap[key] += len(list.Items) + var used int + + for _, k := range list.Items { + if k.GetDeletionTimestamp() != nil { + continue + } + + used++ + } + + usedMap[key] += used } return