From 427e90f093fb64a194b00d030a50c88c60fe3942 Mon Sep 17 00:00:00 2001 From: Kevin Date: Mon, 28 Aug 2023 18:11:39 -0400 Subject: [PATCH] noticed that this exact check is done above on L264 Signed-off-by: Kevin --- pkg/quotaplugins/quota-simple-rest/quota_rest_manager.go | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/pkg/quotaplugins/quota-simple-rest/quota_rest_manager.go b/pkg/quotaplugins/quota-simple-rest/quota_rest_manager.go index 13ccab71e..e201ccfd7 100644 --- a/pkg/quotaplugins/quota-simple-rest/quota_rest_manager.go +++ b/pkg/quotaplugins/quota-simple-rest/quota_rest_manager.go @@ -261,7 +261,9 @@ func (qm *QuotaManager) Fits(aw *arbv1.AppWrapper, awResDemands *clusterstateapi proposedPreemptions []*arbv1.AppWrapper) (bool, []*arbv1.AppWrapper, string) { // Handle uninitialized quota manager - if len(qm.url) <= 0 { + // If a url does not exists then assume fits quota + if len(qm.url) == 0 { + klog.V(4).Infof("[Fits] No quota manager exists, %#v meets quota by default.", awResDemands) return true, proposedPreemptions, "" } awId := createId(aw.Namespace, aw.Name) @@ -287,11 +289,6 @@ func (qm *QuotaManager) Fits(aw *arbv1.AppWrapper, awResDemands *clusterstateapi } doesFit := false - // If a url does not exists then assume fits quota - if len(qm.url) < 1 { - klog.V(4).Infof("[Fits] No quota manager exists, %#v meets quota by default.", awResDemands) - return doesFit, nil, "" - } uri := qm.url + "/quota/alloc" buf := new(bytes.Buffer)