Skip to content

Commit

Permalink
fix(quota-resources): skipping from count delete-marked objects
Browse files Browse the repository at this point in the history
Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
  • Loading branch information
prometherion committed Nov 20, 2023
1 parent 3b0b6cf commit c0e48d1
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion controllers/tenant/resourcequotas_quota.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c0e48d1

Please sign in to comment.