{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/110288539","pull_request_review_id":31452852,"id":110288539,"diff_hunk":"@@ -416,6 +416,9 @@ func MaxUnavailable(deployment extensions.Deployment) int32 {\n \t}\n \t// Error caught by validation\n \t_, maxUnavailable, _ := ResolveFenceposts(deployment.Spec.Strategy.RollingUpdate.MaxSurge, deployment.Spec.Strategy.RollingUpdate.MaxUnavailable, *(deployment.Spec.Replicas))\n+\tif maxUnavailable > *(deployment.Spec.Replicas) {\n+\t\treturn *(deployment.Spec.Replicas)\n+\t}","path":"pkg/controller/deployment/util/deployment_util.go","position":6,"original_position":6,"commit_id":"fed94bcda1c4963411ca50c1a3b91aa58231d34c","original_commit_id":"fed94bcda1c4963411ca50c1a3b91aa58231d34c","user":{"login":"wanghaoran1988","id":13621088,"avatar_url":"https://avatars2.githubusercontent.com/u/13621088?v=3","gravatar_id":"","url":"https://api.github.com/users/wanghaoran1988","html_url":"https://github.com/wanghaoran1988","followers_url":"https://api.github.com/users/wanghaoran1988/followers","following_url":"https://api.github.com/users/wanghaoran1988/following{/other_user}","gists_url":"https://api.github.com/users/wanghaoran1988/gists{/gist_id}","starred_url":"https://api.github.com/users/wanghaoran1988/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wanghaoran1988/subscriptions","organizations_url":"https://api.github.com/users/wanghaoran1988/orgs","repos_url":"https://api.github.com/users/wanghaoran1988/repos","events_url":"https://api.github.com/users/wanghaoran1988/events{/privacy}","received_events_url":"https://api.github.com/users/wanghaoran1988/received_events","type":"User","site_admin":false},"body":"I'd prefer to keep the logic here, keep ResolveFenceposts only resolve the real value, @kargakis , any idea?","created_at":"2017-04-06T23:18:02Z","updated_at":"2017-04-06T23:18:02Z","html_url":"https://github.com/kubernetes/kubernetes/pull/43732#discussion_r110288539","pull_request_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/43732","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/110288539"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/43732#discussion_r110288539"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/43732"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/43732","id":112890771,"html_url":"https://github.com/kubernetes/kubernetes/pull/43732","diff_url":"https://github.com/kubernetes/kubernetes/pull/43732.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/43732.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/43732","number":43732,"state":"open","locked":false,"title":"Handle maxUnavailable larger than spec.replicas","user":{"login":"wanghaoran1988","id":13621088,"avatar_url":"https://avatars2.githubusercontent.com/u/13621088?v=3","gravatar_id":"","url":"https://api.github.com/users/wanghaoran1988","html_url":"https://github.com/wanghaoran1988","followers_url":"https://api.github.com/users/wanghaoran1988/followers","following_url":"https://api.github.com/users/wanghaoran1988/following{/other_user}","gists_url":"https://api.github.com/users/wanghaoran1988/gists{/gist_id}","starred_url":"https://api.github.com/users/wanghaoran1988/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wanghaoran1988/subscriptions","organizations_url":"https://api.github.com/users/wanghaoran1988/orgs","repos_url":"https://api.github.com/users/wanghaoran1988/repos","events_url":"https://api.github.com/users/wanghaoran1988/events{/privacy}","received_events_url":"https://api.github.com/users/wanghaoran1988/received_events","type":"User","site_admin":false},"body":"**What this PR does / why we need it**:\r\nHandle maxUnavailable larger than spec.replicas\r\n**Which issue this PR fixes** \r\nfixes #42479\r\n\r\n**Special notes for your reviewer**:\r\nNone\r\n**Release note**:\r\n```\r\nNONE\r\n```\r\n","created_at":"2017-03-28T05:09:34Z","updated_at":"2017-04-06T23:18:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"92444ec7b447dc103d3e7d3bc1e04cc68b9076b9","assignee":{"login":"janetkuo","id":4876867,"avatar_url":"https://avatars2.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},"assignees":[{"login":"janetkuo","id":4876867,"avatar_url":"https://avatars2.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":null,"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/43732/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/43732/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/43732/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/fed94bcda1c4963411ca50c1a3b91aa58231d34c","head":{"label":"wanghaoran1988:fix_issue_42479","ref":"fix_issue_42479","sha":"fed94bcda1c4963411ca50c1a3b91aa58231d34c","user":{"login":"wanghaoran1988","id":13621088,"avatar_url":"https://avatars2.githubusercontent.com/u/13621088?v=3","gravatar_id":"","url":"https://api.github.com/users/wanghaoran1988","html_url":"https://github.com/wanghaoran1988","followers_url":"https://api.github.com/users/wanghaoran1988/followers","following_url":"https://api.github.com/users/wanghaoran1988/following{/other_user}","gists_url":"https://api.github.com/users/wanghaoran1988/gists{/gist_id}","starred_url":"https://api.github.com/users/wanghaoran1988/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wanghaoran1988/subscriptions","organizations_url":"https://api.github.com/users/wanghaoran1988/orgs","repos_url":"https://api.github.com/users/wanghaoran1988/repos","events_url":"https://api.github.com/users/wanghaoran1988/events{/privacy}","received_events_url":"https://api.github.com/users/wanghaoran1988/received_events","type":"User","site_admin":false},"repo":{"id":63595566,"name":"kubernetes","full_name":"wanghaoran1988/kubernetes","owner":{"login":"wanghaoran1988","id":13621088,"avatar_url":"https://avatars2.githubusercontent.com/u/13621088?v=3","gravatar_id":"","url":"https://api.github.com/users/wanghaoran1988","html_url":"https://github.com/wanghaoran1988","followers_url":"https://api.github.com/users/wanghaoran1988/followers","following_url":"https://api.github.com/users/wanghaoran1988/following{/other_user}","gists_url":"https://api.github.com/users/wanghaoran1988/gists{/gist_id}","starred_url":"https://api.github.com/users/wanghaoran1988/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wanghaoran1988/subscriptions","organizations_url":"https://api.github.com/users/wanghaoran1988/orgs","repos_url":"https://api.github.com/users/wanghaoran1988/repos","events_url":"https://api.github.com/users/wanghaoran1988/events{/privacy}","received_events_url":"https://api.github.com/users/wanghaoran1988/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wanghaoran1988/kubernetes","description":"Production-Grade Container Scheduling and Management","fork":true,"url":"https://api.github.com/repos/wanghaoran1988/kubernetes","forks_url":"https://api.github.com/repos/wanghaoran1988/kubernetes/forks","keys_url":"https://api.github.com/repos/wanghaoran1988/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wanghaoran1988/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wanghaoran1988/kubernetes/teams","hooks_url":"https://api.github.com/repos/wanghaoran1988/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/wanghaoran1988/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/wanghaoran1988/kubernetes/events","assignees_url":"https://api.github.com/repos/wanghaoran1988/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/wanghaoran1988/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/wanghaoran1988/kubernetes/tags","blobs_url":"https://api.github.com/repos/wanghaoran1988/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wanghaoran1988/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wanghaoran1988/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/wanghaoran1988/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wanghaoran1988/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/wanghaoran1988/kubernetes/languages","stargazers_url":"https://api.github.com/repos/wanghaoran1988/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/wanghaoran1988/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/wanghaoran1988/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/wanghaoran1988/kubernetes/subscription","commits_url":"https://api.github.com/repos/wanghaoran1988/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/wanghaoran1988/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/wanghaoran1988/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/wanghaoran1988/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/wanghaoran1988/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/wanghaoran1988/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wanghaoran1988/kubernetes/merges","archive_url":"https://api.github.com/repos/wanghaoran1988/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wanghaoran1988/kubernetes/downloads","issues_url":"https://api.github.com/repos/wanghaoran1988/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/wanghaoran1988/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/wanghaoran1988/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/wanghaoran1988/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wanghaoran1988/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/wanghaoran1988/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/wanghaoran1988/kubernetes/deployments","created_at":"2016-07-18T11:01:16Z","updated_at":"2016-07-18T11:01:34Z","pushed_at":"2017-04-06T14:34:55Z","git_url":"git://github.com/wanghaoran1988/kubernetes.git","ssh_url":"git@github.com:wanghaoran1988/kubernetes.git","clone_url":"https://github.com/wanghaoran1988/kubernetes.git","svn_url":"https://github.com/wanghaoran1988/kubernetes","homepage":"http://kubernetes.io","size":410397,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"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":"ac8b985b4a06810e7fadd6ea5d92f3c8d83b7e4a","user":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars1.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://avatars1.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":"Production-Grade Container Scheduling and Management","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":"2017-04-06T23:10:28Z","pushed_at":"2017-04-06T23:08:49Z","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":593040,"stargazers_count":22161,"watchers_count":22161,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":7672,"mirror_url":null,"open_issues_count":5638,"forks":7672,"open_issues":5638,"watchers":22161,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/43732"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/43732"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/43732"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/43732/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/43732/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/43732/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/fed94bcda1c4963411ca50c1a3b91aa58231d34c"}}}}
{"actor":{"display_login":"wanghaoran1988"}}