{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/52434120","id":52434120,"diff_hunk":"@@ -149,9 +149,9 @@ func RunExpose(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []str\n \t// For objects that need a pod selector, derive it from the exposed object in case a user\n \t// didn't explicitly specify one via --selector\n \tif s, found := params[\"selector\"]; found && kubectl.IsZero(s) {\n-\t\ts, err := f.PodSelectorForObject(inputObject)\n+\t\ts, err := f.MapBasedSelectorForObject(inputObject)","path":"pkg/kubectl/cmd/expose.go","position":5,"original_position":5,"commit_id":"e7a9f309361787679f2210ea4714b79420fc3cba","original_commit_id":"e7a9f309361787679f2210ea4714b79420fc3cba","user":{"login":"kargakis","id":3900799,"avatar_url":"https://avatars.githubusercontent.com/u/3900799?v=3","gravatar_id":"","url":"https://api.github.com/users/kargakis","html_url":"https://github.com/kargakis","followers_url":"https://api.github.com/users/kargakis/followers","following_url":"https://api.github.com/users/kargakis/following{/other_user}","gists_url":"https://api.github.com/users/kargakis/gists{/gist_id}","starred_url":"https://api.github.com/users/kargakis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kargakis/subscriptions","organizations_url":"https://api.github.com/users/kargakis/orgs","repos_url":"https://api.github.com/users/kargakis/repos","events_url":"https://api.github.com/users/kargakis/events{/privacy}","received_events_url":"https://api.github.com/users/kargakis/received_events","type":"User","site_admin":false},"body":"What's the difference between `MapBasedSelectorForObject` and `PodSelectorForObject`? Do we need both?","created_at":"2016-02-10T09:38:06Z","updated_at":"2016-02-10T09:38:06Z","html_url":"https://github.com/kubernetes/kubernetes/pull/19840#discussion_r52434120","pull_request_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/19840","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/52434120"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/19840#discussion_r52434120"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/19840"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/19840","id":56547794,"html_url":"https://github.com/kubernetes/kubernetes/pull/19840","diff_url":"https://github.com/kubernetes/kubernetes/pull/19840.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/19840.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/19840","number":19840,"state":"closed","locked":false,"title":"Move Deployments to ReplicaSets and switch the Deployment selector to the new LabelSelector.","user":{"login":"madhusudancs","id":10183,"avatar_url":"https://avatars.githubusercontent.com/u/10183?v=3","gravatar_id":"","url":"https://api.github.com/users/madhusudancs","html_url":"https://github.com/madhusudancs","followers_url":"https://api.github.com/users/madhusudancs/followers","following_url":"https://api.github.com/users/madhusudancs/following{/other_user}","gists_url":"https://api.github.com/users/madhusudancs/gists{/gist_id}","starred_url":"https://api.github.com/users/madhusudancs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/madhusudancs/subscriptions","organizations_url":"https://api.github.com/users/madhusudancs/orgs","repos_url":"https://api.github.com/users/madhusudancs/repos","events_url":"https://api.github.com/users/madhusudancs/events{/privacy}","received_events_url":"https://api.github.com/users/madhusudancs/received_events","type":"User","site_admin":false},"body":"**Release note for v1.2** (Copying @bgrant0607's comment from below for better visibility)\r\n\r\nDelete all Deployments, their RCs, and their pods, and re-create new ones using selector.matchLabels.\r\n\r\nWay to not disrupt the running pods:\r\n\r\n1. Do a non-cascading delete of the Deployment and its RCs\r\n2. Upgrade Kubernetes.\r\n3. Create ReplicaSets corresponding to the RCs using selector.matchLabels, which will adopt the pods\r\n4. Re-create the Deployment using selector.matchLabels\r\n\r\n**End of release note**\r\n\r\n@bgrant0607 I have added the \"release-note-breaking-change\" label, but I am not sure if this change qualifies for a release note describing \"a way to achieve or approximate previous behavior, or migration that should/could be done prior to upgrade\" that you mentioned in your email. Do you think this deserves a description?\r\n\r\nUpdate the Deployments' API types, defaulting code, conversions, helpers\r\nand validation to use ReplicaSets instead of ReplicationControllers and\r\nLabelSelector instead of map[string]string for selectors.\r\n\r\nAlso update the Deployment controller, registry, kubectl subcommands,\r\nclient listers package and e2e tests to use ReplicaSets and\r\nLabelSelector for Deployments.\r\n\r\nOnly the last two commits in this PR need reviews.","created_at":"2016-01-20T00:30:15Z","updated_at":"2016-02-10T09:38:06Z","closed_at":"2016-02-10T02:57:42Z","merged_at":"2016-02-10T02:57:42Z","merge_commit_sha":"624933fb022772eda035074ad7302294d8251854","assignee":{"login":"janetkuo","id":4876867,"avatar_url":"https://avatars.githubusercontent.com/u/4876867?v=3","gravatar_id":"","url":"https://api.github.com/users/janetkuo","html_url":"https://github.com/janetkuo","followers_url":"https://api.github.com/users/janetkuo/followers","following_url":"https://api.github.com/users/janetkuo/following{/other_user}","gists_url":"https://api.github.com/users/janetkuo/gists{/gist_id}","starred_url":"https://api.github.com/users/janetkuo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janetkuo/subscriptions","organizations_url":"https://api.github.com/users/janetkuo/orgs","repos_url":"https://api.github.com/users/janetkuo/repos","events_url":"https://api.github.com/users/janetkuo/events{/privacy}","received_events_url":"https://api.github.com/users/janetkuo/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/kubernetes/kubernetes/milestones/15","html_url":"https://github.com/kubernetes/kubernetes/milestones/v1.2","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/milestones/15/labels","id":1278499,"number":15,"title":"v1.2","description":"https://github.com/kubernetes/kubernetes/wiki/Release-1.2","creator":{"login":"bgrant0607","id":7725777,"avatar_url":"https://avatars.githubusercontent.com/u/7725777?v=3","gravatar_id":"","url":"https://api.github.com/users/bgrant0607","html_url":"https://github.com/bgrant0607","followers_url":"https://api.github.com/users/bgrant0607/followers","following_url":"https://api.github.com/users/bgrant0607/following{/other_user}","gists_url":"https://api.github.com/users/bgrant0607/gists{/gist_id}","starred_url":"https://api.github.com/users/bgrant0607/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgrant0607/subscriptions","organizations_url":"https://api.github.com/users/bgrant0607/orgs","repos_url":"https://api.github.com/users/bgrant0607/repos","events_url":"https://api.github.com/users/bgrant0607/events{/privacy}","received_events_url":"https://api.github.com/users/bgrant0607/received_events","type":"User","site_admin":false},"open_issues":169,"closed_issues":118,"state":"open","created_at":"2015-08-29T03:54:16Z","updated_at":"2016-02-10T03:35:32Z","due_on":"2016-03-07T08:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/19840/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/19840/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/19840/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/e7a9f309361787679f2210ea4714b79420fc3cba","head":{"label":"madhusudancs:replicaset-deployment","ref":"replicaset-deployment","sha":"e7a9f309361787679f2210ea4714b79420fc3cba","user":{"login":"madhusudancs","id":10183,"avatar_url":"https://avatars.githubusercontent.com/u/10183?v=3","gravatar_id":"","url":"https://api.github.com/users/madhusudancs","html_url":"https://github.com/madhusudancs","followers_url":"https://api.github.com/users/madhusudancs/followers","following_url":"https://api.github.com/users/madhusudancs/following{/other_user}","gists_url":"https://api.github.com/users/madhusudancs/gists{/gist_id}","starred_url":"https://api.github.com/users/madhusudancs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/madhusudancs/subscriptions","organizations_url":"https://api.github.com/users/madhusudancs/orgs","repos_url":"https://api.github.com/users/madhusudancs/repos","events_url":"https://api.github.com/users/madhusudancs/events{/privacy}","received_events_url":"https://api.github.com/users/madhusudancs/received_events","type":"User","site_admin":false},"repo":{"id":43526269,"name":"kubernetes","full_name":"madhusudancs/kubernetes","owner":{"login":"madhusudancs","id":10183,"avatar_url":"https://avatars.githubusercontent.com/u/10183?v=3","gravatar_id":"","url":"https://api.github.com/users/madhusudancs","html_url":"https://github.com/madhusudancs","followers_url":"https://api.github.com/users/madhusudancs/followers","following_url":"https://api.github.com/users/madhusudancs/following{/other_user}","gists_url":"https://api.github.com/users/madhusudancs/gists{/gist_id}","starred_url":"https://api.github.com/users/madhusudancs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/madhusudancs/subscriptions","organizations_url":"https://api.github.com/users/madhusudancs/orgs","repos_url":"https://api.github.com/users/madhusudancs/repos","events_url":"https://api.github.com/users/madhusudancs/events{/privacy}","received_events_url":"https://api.github.com/users/madhusudancs/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/madhusudancs/kubernetes","description":"Container Cluster Manager from Google","fork":true,"url":"https://api.github.com/repos/madhusudancs/kubernetes","forks_url":"https://api.github.com/repos/madhusudancs/kubernetes/forks","keys_url":"https://api.github.com/repos/madhusudancs/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/madhusudancs/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/madhusudancs/kubernetes/teams","hooks_url":"https://api.github.com/repos/madhusudancs/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/madhusudancs/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/madhusudancs/kubernetes/events","assignees_url":"https://api.github.com/repos/madhusudancs/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/madhusudancs/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/madhusudancs/kubernetes/tags","blobs_url":"https://api.github.com/repos/madhusudancs/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/madhusudancs/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/madhusudancs/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/madhusudancs/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/madhusudancs/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/madhusudancs/kubernetes/languages","stargazers_url":"https://api.github.com/repos/madhusudancs/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/madhusudancs/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/madhusudancs/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/madhusudancs/kubernetes/subscription","commits_url":"https://api.github.com/repos/madhusudancs/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/madhusudancs/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/madhusudancs/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/madhusudancs/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/madhusudancs/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/madhusudancs/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/madhusudancs/kubernetes/merges","archive_url":"https://api.github.com/repos/madhusudancs/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/madhusudancs/kubernetes/downloads","issues_url":"https://api.github.com/repos/madhusudancs/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/madhusudancs/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/madhusudancs/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/madhusudancs/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/madhusudancs/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/madhusudancs/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/madhusudancs/kubernetes/deployments","created_at":"2015-10-01T23:19:31Z","updated_at":"2016-01-11T22:54:35Z","pushed_at":"2016-02-09T23:50:11Z","git_url":"git://github.com/madhusudancs/kubernetes.git","ssh_url":"git@github.com:madhusudancs/kubernetes.git","clone_url":"https://github.com/madhusudancs/kubernetes.git","svn_url":"https://github.com/madhusudancs/kubernetes","homepage":"http://kubernetes.io","size":162612,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"kubernetes:master","ref":"master","sha":"c1e79e4264376edec1d12bccd8b34dba659ce8a5","user":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"repo":{"id":20580498,"name":"kubernetes","full_name":"kubernetes/kubernetes","owner":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kubernetes/kubernetes","description":"Container Cluster Manager from Google","fork":false,"url":"https://api.github.com/repos/kubernetes/kubernetes","forks_url":"https://api.github.com/repos/kubernetes/kubernetes/forks","keys_url":"https://api.github.com/repos/kubernetes/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubernetes/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubernetes/kubernetes/teams","hooks_url":"https://api.github.com/repos/kubernetes/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/kubernetes/kubernetes/events","assignees_url":"https://api.github.com/repos/kubernetes/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/kubernetes/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/kubernetes/kubernetes/tags","blobs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubernetes/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubernetes/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/kubernetes/kubernetes/languages","stargazers_url":"https://api.github.com/repos/kubernetes/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/kubernetes/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/kubernetes/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/kubernetes/kubernetes/subscription","commits_url":"https://api.github.com/repos/kubernetes/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubernetes/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubernetes/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/kubernetes/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubernetes/kubernetes/merges","archive_url":"https://api.github.com/repos/kubernetes/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubernetes/kubernetes/downloads","issues_url":"https://api.github.com/repos/kubernetes/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/kubernetes/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/kubernetes/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/kubernetes/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/kubernetes/kubernetes/deployments","created_at":"2014-06-06T22:56:04Z","updated_at":"2016-02-10T09:02:44Z","pushed_at":"2016-02-10T09:36:53Z","git_url":"git://github.com/kubernetes/kubernetes.git","ssh_url":"git@github.com:kubernetes/kubernetes.git","clone_url":"https://github.com/kubernetes/kubernetes.git","svn_url":"https://github.com/kubernetes/kubernetes","homepage":"http://kubernetes.io","size":321657,"stargazers_count":12589,"watchers_count":12589,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":3586,"mirror_url":null,"open_issues_count":2823,"forks":3586,"open_issues":2823,"watchers":12589,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/19840"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/19840"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/19840"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/19840/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/19840/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/19840/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/e7a9f309361787679f2210ea4714b79420fc3cba"}}}}