-
Notifications
You must be signed in to change notification settings 8000 - Fork 936
[Feature] FederatedResourceQuota Enhancement #6350
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@RainbowMango Let me know if this looks alright! Also, @zhzhuang-zju, do you have any preference on how to subdivide this work between us? |
Generally looks great! Thanks. |
@mszacillo The origin behavior of Sent #6351 for updating the comments, please take a look, and proposing two iterated tasks:
|
Great! I've gone ahead and updated the iteration tasks to include the two other Just to double check, do these iteration tasks make sense as well:
The thought it is that the staticAssignment controller and new federated resource quota controller will both attempt to update the status of the federated resource quota resource. So we want to prevent users from toggling between the two features. If someone wants to use staticAssignment, they can delete their quota and reapply using staticAssignment.
Perhaps |
This is a technical issue and can be resolved. Concurrent updates to the same resource object by multiple controllers are a common scenario. By clearly defining the responsibilities of each controller to ensure they do not modify the same fields simultaneously, we can resolve this problem. In this case, we can let the karmada/pkg/apis/policy/v1alpha1/federatedresourcequota_types.go Lines 103 to 105 in 32a4076
.status.overallUsed will be managed by the new controller.
So, we might not need to do this. The
Basically yes, both the But there is a corner case that we probably can not just skip reconciliation even |
I like the |
Gotcha, I should have been more clear. The concern wasn't that two controllers are editing the status, but rather that they will be editing the same field
Makes sense! I'll edit this iteration task as well. Should I include the renaming of staticAssignment as part of this umbrella list, or should it be standalone? |
[edit]:
What do you think? Do you have any preference for the new controller name? @mszacillo @zhzhuang-zju |
By the way, please assign the task to yourself and @liwang0513 once you have selected it. PS: Tasks without an assignment are open for anyone to pick. |
@mszacillo Thanks for your work. The tasks you have outlined are very specific and detailed. Based on that, I only have a few minor comments:
Besides, should we limit the resource names that FederatedResourceQuota supports? FYI, there are three types of ResourceQuota: Compute Resource Quota, Storage Resource Quota, and Object Count Quota. In Iteration Tasks -- Part-1, w
8000
e may only be able to support
Please feel free to pick the tasks you're interested in. I'm glad to join in design discussions and help with code reviews. If I see something I like, I’ll just assign it to myself too. |
@mszacillo @RainbowMango I would like to improve the output of ✗ kubectl get federatedresourcequotas.policy.karmada.io
NAME AGE
test 3m59s There is no useful information currently. We can also add the overall and overallUsed fields to the output, like: kubectl get federatedresourcequotas.policy.karmada.io
NAME OVERALL OVERALL_USED
test {"cpu":"100m"} If that makes sense to you, we can include this task in Iteration Tasks -- Part-1. |
@mszacillo Can you assign this task to me? Thanks~ |
Sounds great. I have updated the iteration tasks! Will start preparing necessary PRs shortly. |
Hi, I am interested in
, could I take it? |
@seanlaii Please go ahead! I will assign it to you. Let me know if you have questions - we can discuss more on Monday. :) |
Summary
This feature aims to enhance the existing FederatedResourceQuota so it can impose namespaced resource limits directly on the Karmada control-plane level. This feature enhancement has several benefits, including:
Proposal:
Iteration Tasks -- Part-1: FederatedResourceQuota Enhancement MVP
FederatedQuotaEnforcement
(@liwang0513)- Watch create/update events for FRQ, and update federatedresourcequota.status.overall
- Watch deletion of RB -> find related FRQ -> recalculate quota usage
- Periodically recalculate FRQ status
- Check delta in quota usage and deny request if above limits
- Otherwise update federatedresourcequota.status.overallUsed and then approve update request
Iteration Tasks -- Part-2: Further Enhancements beyond MVP
The text was updated successfully, but these errors were encountered: