-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Make API list operations consistent #2740
Comments
Other List inconsistencies were pointed out in #2602. |
Proposal: By default, list operations should not return the full object bodies, but full object bodies should be available by request, such as How list reports the children should be made consistent with other instances where we provide object references (#1490). /cc @smarterclayton |
Interesting - I can't think of a case when I wouldn't (as a client author) want children=true. I could certainly see the value of children=false in some cases. ----- Original Message -----
|
Internal usage scenarios seem to all desire the full content, but I could see a kubectl get command only wanting a subset. Maybe we can just provide a field mask of some kind as optional? Sent from my iPhone
|
Filtering by fields (#1459) is certainly an option (and would be useful, regardless), but my experience is that most clients/users don't bother explicitly filtering out stuff they don't need, which will waste a lot of resources in the apiserver. Maybe we can build some selection smarts into kubectl. Returning the full bodies by default also seems inconsistent from an object-discovery point of view, and also seems problematic for scalability. The latter could perhaps be partly addressed by pagination (#2349) and not guaranteeing that all objects would be at the same resourceVersion. |
from an access control standpoint, it makes more sense to never return full
In terms of writing policy, it will be cleaner to say that On Mon, Jan 12, 2015 at 2:59 PM, bgrant0607 notifications@github.com
|
Another consideration: If we expect the pattern of LIST followed by GETs of each object in the LIST to be common, we should ensure that this doesn't have quadratic behavior -- the GETs must execute in constant time. It's true today for lookups by name, but that requirement should be documented. In the case that they are constant time, one advantage of this approach is that the GETs may be issued by the client and served by the apiserver in parallel. |
From a practical perspective, if the api requires LIST followed by a GET of every individual item, we probably wouldn't need ACL... the pain of using that api would be protection enough :) It's fine to be able to list (or watch) without getting contents (and grant someone the ability to list/watch without getting contents), but there has to be a way to efficiently list/watch the items without spawning N additional requests. |
If the consensus is that the full contents are almost always useful, I'm fine with that. Most requests will use our client, so we can do intelligent things there. What I think we'd need to do:
|
Our major disadvantage with etcd at this point in time is we can't have covering indices on the core object, so we pay the transfer and decompression time on the apiserver, with minimal gains to the client except bandwidth.
|
We should be caching all objects in memory always (for a given namespace/kind shard), in which case our etcd load would be dramatically reduced. |
Will leave this open as an umbrella issue.
|
Closing in favor of more specific issues. |
Currently, registry-based API list calls return full objects, but other API list calls, such as on /operations, don't:
All API list calls should have consistent behavior, one way or the other.
We could potentially support both behaviors, selected by URL parameter.
Probably we can only make this change for v1beta3 (#1519).
The text was updated successfully, but these errors were encountered: