mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Merge pull request #98906 from pacoxu/deflake/resource-quota
deflake a resource quota check for best-effort pods
This commit is contained in:
commit
25f9b6b1d0
@ -43,7 +43,7 @@ import (
|
||||
|
||||
const (
|
||||
// how long to wait for a resource quota update to occur
|
||||
resourceQuotaTimeout = 30 * time.Second
|
||||
resourceQuotaTimeout = time.Minute
|
||||
podName = "pfpod"
|
||||
)
|
||||
|
||||
@ -1830,7 +1830,7 @@ func waitForResourceQuota(c clientset.Interface, ns, quotaName string, used v1.R
|
||||
// updateResourceQuotaUntilUsageAppears updates the resource quota object until the usage is populated
|
||||
// for the specific resource name.
|
||||
func updateResourceQuotaUntilUsageAppears(c clientset.Interface, ns, quotaName string, resourceName v1.ResourceName) error {
|
||||
return wait.Poll(framework.Poll, 1*time.Minute, func() (bool, error) {
|
||||
return wait.Poll(framework.Poll, resourceQuotaTimeout, func() (bool, error) {
|
||||
resourceQuota, err := c.CoreV1().ResourceQuotas(ns).Get(context.TODO(), quotaName, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
return false, err
|
||||
|
Loading…
Reference in New Issue
Block a user