mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 22:46:12 +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 (
|
const (
|
||||||
// how long to wait for a resource quota update to occur
|
// how long to wait for a resource quota update to occur
|
||||||
resourceQuotaTimeout = 30 * time.Second
|
resourceQuotaTimeout = time.Minute
|
||||||
podName = "pfpod"
|
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
|
// updateResourceQuotaUntilUsageAppears updates the resource quota object until the usage is populated
|
||||||
// for the specific resource name.
|
// for the specific resource name.
|
||||||
func updateResourceQuotaUntilUsageAppears(c clientset.Interface, ns, quotaName string, resourceName v1.ResourceName) error {
|
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{})
|
resourceQuota, err := c.CoreV1().ResourceQuotas(ns).Get(context.TODO(), quotaName, metav1.GetOptions{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return false, err
|
return false, err
|
||||||
|
Loading…
Reference in New Issue
Block a user