-
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
Reorganize kubelet tree so apis can be independently versioned #42759
Reorganize kubelet tree so apis can be independently versioned #42759
Conversation
53aaf8c
to
a741b93
Compare
@yujuhong @lavalamp @thockin @bgrant0607 PTAL, I'd like to get some feedback on this and move it forward, it's a key part of dynamic config related refactoring. One suggestion which Brian had, which I agree with, is to make it explicitly clear via the tree structure which APIs are intended for REST endpoints and which are not. I propose:
|
re "rest" vs "local" - those don't convey anything. One is a style, the
other is a scope. You can have local REST APIs and non-local, non-REST.
what is the intention of the APIs that are being distinguished?
…On Thu, Mar 30, 2017 at 2:41 PM, Michael Taufen ***@***.***> wrote:
@yujuhong <https://github.com/yujuhong> @lavalamp
<https://github.com/lavalamp> @thockin <https://github.com/thockin>
@bgrant0607 <https://github.com/bgrant0607>
PTAL, I'd like to get some feedback on this and move it forward, it's a
key part of dynamic config related refactoring.
One suggestion which Brian had, which I agree with, is to make it
explicitly clear via the tree structure which APIs are intended for REST
endpoints and which are not.
I propose:
- pkg/kubelet/apis/rest/
- pkg/kubelet/apis/local/
as an initial set of TLDs to make this distinction.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#42759 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFVgVB7FW2qvW8J3-mem_OOCIgtKpiSyks5rrCGTgaJpZM4MXZ54>
.
|
This at least seems consistent, but the need for all of these to be under one directory seems artificial. Anyway, I am removed from this code, but it seems OK.. |
I think the concern was about separating types that will be used for REST-style endpoints from types that won't. Since REST is typically across a network boundary (even between servers on the same machine), IMO REST is a style that typically applies to a certain scope, and for that scope we tend to use REST.
seems too complicated a structure to me. @bgrant0607 am I concerned about the same thing you were? |
I guess I'd also be ok with e.g. |
I don't think it's a major thing, so you shouldn't get stuck here, but
"what APIs are exposed" is sort of a ridiculous question - everything
visible is an "API".
…On Thu, Apr 6, 2017 at 4:20 PM, Michael Taufen ***@***.***> wrote:
@thockin <https://github.com/thockin>
This at least seems consistent, but the need for all of these to be under
one directory seems artificial.
I guess I'd also be ok with e.g. pkg/kubelet/thing/apis/stuff. As long as
there is an easy way to answer "What are all the APIs exposed by x
component?" Grepping to find a canonically-named folder is just as good to
me as looking in a canonically-placed and canonically-named folder.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#42759 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFVgVB_kBfkY_ZOHRmdZj6UJQCLvP4n2ks5rtXNMgaJpZM4MXZ54>
.
|
Figuring out what's "visible" can be challenging when things are spread all over without a consistent pattern. But yeah, probably not worth getting stuck on this. |
a741b93
to
3d5fa53
Compare
3d5fa53
to
d57125a
Compare
The change to CRI (from
What APIs you have in mind will be categorized as local? I don't think it's very clear from the context, and a few examples will help. |
I initially though we were discussing both scope and style for eventual endpoints on components, but I emailed to Brian to get some clarification and it sounds like the concern was really about distinguishing cluster-level APIs from component-level ones, which this PR initiates by providing the foundation for moving component-level APIs to the components' tree. Sorry for the confusion. I think the tree structure in this PR will suffice for now. I'll rebase this afternoon or tomorrow. |
d57125a
to
cda178a
Compare
@yujuhong rebased, PTAL |
LGTM |
102ae10
to
37de03a
Compare
rebased |
37de03a
to
4f35361
Compare
Was just something I missed in the rebase, reapplying lg |
@mtaufen: The following test(s) failed:
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. I understand the commands that are listed here. |
4f35361
to
cbad320
Compare
Fixed linter unhappiness. Utterly trivial, annoying that something like this would block a PR. |
/approve |
@Random-Liu @mrunalp @feiskyer FYI, the path for the CRI api will be changed in this PR. |
/approve (for hack and test) |
/approve for hack and test |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ixdy, madhusudancs, mtaufen, vishh
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
Automatic merge from submit-queue |
@yujuhong @lavalamp @thockin @bgrant0607
This is an example of how we might reorganize
pkg/kubelet
so the apis it exposes can be independently versioned. This would also provide a logical place to put theKubeletConfiguration
type, which currently lives inpkg/apis/componentconfig
; it could live in e.g.pkg/kubelet/apis/config
instead.Take a look when you have a chance and let me know what you think. The most significant change in this PR is reorganizing
pkg/kubelet/api
topkg/kubelet/apis
, the rest is pretty much updating import paths andBUILD
files.