mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 10:51:29 +00:00
commit
8a4bf39884
@ -43,7 +43,7 @@ import (
|
|||||||
// Evaluator is used to see if quota constraints are satisfied.
|
// Evaluator is used to see if quota constraints are satisfied.
|
||||||
type Evaluator interface {
|
type Evaluator interface {
|
||||||
// Evaluate takes an operation and checks to see if quota constraints are satisfied. It returns an error if they are not.
|
// Evaluate takes an operation and checks to see if quota constraints are satisfied. It returns an error if they are not.
|
||||||
// The default implementation process related operations in chunks when possible.
|
// The default implementation processes related operations in chunks when possible.
|
||||||
Evaluate(a admission.Attributes) error
|
Evaluate(a admission.Attributes) error
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -618,7 +618,7 @@ func (e *quotaEvaluator) Evaluate(a admission.Attributes) error {
|
|||||||
select {
|
select {
|
||||||
case <-waiter.finished:
|
case <-waiter.finished:
|
||||||
case <-time.After(10 * time.Second):
|
case <-time.After(10 * time.Second):
|
||||||
return apierrors.NewInternalError(fmt.Errorf("resource quota evaluates timeout"))
|
return apierrors.NewInternalError(fmt.Errorf("resource quota evaluation timed out"))
|
||||||
}
|
}
|
||||||
|
|
||||||
return waiter.result
|
return waiter.result
|
||||||
|
Loading…
Reference in New Issue
Block a user