Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions pkg/quotaplugins/quota-simple-rest/quota_rest_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down