quota: add an update filter

Fix a TODO to plumb an update filter from above in the resource quota
monitor code that was handling update events for quota-able objects,
instead of hard-coding the logic in the resource quota monitor.

Signed-off-by: Andy Goldstein <andy.goldstein@redhat.com>
This commit is contained in:
Andy Goldstein
2022-07-08 18:16:27 -04:00
parent eba254b4ee
commit a899441484
4 changed files with 56 additions and 21 deletions

View File

@@ -426,6 +426,7 @@ func startResourceQuotaController(ctx context.Context, controllerContext Control
IgnoredResourcesFunc: quotaConfiguration.IgnoredResources,
InformersStarted: controllerContext.InformersStarted,
Registry: generic.NewRegistry(quotaConfiguration.Evaluators()),
UpdateFilter: quotainstall.DefaultUpdateFilter(),
}
if resourceQuotaControllerClient.CoreV1().RESTClient().GetRateLimiter() != nil {
if err := ratelimiter.RegisterMetricAndTrackRateLimiterUsage("resource_quota_controller", resourceQuotaControllerClient.CoreV1().RESTClient().GetRateLimiter()); err != nil {