File tree Expand file tree Collapse file tree
components/renku_data_services/crc Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -303,6 +303,9 @@ paths:
303303 - resource_pools
304304 patch :
305305 summary : Update specific fields of an existing resource pool
306+ description : |
307+ Note that the quota cannot be removed using the PATCH method.
308+ To remove the quota, use the PUT method and unset the quota field.
306309 parameters :
307310 - in : path
308311 name : resource_pool_id
Original file line number Diff line number Diff line change 11# generated by datamodel-codegen:
22# filename: api.spec.yaml
3- # timestamp: 2026-05-28T15:57:22 +00:00
3+ # timestamp: 2026-06-29T12:51:11 +00:00
44
55from __future__ import annotations
66
Original file line number Diff line number Diff line change @@ -217,7 +217,7 @@ def validate_resource_pool_put_or_patch(
217217 classes = (
218218 [validate_resource_class_patch_or_put (body = rc , method = method ) for rc in body .classes ] if body .classes else None
219219 )
220- quota = validate_quota_put_patch (body = body .quota ) if body .quota else None
220+ quota = validate_quota_put_patch (body = body .quota ) if body .quota else RESET if method == "PUT" else None
221221 remote = None
222222 match body .remote :
223223 case apispec .RemoteConfigurationPatchReset () as r :
Original file line number Diff line number Diff line change @@ -638,6 +638,8 @@ async def update_resource_pool(
638638 if update .quota is RESET and rp .quota :
639639 # Remove the existing quota
640640 await self .quotas_repo .delete_quota (name = rp .quota , cluster_id = cluster_id )
641+ rp .quota = None
642+ quota = None
641643 elif isinstance (update .quota , models .QuotaPatch ) and rp .quota is None :
642644 # Create a new quota, the `update.quota` object has already been validated
643645 assert update .quota .cpu is not None
You can’t perform that action at this time.
0 commit comments