Skip to content
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

Merged
merged 1 commit into from
May 13, 2017

Conversation

mtaufen
Copy link
Contributor

@mtaufen mtaufen commented Mar 8, 2017

@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 the KubeletConfiguration type, which currently lives in pkg/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 to pkg/kubelet/apis, the rest is pretty much updating import paths and BUILD files.

@mtaufen mtaufen added area/kubelet-api do-not-merge DEPRECATED. Indicates that a PR should not merge. Label can only be manually applied/removed. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. release-note-none Denotes a PR that doesn't merit a release note. sig/node Categorizes an issue or PR as relevant to SIG Node. labels Mar 8, 2017
@mtaufen mtaufen added this to the v1.7 milestone Mar 8, 2017
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Mar 8, 2017
@k8s-github-robot k8s-github-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Mar 8, 2017
@k8s-reviewable
Copy link

This change is Reviewable

@mtaufen
Copy link
Contributor Author

mtaufen commented Mar 30, 2017

@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:

  • pkg/kubelet/apis/rest/
  • pkg/kubelet/apis/local/
    as an initial set of TLDs to make this distinction.

@thockin
Copy link
Member

thockin commented Mar 31, 2017 via email

@thockin
Copy link
Member

thockin commented Mar 31, 2017

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..

@mtaufen
Copy link
Contributor Author

mtaufen commented Mar 31, 2017

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), local seemed a good antagonist word - I think the concern is really more about scope than style.

IMO REST is a style that typically applies to a certain scope, and for that scope we tend to use REST.

local is probably bad because things like configuration types will also live in these trees and those can come from a remote source...

  • rest-local
  • rest-remote
  • non-rest-local
  • non-rest-remote

seems too complicated a structure to me.

@bgrant0607 am I concerned about the same thing you were?

@mtaufen
Copy link
Contributor Author

mtaufen commented Apr 6, 2017

@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.

@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 6, 2017
@thockin
Copy link
Member

thockin commented Apr 7, 2017 via email

@mtaufen
Copy link
Contributor Author

mtaufen commented Apr 7, 2017

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.

@k8s-github-robot k8s-github-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 7, 2017
@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 13, 2017
@yujuhong
Copy link
Contributor

The change to CRI (from pkg/kubelet/api/runtime to pkg/kubelet/apsi/runtime) looks good to me. For the others, I don't think kubelet has many external-facing APIs, so I am not expecting too many follow-up moves.

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), local seemed a good antagonist word - I think the concern is really more about scope than style.

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.
If you intend to use "REST" to represent the scope, why not just use the terms such as remote and local for scope? I'm not sure why we want to include REST in naming of these packages.

@mtaufen
Copy link
Contributor Author

mtaufen commented Apr 20, 2017

If you intend to use "REST" to represent the scope, why not just use the terms such as remote and local for scope? I'm not sure why we want to include REST in naming of these packages.

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.

@mtaufen
Copy link
Contributor Author

mtaufen commented May 10, 2017

@yujuhong rebased, PTAL

@yujuhong
Copy link
Contributor

LGTM

@mtaufen mtaufen removed the do-not-merge DEPRECATED. Indicates that a PR should not merge. Label can only be manually applied/removed. label May 12, 2017
@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 12, 2017
@mtaufen
Copy link
Contributor Author

mtaufen commented May 12, 2017

rebased

@mtaufen mtaufen added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 12, 2017
@k8s-github-robot k8s-github-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 12, 2017
@k8s-github-robot k8s-github-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 12, 2017
@mtaufen
Copy link
Contributor Author

mtaufen commented May 12, 2017

Was just something I missed in the rebase, reapplying lg

@mtaufen mtaufen added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 12, 2017
@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented May 12, 2017

@mtaufen: The following test(s) failed:

Test name Commit Details Rerun command
Jenkins GCI GCE e2e cda178a35e82a1b69a2f6bcfd8bd013e5d75ce93 link @k8s-bot gci gce e2e test this
Jenkins non-CRI GCE e2e cda178a35e82a1b69a2f6bcfd8bd013e5d75ce93 link @k8s-bot non-cri e2e test this
Jenkins GCE e2e cda178a35e82a1b69a2f6bcfd8bd013e5d75ce93 link @k8s-bot cvm gce e2e test this
Jenkins non-CRI GCE Node e2e cda178a35e82a1b69a2f6bcfd8bd013e5d75ce93 link @k8s-bot non-cri node e2e test this

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.

@k8s-github-robot k8s-github-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 12, 2017
@mtaufen
Copy link
Contributor Author

mtaufen commented May 12, 2017

Fixed linter unhappiness. Utterly trivial, annoying that something like this would block a PR.

@mtaufen mtaufen added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 12, 2017
@vishh
Copy link
Contributor

vishh commented May 12, 2017

/approve

@vishh vishh self-assigned this May 12, 2017
@mtaufen
Copy link
Contributor Author

mtaufen commented May 12, 2017

@deads2k, @eparis, @fejta, @ixdy, @madhusudancs, @spxtr, can one of you PTAL and approve for the pieces in hack/ and test?

@yujuhong
Copy link
Contributor

@Random-Liu @mrunalp @feiskyer FYI, the path for the CRI api will be changed in this PR.

@madhusudancs
Copy link
Contributor

/approve (for hack and test)

@ixdy
Copy link
Member

ixdy commented May 12, 2017

/approve

for hack and test

@k8s-github-robot k8s-github-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 12, 2017
@k8s-github-robot
Copy link

[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 /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot
Copy link

Automatic merge from submit-queue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/kubelet-api cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. release-note-none Denotes a PR that doesn't merit a release note. sig/node Categorizes an issue or PR as relevant to SIG Node. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet