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
Add quotas to density and load tests #59917
Conversation
test/e2e/scalability/load.go
Outdated
if err := wait.PollImmediate(2*time.Second, 30*time.Second, func() (bool, error) { | ||
var err error | ||
quotaTemplate.Name = ns.Name + "-quota" | ||
got, err = f.ClientSet.CoreV1().ResourceQuotas(ns.Name).Create(quotaTemplate) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_, err
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you need to capture the resourcequota?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right. I don't need it anymore.
test/e2e/scalability/load.go
Outdated
quotaTemplate.Name = ns.Name + "-quota" | ||
got, err = f.ClientSet.CoreV1().ResourceQuotas(ns.Name).Create(quotaTemplate) | ||
if err != nil { | ||
framework.Logf("Unexpected error while creating resource quota: %v", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you shouldn't be retrying failures unconditionally for the CREATE request. There are some non-retriable errors (i.e AlreadyExists).
Some earlier discussion about this -
#55860 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a check for AlreadyExists.
test/e2e/scalability/load.go
Outdated
for _, ns := range namespaces { | ||
var got *v1.ResourceQuota | ||
if err := wait.PollImmediate(2*time.Second, 30*time.Second, func() (bool, error) { | ||
var err error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess you don't need to define here. You can just directly define it inside the 'if' command.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
I've left some comments. LGTM overall. |
test/e2e/scalability/load.go
Outdated
} | ||
return true, nil | ||
}); err != nil { | ||
return err |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fmt.Errorf("Failed to create quota: %v", err)
?
Otherwise sth less informative like "timed out waiting for condition" will show up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
/test pull-kubernetes-kubemark-e2e-gce-big Let's try (we now have higher quota, so we should be able to run it). |
/lgtm Thanks for change. Feel free to cancel the hold once the kubemark-500 presubmit passes. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: gmarek, shyamjvs The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/test all [submit-queue is verifying that this PR is safe to merge] |
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here. |
@kubernetes/sig-scalability-misc