This repository was archived by the owner on Mar 16, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -44,18 +44,15 @@ func WaitForAllocation(req router.Request, resp router.Response) error {
4444 }
4545
4646 /*
47- Determine how to proceed depending on if the quotaRequest exists and what it has written to its status. The four scenarios
48- are QuotaRequest:
47+ Determine how to proceed depending on if the quotaRequest exists and what it has written to its status. The three scenarios
48+ are the QuotaRequest:
4949
50- 1. Exists and has set FailedResources implying that the quota allocation failed.
51- 2. Exists and had an error while trying to allocate quota.
52- 3. Does not exist or has not yet been allocated the resources requested.
53- 4. Exists and has successfully allocated the resources requested.
50+ 1. Exists and had an error while trying to allocate quota.
51+ 2. Does not exist or has not yet been allocated the resources requested.
52+ 3. Exists and has successfully allocated the resources requested.
5453 */
55- if quotaRequest .Status .FailedResources != nil {
56- status .Error (fmt .Errorf ("failed to provision the following resources: %v" , quotaRequest .Status .FailedResources .ToString ()))
57- } else if cond := quotaRequest .Status .Condition (adminv1 .QuotaRequestCondition ); cond .Error {
58- status .Error (fmt .Errorf ("error occurred while trying to allocate quota: %v" , cond .Message ))
54+ if cond := quotaRequest .Status .Condition (adminv1 .QuotaRequestCondition ); cond .Error {
55+ status .Error (fmt .Errorf ("quota allocation failed: %v" , cond .Message ))
5956 } else if err != nil || ! quotaRequest .Spec .Resources .Equals (quotaRequest .Status .AllocatedResources ) {
6057 status .Unknown ("waiting for quota allocation" )
6158 } else if quotaRequest .Status .Condition (adminv1 .QuotaRequestCondition ).Success {
You can’t perform that action at this time.
0 commit comments