-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
Improve quota replenishment #24527
Comments
I am aware of the conflicting name problem we hit with deployments, we also just have this problem generally when you attempt to create invalid objects that fail validation. Per our chat, I am in favor of a RESTHandler post-hook to support refunding quota in this case of a POST that failed validation. The post-hook cannot depend on look-up of a resource by name since name generation happens after the fact, so in general, the hook would need to probably just know did the request fail or not, and know what to refund based on shared state, so we may want to expose Also related: #20113 |
/sig node |
Issues go stale after 90d of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle rotten |
Hey, This hasn't been looked up in ~5 years and has a related PR, which has been closed, too. So I'd be inclined to closing this one. Should you feel differently, please let us know? /kind feature |
@utkarsh2102: You can't close an active issue/PR unless you authored it or you are a collaborator. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/remove-lifecycle frozen |
@ehashman: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Quota replenishment can be slow and irksome in the case of rejected requests. One common example: create with a conflicting name. Quota charges you, but doesn't "uncharge" until it refreshes again.
If we don't need quota to be perfectly, this would be heuristically resolved by registering a time-based recheck on create against a cache of the resource to see if it exists in the store/index based on the reflector. If you check for that particular resource existing in 500 millliseconds, you'll usually make the correct choice since you're basically talking about etcd latency at that point. It possible that you'll be wrong, but a user can't force the system in their favor to gain advantage and the reconciliation of the controller will eventually get it right anyway.
In openshift, this would usually be zero cost, since we run core controllers in-process. In kube, this is non-zero cost (you'd have another cache). I'd like to see the quota admission plugin updated to at least have this as an option or some other solution that can uncharge on failed creates. I see this or a RESTHandler post-hook that can never fail (someone will abuse this) as the best options.
@derekwaynecarr @kubernetes/rh-cluster-infra
The text was updated successfully, but these errors were encountered: