Skip to content

Commit 3c6269b

Browse files
committed
noticed that this exact check is done above on L264
Signed-off-by: Kevin <[email protected]>
1 parent 59bab13 commit 3c6269b

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

pkg/quotaplugins/quota-simple-rest/quota_rest_manager.go

+2-5
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,9 @@ func (qm *QuotaManager) Fits(aw *arbv1.AppWrapper, awResDemands *clusterstateapi
261261
proposedPreemptions []*arbv1.AppWrapper) (bool, []*arbv1.AppWrapper, string) {
262262

263263
// Handle uninitialized quota manager
264+
// If a url does not exists then assume fits quota
264265
if len(qm.url) <= 0 {
266+
klog.V(4).Infof("[Fits] No quota manager exists, %#v meets quota by default.", awResDemands)
265267
return true, proposedPreemptions, ""
266268
}
267269
awId := createId(aw.Namespace, aw.Name)
@@ -287,11 +289,6 @@ func (qm *QuotaManager) Fits(aw *arbv1.AppWrapper, awResDemands *clusterstateapi
287289
}
288290

289291
doesFit := false
290-
// If a url does not exists then assume fits quota
291-
if len(qm.url) < 1 {
292-
klog.V(4).Infof("[Fits] No quota manager exists, %#v meets quota by default.", awResDemands)
293-
return doesFit, nil, ""
294-
}
295292

296293
uri := qm.url + "/quota/alloc"
297294
buf := new(bytes.Buffer)

0 commit comments

Comments
 (0)