Skip to content

noticed that this exact check is done above on L264 #615

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
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