-
Notifications
You must be signed in to change notification settings - Fork 39.4k
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
Links to related object in json responses #3676
Comments
Reverse label lookup #1348 is the intended solution. We plan to support this in the server. Kubectl already implements this in the client. Users have the option of adding identifying annotations or labels if they choose. |
FWIW, I think that showing the result of the selector as part of Service On Wed, Jan 21, 2015 at 7:56 AM, Brian Grant notifications@github.com
|
Problems with this:
I'll reopen, but this is post-1.0 at best. |
One of us is mis-parsing. I don't want to know which replication I'd be fine with the status being precomputed, if we thing a label The kubelet API knows nothing of replication controllers, so there is no As a plugin, replication controller can still either cache the pods IDs it On Wed, Jan 21, 2015 at 2:04 PM, Brian Grant notifications@github.com
|
Oh, right, me. Well, the problem with THAT is the size of the list. We could include a link to the list query that would give you the pods. |
I think worrying about the list size is premature. On Wed, Jan 21, 2015 at 2:17 PM, Brian Grant notifications@github.com
|
I don't see a pre compute problem here. If I understand the request, they just want a link rel to follow that would be the default lookup. In this manner, their UIs just follow the links rather than them doing manual URL construction. Sent from my iPhone
|
@thockin I disagree. It's not a scalable pattern. A link to the query is far preferable to a list of links to the pods. Then, the solutions we develop to deal with long lists will just work. |
I'll take either one, but we can agree to disagree. A JSON object with On Wed, Jan 21, 2015 at 3:57 PM, Brian Grant notifications@github.com
|
@thockin @derekwaynecarr indeed just to confirm - you got this right :) |
btw, getting the pod uids is enough, no need in full body of pods, since they are retrieved separately anyway. |
What's your thoughts on getting a list of IDs vs getting a link to a query? On Thu, Jan 22, 2015 at 1:25 AM, abonas notifications@github.com wrote:
|
Our objects are loosely coupled by design. A link to a query is reasonable. A list of pod references is not. I'm going to cite the service redesign issue #2585, to ensure I don't forget about this. |
@thockin list of IDs are more convenient from a link to query.
|
The redundancy will be eliminated: #2740. You can query using labels already. It is even documented: #341 is not relevant, since services and replication controllers cannot yet utilize the more general form of queries. |
Group thread about how to identify the pods of a replication controller: |
Continuing discussion from #3872 and #3623: We're moving away from status computed on-the-fly: #2726. Also, we're planning to support pruning out fields #1459, but will not add extra information that is not present by default. Such information has to be provided by a separate API endpoint. Frequently changing, potentially huge lists in object status would be highly problematic, both internally and for the client-facing API, causing churn in etcd and in watches, and greatly increasing the cost of all GETs, even though the data would likely not be used in most cases. Additionally, consistency would be a problem. We plan to address these problems for list objects, but not for subobjects within API objects. We can add links (or structured list references) in status to this additional information. At this point, we plan to do this for resources and pods under a replication controller. I could be convinced to support it in some form for Endpoints, also, but not for Service itself, as we're almost certain to break it into multiple parts (#2585). If we do break up Service, its status would contain a link to the corresponding Endpoints. I imagine we'd also do this for any other instances of object references, such as replication controller to pod template (#170). |
/cc @jackgr |
@erictune There are no sig labels on this issue. Please add a sig label by: |
I think owner references are covering this issue now, please reopen if this does not hold true. |
@Kargakis I reopened. Owner references link from pods to their controller. This is about the other direction. The client needs fairly deep knowledge of the API in order to be able to find the selector field, understand what type of resource it refers to, and translate the selector into the syntax used by the API query parameter. |
/sig api-machinery then |
Related: #22675 |
@kubernetes/sig-api-machinery-feature-requests |
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 |
/remove-lifecycle stale |
User @abonas requested that a GET of services or replicationcontrollers should include links to the pods that constitute that service or replicationcontrollers. I filed this issue to discuss that idea.
Questions:
The text was updated successfully, but these errors were encountered: