{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/129166240","pull_request_review_id":51911253,"id":129166240,"diff_hunk":"@@ -92,3 +115,88 @@ var _ rest.ShortNamesProvider = &REST{}\n func (r *REST) ShortNames() []string {\n \treturn []string{\"sts\"}\n }\n+\n+type ScaleREST struct {\n+\tregistry statefulset.Registry\n+}\n+\n+// ScaleREST implements Patcher\n+var _ = rest.Patcher(&ScaleREST{})\n+\n+// New creates a new Scale object\n+func (r *ScaleREST) New() runtime.Object {\n+\treturn &extensions.Scale{}","path":"pkg/registry/apps/statefulset/storage/storage.go","position":84,"original_position":84,"commit_id":"4769141abd189de8db27ba4a8bb475cf571271e6","original_commit_id":"6655471a134cc4bf56de1f8fdb0f56b5a7c4cbbe","user":{"login":"enisoc","id":6733629,"avatar_url":"https://avatars3.githubusercontent.com/u/6733629?v=4","gravatar_id":"","url":"https://api.github.com/users/enisoc","html_url":"https://github.com/enisoc","followers_url":"https://api.github.com/users/enisoc/followers","following_url":"https://api.github.com/users/enisoc/following{/other_user}","gists_url":"https://api.github.com/users/enisoc/gists{/gist_id}","starred_url":"https://api.github.com/users/enisoc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enisoc/subscriptions","organizations_url":"https://api.github.com/users/enisoc/orgs","repos_url":"https://api.github.com/users/enisoc/repos","events_url":"https://api.github.com/users/enisoc/events{/privacy}","received_events_url":"https://api.github.com/users/enisoc/received_events","type":"User","site_admin":false},"body":"Is the dummy object in `extensions` necessary for the actual REST API to work? Or are you just saying it's necessary for the current Scale client to work with it?\r\n\r\nIn other words, if we omit the dummy object, and do a direct `curl` to `/apis/apps/v1beta2/namespaces/default/statefulsets/blah/scale`, would that work?","created_at":"2017-07-24T22:02:43Z","updated_at":"2017-07-24T22:02:43Z","html_url":"https://github.com/kubernetes/kubernetes/pull/49168#discussion_r129166240","pull_request_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/49168","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/129166240"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/49168#discussion_r129166240"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/49168"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/49168","id":131218528,"html_url":"https://github.com/kubernetes/kubernetes/pull/49168","diff_url":"https://github.com/kubernetes/kubernetes/pull/49168.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/49168.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/49168","number":49168,"state":"open","locked":false,"title":"StatefulSet scale subresource","user":{"login":"crimsonfaith91","id":13921630,"avatar_url":"https://avatars0.githubusercontent.com/u/13921630?v=4","gravatar_id":"","url":"https://api.github.com/users/crimsonfaith91","html_url":"https://github.com/crimsonfaith91","followers_url":"https://api.github.com/users/crimsonfaith91/followers","following_url":"https://api.github.com/users/crimsonfaith91/following{/other_user}","gists_url":"https://api.github.com/users/crimsonfaith91/gists{/gist_id}","starred_url":"https://api.github.com/users/crimsonfaith91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crimsonfaith91/subscriptions","organizations_url":"https://api.github.com/users/crimsonfaith91/orgs","repos_url":"https://api.github.com/users/crimsonfaith91/repos","events_url":"https://api.github.com/users/crimsonfaith91/events{/privacy}","received_events_url":"https://api.github.com/users/crimsonfaith91/received_events","type":"User","site_admin":false},"body":"<!--  Thanks for sending a pull request!  Here are some tips for you:\r\n1. If this is your first time, read our contributor guidelines https://git.k8s.io/community/contributors/devel/pull-requests.md#the-pr-submit-process and developer guide https://git.k8s.io/community/contributors/devel/development.md#development-guide\r\n2. If you want *faster* PR reviews, read how: https://git.k8s.io/community/contributors/devel/pull-requests.md#best-practices-for-faster-reviews\r\n3. Follow the instructions for writing a release note: https://git.k8s.io/community/contributors/devel/pull-requests.md#write-release-notes-if-needed\r\n-->\r\n\r\n**What this PR does / why we need it**: This PR implements scale subresource for StatefulSet.\r\n\r\n**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #46005\r\n\r\n**Special notes for your reviewer**:\r\n\r\n**Release note**:\r\n<!--  Steps to write your release note:\r\n1. Use the release-note-* labels to set the release note state (if you have access)\r\n2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`.\r\n-->\r\n```release-note\r\nStatefulSet uses scale subresource when scaling in accord with ReplicationController, ReplicaSet, and Deployment implementations.\r\n```\r\n**Feature Checklist**:\r\n- [x] Introduce Registry interface for storage purpose\r\n- [x] Introduce `ScaleREST New(), Get() and Update()` utility functions\r\n- [x] Create a `ScaleREST` object at `NewREST()` and return it\r\n- [x] Enable scale subresource by adding `/scale` field to the storage map\r\n\r\n**Testing Checklist**:\r\n- Unit testing\r\n  - [x] Modify `newStorage()` to call `NewStorage()`, and change all unit tests accordingly\r\n  - [x] Add unit tests for `ScaleREST Get() and Update()` utility functions\r\n  - [x] Add missing unit test for `ShortNames`\r\n\r\n- Proxy testing\r\n  - [ ] Verify existence of scale subresource using `kubectl proxy` command\r\n\r\n- e2e testing\r\n  - [ ] Change relevant e2e tests to use /scale subresource instead of update()","created_at":"2017-07-19T01:11:00Z","updated_at":"2017-07-24T22:02:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a68e6be66310d30572893efa6005e3c3c834da6f","assignee":{"login":"janetkuo","id":4876867,"avatar_url":"https://avatars1.githubusercontent.com/u/4876867?v=4","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://avatars1.githubusercontent.com/u/4876867?v=4","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},{"login":"enisoc","id":6733629,"avatar_url":"https://avatars3.githubusercontent.com/u/6733629?v=4","gravatar_id":"","url":"https://api.github.com/users/enisoc","html_url":"https://github.com/enisoc","followers_url":"https://api.github.com/users/enisoc/followers","following_url":"https://api.github.com/users/enisoc/following{/other_user}","gists_url":"https://api.github.com/users/enisoc/gists{/gist_id}","starred_url":"https://api.github.com/users/enisoc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enisoc/subscriptions","organizations_url":"https://api.github.com/users/enisoc/orgs","repos_url":"https://api.github.com/users/enisoc/repos","events_url":"https://api.github.com/users/enisoc/events{/privacy}","received_events_url":"https://api.github.com/users/enisoc/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/49168/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/49168/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/49168/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/4769141abd189de8db27ba4a8bb475cf571271e6","head":{"label":"crimsonfaith91:apps-v1beta2","ref":"apps-v1beta2","sha":"4769141abd189de8db27ba4a8bb475cf571271e6","user":{"login":"crimsonfaith91","id":13921630,"avatar_url":"https://avatars0.githubusercontent.com/u/13921630?v=4","gravatar_id":"","url":"https://api.github.com/users/crimsonfaith91","html_url":"https://github.com/crimsonfaith91","followers_url":"https://api.github.com/users/crimsonfaith91/followers","following_url":"https://api.github.com/users/crimsonfaith91/following{/other_user}","gists_url":"https://api.github.com/users/crimsonfaith91/gists{/gist_id}","starred_url":"https://api.github.com/users/crimsonfaith91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crimsonfaith91/subscriptions","organizations_url":"https://api.github.com/users/crimsonfaith91/orgs","repos_url":"https://api.github.com/users/crimsonfaith91/repos","events_url":"https://api.github.com/users/crimsonfaith91/events{/privacy}","received_events_url":"https://api.github.com/users/crimsonfaith91/received_events","type":"User","site_admin":false},"repo":{"id":86755950,"name":"kubernetes","full_name":"crimsonfaith91/kubernetes","owner":{"login":"crimsonfaith91","id":13921630,"avatar_url":"https://avatars0.githubusercontent.com/u/13921630?v=4","gravatar_id":"","url":"https://api.github.com/users/crimsonfaith91","html_url":"https://github.com/crimsonfaith91","followers_url":"https://api.github.com/users/crimsonfaith91/followers","following_url":"https://api.github.com/users/crimsonfaith91/following{/other_user}","gists_url":"https://api.github.com/users/crimsonfaith91/gists{/gist_id}","starred_url":"https://api.github.com/users/crimsonfaith91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crimsonfaith91/subscriptions","organizations_url":"https://api.github.com/users/crimsonfaith91/orgs","repos_url":"https://api.github.com/users/crimsonfaith91/repos","events_url":"https://api.github.com/users/crimsonfaith91/events{/privacy}","received_events_url":"https://api.github.com/users/crimsonfaith91/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/crimsonfaith91/kubernetes","description":"Production-Grade Container Scheduling and Management","fork":true,"url":"https://api.github.com/repos/crimsonfaith91/kubernetes","forks_url":"https://api.github.com/repos/crimsonfaith91/kubernetes/forks","keys_url":"https://api.github.com/repos/crimsonfaith91/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/crimsonfaith91/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/crimsonfaith91/kubernetes/teams","hooks_url":"https://api.github.com/repos/crimsonfaith91/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/crimsonfaith91/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/crimsonfaith91/kubernetes/events","assignees_url":"https://api.github.com/repos/crimsonfaith91/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/crimsonfaith91/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/crimsonfaith91/kubernetes/tags","blobs_url":"https://api.github.com/repos/crimsonfaith91/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/crimsonfaith91/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/crimsonfaith91/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/crimsonfaith91/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/crimsonfaith91/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/crimsonfaith91/kubernetes/languages","stargazers_url":"https://api.github.com/repos/crimsonfaith91/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/crimsonfaith91/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/crimsonfaith91/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/crimsonfaith91/kubernetes/subscription","commits_url":"https://api.github.com/repos/crimsonfaith91/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/crimsonfaith91/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/crimsonfaith91/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/crimsonfaith91/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/crimsonfaith91/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/crimsonfaith91/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/crimsonfaith91/kubernetes/merges","archive_url":"https://api.github.com/repos/crimsonfaith91/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/crimsonfaith91/kubernetes/downloads","issues_url":"https://api.github.com/repos/crimsonfaith91/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/crimsonfaith91/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/crimsonfaith91/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/crimsonfaith91/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/crimsonfaith91/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/crimsonfaith91/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/crimsonfaith91/kubernetes/deployments","created_at":"2017-03-30T22:50:03Z","updated_at":"2017-03-30T22:50:34Z","pushed_at":"2017-07-24T19:57:07Z","git_url":"git://github.com/crimsonfaith91/kubernetes.git","ssh_url":"git@github.com:crimsonfaith91/kubernetes.git","clone_url":"https://github.com/crimsonfaith91/kubernetes.git","svn_url":"https://github.com/crimsonfaith91/kubernetes","homepage":"http://kubernetes.io","size":450513,"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":"ae1ff1a2d414b8569f670b072cb81a7833852245","user":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars2.githubusercontent.com/u/13629408?v=4","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://avatars2.githubusercontent.com/u/13629408?v=4","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-07-24T21:06:44Z","pushed_at":"2017-07-24T22:01:24Z","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":666482,"stargazers_count":25221,"watchers_count":25221,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8987,"mirror_url":null,"open_issues_count":5116,"forks":8987,"open_issues":5116,"watchers":25221,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/49168"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/49168"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/49168"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/49168/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/49168/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/49168/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/4769141abd189de8db27ba4a8bb475cf571271e6"}}}}
{"actor":{"display_login":"enisoc"}}