{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/36673","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/36673/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/36673/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/36673/events","html_url":"https://github.com/kubernetes/kubernetes/pull/36673","id":188868137,"number":36673,"title":"Convert to use versioned api","user":{"login":"caesarxuchao","id":2823529,"avatar_url":"https://avatars.githubusercontent.com/u/2823529?v=3","gravatar_id":"","url":"https://api.github.com/users/caesarxuchao","html_url":"https://github.com/caesarxuchao","followers_url":"https://api.github.com/users/caesarxuchao/followers","following_url":"https://api.github.com/users/caesarxuchao/following{/other_user}","gists_url":"https://api.github.com/users/caesarxuchao/gists{/gist_id}","starred_url":"https://api.github.com/users/caesarxuchao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caesarxuchao/subscriptions","organizations_url":"https://api.github.com/users/caesarxuchao/orgs","repos_url":"https://api.github.com/users/caesarxuchao/repos","events_url":"https://api.github.com/users/caesarxuchao/events{/privacy}","received_events_url":"https://api.github.com/users/caesarxuchao/received_events","type":"User","site_admin":false},"labels":[{"id":176978828,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/cla:%20yes","name":"cla: yes","color":"bfe5bf","default":false},{"id":477397086,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/cncf-cla:%20yes","name":"cncf-cla: yes","color":"bfe5bf","default":false},{"id":261005360,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/kind/api-change","name":"kind/api-change","color":"c7def8","default":false},{"id":240247879,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/needs-rebase","name":"needs-rebase","color":"BDBDBD","default":false},{"id":349530192,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/release-note-label-needed","name":"release-note-label-needed","color":"db5a64","default":false},{"id":253451093,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/size/XXL","name":"size/XXL","color":"ee0000","default":false},{"id":173493835,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/team/CSI-API%20Machinery%20SIG","name":"team/CSI-API Machinery SIG","color":"d2b48c","default":false}],"state":"open","locked":false,"assignee":{"login":"smarterclayton","id":1163175,"avatar_url":"https://avatars.githubusercontent.com/u/1163175?v=3","gravatar_id":"","url":"https://api.github.com/users/smarterclayton","html_url":"https://github.com/smarterclayton","followers_url":"https://api.github.com/users/smarterclayton/followers","following_url":"https://api.github.com/users/smarterclayton/following{/other_user}","gists_url":"https://api.github.com/users/smarterclayton/gists{/gist_id}","starred_url":"https://api.github.com/users/smarterclayton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smarterclayton/subscriptions","organizations_url":"https://api.github.com/users/smarterclayton/orgs","repos_url":"https://api.github.com/users/smarterclayton/repos","events_url":"https://api.github.com/users/smarterclayton/events{/privacy}","received_events_url":"https://api.github.com/users/smarterclayton/received_events","type":"User","site_admin":false},"assignees":[{"login":"smarterclayton","id":1163175,"avatar_url":"https://avatars.githubusercontent.com/u/1163175?v=3","gravatar_id":"","url":"https://api.github.com/users/smarterclayton","html_url":"https://github.com/smarterclayton","followers_url":"https://api.github.com/users/smarterclayton/followers","following_url":"https://api.github.com/users/smarterclayton/following{/other_user}","gists_url":"https://api.github.com/users/smarterclayton/gists{/gist_id}","starred_url":"https://api.github.com/users/smarterclayton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smarterclayton/subscriptions","organizations_url":"https://api.github.com/users/smarterclayton/orgs","repos_url":"https://api.github.com/users/smarterclayton/repos","events_url":"https://api.github.com/users/smarterclayton/events{/privacy}","received_events_url":"https://api.github.com/users/smarterclayton/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/kubernetes/kubernetes/milestones/31","html_url":"https://github.com/kubernetes/kubernetes/milestones/v1.6","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/milestones/31/labels","id":2130587,"number":31,"title":"v1.6","description":null,"creator":{"login":"saad-ali","id":10052848,"avatar_url":"https://avatars.githubusercontent.com/u/10052848?v=3","gravatar_id":"","url":"https://api.github.com/users/saad-ali","html_url":"https://github.com/saad-ali","followers_url":"https://api.github.com/users/saad-ali/followers","following_url":"https://api.github.com/users/saad-ali/following{/other_user}","gists_url":"https://api.github.com/users/saad-ali/gists{/gist_id}","starred_url":"https://api.github.com/users/saad-ali/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saad-ali/subscriptions","organizations_url":"https://api.github.com/users/saad-ali/orgs","repos_url":"https://api.github.com/users/saad-ali/repos","events_url":"https://api.github.com/users/saad-ali/events{/privacy}","received_events_url":"https://api.github.com/users/saad-ali/received_events","type":"User","site_admin":false},"open_issues":158,"closed_issues":5,"state":"open","created_at":"2016-11-12T00:35:38Z","updated_at":"2016-11-19T21:08:28Z","due_on":null,"closed_at":null},"comments":52,"created_at":"2016-11-11T22:50:23Z","updated_at":"2016-11-21T03:41:10Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/36673","html_url":"https://github.com/kubernetes/kubernetes/pull/36673","diff_url":"https://github.com/kubernetes/kubernetes/pull/36673.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/36673.patch"},"body":"Unit/integration/submit-queue e2e/slow e2e/node e2e tests passed. The PR is based on the code one or two day after the code freeze. I'll rebase after the PR gets reviewed.\r\n\r\nFix https://github.com/kubernetes/kubernetes/issues/35159\r\n\r\n**What are converted to use versioned API**\r\n- top level:\r\n  - cmd/kube-controller-manager\r\n  - cmd/kubelet\r\n  - plugin/cmd/kube-scheduler\r\n  - e2e tests, node e2e test, integration tests\r\n  - cmd/kube-dns (minor changes)\r\n  - cmd/kubeadm (minor changes)\r\n\r\n- dependencies:\r\n  - pkg/client/cache\r\n  - pkg/serviceaccount\r\n  - pkg/fieldpath\r\n  - pkg/cloudprovider\r\n  - pkg/util/[ pod | replicaset | node ]\r\n  - pkg/volume\r\n  - pkg/security/apparmor\r\n  - pkg/credentialprovider\r\n  - pkg/securitycontext\r\n  - pkg/dns\r\n  - plugin/pkg/auth/[ authenticator | authorizor ]/token/webhook\r\n\r\n**What remain using internal API in purpose**\r\n- apiserver, including the SelfClient used by the authorizer\r\n- pkg/registry\r\n- plugin/pkg/admission, because Attribute.GetObject() currently gets internal API object\r\n- plugin/pkg/auth (except the webhook part), this package could be converted to use versioned API, but we don't have a strong incentive, and we want to reduce the ripple caused by this PR\r\n- kubectl: by design, kubectl talks to multiple API servers serving different versions of API, so the API-specific logic in kubectl should use the \"common language\", the internal version. (IMO, kubectl should use dynamic client, and offload API-specific logic to the server.)\r\n\r\n**N.B.**\r\n- shared informers (pkg/controller/informers): shared informers are converted to use versioned API. However, plugin/pkg/admission also depends on the shared informers, and it keeps using internal API. So I have to manually add some internal version informers/listers to the shared informers. @ncdc is working on generating the shared informers, with bother internal version and external versions.\r\n- pkg/quota: @derekwaynecarr @vishh this package is depended by both plugin/pkg/admission and the pkg/controller, so I had to make a duplicate package, pkg/quotainternal, to be imported by the admission. I haven't thought this through: if we can remove `ResourceName` and `ResouceList` out of the API, we probably can avoid the duplicate\r\n- kubectl: kubectl uses several pkg/controller functions, mainly in pkg/controller/deployment/util, which are migrated to use versioned API, while kubectl still uses internal API. I have call to the conversion functions several times, to keep using the deployment controller utility functions. @janetkuo @pwittrock \r\n- Init containers: v1.Pod.Spec.InitContainers and v1.Pod.Status.InitContainerStatuses are not serialized. It used to rely on the conversion mechanism to encode/decode to the annotation fields. Kubelet now operates on v1.Pod and doesn't do any conversion, so I have to let kubelet explicitly write/read the annotations (see the changes in pkg/kubelet/config/apiserver.go and pkg/kubelet/status/status_manager.go) cc @smarterclayton \r\n- Copied some validation functions (159 lines) to pkg/v1/validation.\r\n**TODO**\r\n- I duplicated pkg/api/[pod, endpoints, service] in pkg/api/v1, need to check if the pkg/api ones are still needed.\r\n\r\ncc @liggitt @deads2k @bgrant0607 @mml @mbohlool  @kubernetes/sig-api-machinery \r\n\r\n<!-- Reviewable:start -->\r\n---\r\nThis change is [<img src=\"https://reviewable.kubernetes.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/36673)\r\n<!-- Reviewable:end -->\r\n"},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/261835332","html_url":"https://github.com/kubernetes/kubernetes/pull/36673#issuecomment-261835332","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/36673","id":261835332,"user":{"login":"smarterclayton","id":1163175,"avatar_url":"https://avatars.githubusercontent.com/u/1163175?v=3","gravatar_id":"","url":"https://api.github.com/users/smarterclayton","html_url":"https://github.com/smarterclayton","followers_url":"https://api.github.com/users/smarterclayton/followers","following_url":"https://api.github.com/users/smarterclayton/following{/other_user}","gists_url":"https://api.github.com/users/smarterclayton/gists{/gist_id}","starred_url":"https://api.github.com/users/smarterclayton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smarterclayton/subscriptions","organizations_url":"https://api.github.com/users/smarterclayton/orgs","repos_url":"https://api.github.com/users/smarterclayton/repos","events_url":"https://api.github.com/users/smarterclayton/events{/privacy}","received_events_url":"https://api.github.com/users/smarterclayton/received_events","type":"User","site_admin":false},"created_at":"2016-11-21T03:41:10Z","updated_at":"2016-11-21T03:41:10Z","body":"Yes, that was the plan discussed a few weeks ago.\n\nOn Sun, Nov 20, 2016 at 10:38 PM, Chao Xu <notifications@github.com> wrote:\n\n> Thank you for reviewing it. This is planned to be merged after we fast\n> forward the 1.5 branch, and before unfreeze the merge queue. Do you want to\n> apply the same process for your refactor? If so, we need to talk to Saad\n> (release czar).\n>\n> —\n> You are receiving this because you were mentioned.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/kubernetes/kubernetes/pull/36673#issuecomment-261835006>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe-auth/ABG_p4rij7Y5az_bCCMdkyLryoilb2y9ks5rARIcgaJpZM4KwN0x>\n> .\n>\n"}}
{"actor":{"display_login":"smarterclayton"}}