{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/52186","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/52186/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/52186/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/52186/events","html_url":"https://github.com/kubernetes/kubernetes/pull/52186","id":256328228,"number":52186,"title":"code-generator: rewrite hack/update-codecs.sh into a reusable library","user":{"login":"sttts","id":730123,"avatar_url":"https://avatars0.githubusercontent.com/u/730123?v=4","gravatar_id":"","url":"https://api.github.com/users/sttts","html_url":"https://github.com/sttts","followers_url":"https://api.github.com/users/sttts/followers","following_url":"https://api.github.com/users/sttts/following{/other_user}","gists_url":"https://api.github.com/users/sttts/gists{/gist_id}","starred_url":"https://api.github.com/users/sttts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sttts/subscriptions","organizations_url":"https://api.github.com/users/sttts/orgs","repos_url":"https://api.github.com/users/sttts/repos","events_url":"https://api.github.com/users/sttts/events{/privacy}","received_events_url":"https://api.github.com/users/sttts/received_events","type":"User","site_admin":false},"labels":[{"id":477397086,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/cncf-cla:%20yes","name":"cncf-cla: yes","color":"bfe5bf","default":false},{"id":116801185,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/kind/documentation","name":"kind/documentation","color":"c7def8","default":false},{"id":105146073,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/kind/enhancement","name":"kind/enhancement","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":349530249,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/release-note-none","name":"release-note-none","color":"c2e0c6","default":false},{"id":173493835,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/sig/api-machinery","name":"sig/api-machinery","color":"d2b48c","default":false},{"id":404091735,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/sig/apps","name":"sig/apps","color":"d2b48c","default":false},{"id":253451093,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/size/XXL","name":"size/XXL","color":"ee0000","default":false}],"state":"open","locked":false,"assignee":{"login":"ncdc","id":354,"avatar_url":"https://avatars2.githubusercontent.com/u/354?v=4","gravatar_id":"","url":"https://api.github.com/users/ncdc","html_url":"https://github.com/ncdc","followers_url":"https://api.github.com/users/ncdc/followers","following_url":"https://api.github.com/users/ncdc/following{/other_user}","gists_url":"https://api.github.com/users/ncdc/gists{/gist_id}","starred_url":"https://api.github.com/users/ncdc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ncdc/subscriptions","organizations_url":"https://api.github.com/users/ncdc/orgs","repos_url":"https://api.github.com/users/ncdc/repos","events_url":"https://api.github.com/users/ncdc/events{/privacy}","received_events_url":"https://api.github.com/users/ncdc/received_events","type":"User","site_admin":false},"assignees":[{"login":"ncdc","id":354,"avatar_url":"https://avatars2.githubusercontent.com/u/354?v=4","gravatar_id":"","url":"https://api.github.com/users/ncdc","html_url":"https://github.com/ncdc","followers_url":"https://api.github.com/users/ncdc/followers","following_url":"https://api.github.com/users/ncdc/following{/other_user}","gists_url":"https://api.github.com/users/ncdc/gists{/gist_id}","starred_url":"https://api.github.com/users/ncdc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ncdc/subscriptions","organizations_url":"https://api.github.com/users/ncdc/orgs","repos_url":"https://api.github.com/users/ncdc/repos","events_url":"https://api.github.com/users/ncdc/events{/privacy}","received_events_url":"https://api.github.com/users/ncdc/received_events","type":"User","site_admin":false},{"login":"hongchaodeng","id":920884,"avatar_url":"https://avatars1.githubusercontent.com/u/920884?v=4","gravatar_id":"","url":"https://api.github.com/users/hongchaodeng","html_url":"https://github.com/hongchaodeng","followers_url":"https://api.github.com/users/hongchaodeng/followers","following_url":"https://api.github.com/users/hongchaodeng/following{/other_user}","gists_url":"https://api.github.com/users/hongchaodeng/gists{/gist_id}","starred_url":"https://api.github.com/users/hongchaodeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hongchaodeng/subscriptions","organizations_url":"https://api.github.com/users/hongchaodeng/orgs","repos_url":"https://api.github.com/users/hongchaodeng/repos","events_url":"https://api.github.com/users/hongchaodeng/events{/privacy}","received_events_url":"https://api.github.com/users/hongchaodeng/received_events","type":"User","site_admin":false},{"login":"mbohlool","id":1613024,"avatar_url":"https://avatars3.githubusercontent.com/u/1613024?v=4","gravatar_id":"","url":"https://api.github.com/users/mbohlool","html_url":"https://github.com/mbohlool","followers_url":"https://api.github.com/users/mbohlool/followers","following_url":"https://api.github.com/users/mbohlool/following{/other_user}","gists_url":"https://api.github.com/users/mbohlool/gists{/gist_id}","starred_url":"https://api.github.com/users/mbohlool/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbohlool/subscriptions","organizations_url":"https://api.github.com/users/mbohlool/orgs","repos_url":"https://api.github.com/users/mbohlool/repos","events_url":"https://api.github.com/users/mbohlool/events{/privacy}","received_events_url":"https://api.github.com/users/mbohlool/received_events","type":"User","site_admin":false},{"login":"deads2k","id":8225098,"avatar_url":"https://avatars0.githubusercontent.com/u/8225098?v=4","gravatar_id":"","url":"https://api.github.com/users/deads2k","html_url":"https://github.com/deads2k","followers_url":"https://api.github.com/users/deads2k/followers","following_url":"https://api.github.com/users/deads2k/following{/other_user}","gists_url":"https://api.github.com/users/deads2k/gists{/gist_id}","starred_url":"https://api.github.com/users/deads2k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deads2k/subscriptions","organizations_url":"https://api.github.com/users/deads2k/orgs","repos_url":"https://api.github.com/users/deads2k/repos","events_url":"https://api.github.com/users/deads2k/events{/privacy}","received_events_url":"https://api.github.com/users/deads2k/received_events","type":"User","site_admin":false}],"milestone":null,"comments":10,"created_at":"2017-09-08T17:57:58Z","updated_at":"2017-09-20T13:16:30Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/52186","html_url":"https://github.com/kubernetes/kubernetes/pull/52186","diff_url":"https://github.com/kubernetes/kubernetes/pull/52186.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/52186.patch"},"body":"Generating everything for groups inside of an apiserver (with internal types) becomes:\r\n\r\n```shell\r\nsource ${CODEGEN_PKG}/hack/lib/codegen.sh\r\ngenerate-internal-groups \"$(dirname ${BASH_SOURCE})/../../..\" k8s.io/sample-apiserver/pkg/client k8s.io/sample-apiserver/pkg/apis k8s.io/sample-apiserver/pkg/apis wardle:v1alpha1\r\n```\r\n\r\nGenerating everything for a CRD (versioned types) becomes:\r\n\r\n```shell\r\nsource ${CODEGEN_PKG}/hack/lib/codegen.sh\r\ngenerate-groups \"$(dirname ${BASH_SOURCE})/../../..\" k8s.io/sample-apiserver/pkg/client k8s.io/sample-apiserver/pkg/apis wardle:v1alpha1\r\n```\r\n\r\nThis should cover the 90% percent use-case. For the other 10% this can be forked and adapted as needed.\r\n\r\nFurthermore, we can put this into a Docker container. Then code-generator consumers can do:\r\n\r\n```shell\r\n$ docker run -v $GOPATH:/go k8s.io/code-generator:1.8 generate-group github.com/foo/bar example:v1\r\n```"},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/330847852","html_url":"https://github.com/kubernetes/kubernetes/pull/52186#issuecomment-330847852","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/52186","id":330847852,"user":{"login":"k8s-merge-robot","id":13653959,"avatar_url":"https://avatars0.githubusercontent.com/u/13653959?v=4","gravatar_id":"","url":"https://api.github.com/users/k8s-merge-robot","html_url":"https://github.com/k8s-merge-robot","followers_url":"https://api.github.com/users/k8s-merge-robot/followers","following_url":"https://api.github.com/users/k8s-merge-robot/following{/other_user}","gists_url":"https://api.github.com/users/k8s-merge-robot/gists{/gist_id}","starred_url":"https://api.github.com/users/k8s-merge-robot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/k8s-merge-robot/subscriptions","organizations_url":"https://api.github.com/users/k8s-merge-robot/orgs","repos_url":"https://api.github.com/users/k8s-merge-robot/repos","events_url":"https://api.github.com/users/k8s-merge-robot/events{/privacy}","received_events_url":"https://api.github.com/users/k8s-merge-robot/received_events","type":"User","site_admin":false},"created_at":"2017-09-20T13:16:30Z","updated_at":"2017-09-20T13:16:30Z","author_association":"COLLABORATOR","body":"@sttts PR needs rebase"}}
{"actor":{"display_login":"k8s-merge-robot"}}