{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/55264740","id":55264740,"diff_hunk":"@@ -0,0 +1,218 @@\n+/*\n+Copyright 2016 The Kubernetes Authors All rights reserved.\n+\n+Licensed under the Apache License, Version 2.0 (the \"License\");\n+you may not use this file except in compliance with the License.\n+You may obtain a copy of the License at\n+\n+    http://www.apache.org/licenses/LICENSE-2.0\n+\n+Unless required by applicable law or agreed to in writing, software\n+distributed under the License is distributed on an \"AS IS\" BASIS,\n+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+See the License for the specific language governing permissions and\n+limitations under the License.\n+*/\n+\n+package scale\n+\n+import (\n+\t\"fmt\"\n+\t\"reflect\"\n+\n+\t\"k8s.io/kubernetes/pkg/api/meta\"\n+\t\"k8s.io/kubernetes/pkg/api/unversioned\"\n+\t\"k8s.io/kubernetes/pkg/apis/extensions\"\n+\t\"k8s.io/kubernetes/pkg/client/restclient\"\n+\t\"k8s.io/kubernetes/pkg/client/typed/dynamic\"\n+\t\"k8s.io/kubernetes/pkg/labels\"\n+\t\"k8s.io/kubernetes/pkg/runtime\"\n+)\n+\n+type Client struct {\n+\tdc *dynamic.Client\n+}\n+\n+type ScaleInterface interface {\n+\tReplicas() (int, error)\n+\tSetReplicas(replicas int)\n+\tSelector() (string, error)\n+}\n+\n+func NewClient(conf *restclient.Config) (*Client, error) {\n+\t// Make a copy, do not modify the passed config.\n+\t// TODO(madhusudancs): Should we just receive the conf argument by value? Receiving this as a\n+\t// pointer now just to be consistent with other clients.\n+\tconf2 := *conf\n+\tif conf2.APIPath == \"\" {\n+\t\tconf2.APIPath = \"/apis\"","path":"pkg/client/typed/scale/scale.go","position":48,"original_position":48,"commit_id":"140a513dc2216f8794806ca9f85d015178fbaf73","original_commit_id":"140a513dc2216f8794806ca9f85d015178fbaf73","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":"That's the point! Why would you use the default value provided by the dynamic client? /api/extensions/v1beta1 makes absolutely no sense.\r\n\r\nFor reference, see this defaults - https://github.com/kubernetes/kubernetes/blob/95ab1936ea8b462a2b41cdcff008f1b3770a2702/pkg/client/typed/generated/extensions/unversioned/extensions_client.go#L107","created_at":"2016-03-07T20:15:10Z","updated_at":"2016-03-07T20:15:10Z","html_url":"https://github.com/kubernetes/kubernetes/pull/22511#discussion_r55264740","pull_request_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/22511","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/55264740"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/22511#discussion_r55264740"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/22511"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/22511","id":61687187,"html_url":"https://github.com/kubernetes/kubernetes/pull/22511","diff_url":"https://github.com/kubernetes/kubernetes/pull/22511.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/22511.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/22511","number":22511,"state":"open","locked":false,"title":"HPA Scale ","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":"Please look at only the last commit, the WIP commit and ignore the others.\r\n\r\ncc @piosz @lavalamp ","created_at":"2016-03-04T09:35:21Z","updated_at":"2016-03-07T20:15:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0bed9ec4feb182b251e1eb5c264f95d2a87e3489","assignee":{"login":"lavalamp","id":647318,"avatar_url":"https://avatars.githubusercontent.com/u/647318?v=3","gravatar_id":"","url":"https://api.github.com/users/lavalamp","html_url":"https://github.com/lavalamp","followers_url":"https://api.github.com/users/lavalamp/followers","following_url":"https://api.github.com/users/lavalamp/following{/other_user}","gists_url":"https://api.github.com/users/lavalamp/gists{/gist_id}","starred_url":"https://api.github.com/users/lavalamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lavalamp/subscriptions","organizations_url":"https://api.github.com/users/lavalamp/orgs","repos_url":"https://api.github.com/users/lavalamp/repos","events_url":"https://api.github.com/users/lavalamp/events{/privacy}","received_events_url":"https://api.github.com/users/lavalamp/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":123,"closed_issues":607,"state":"open","created_at":"2015-08-29T03:54:16Z","updated_at":"2016-03-07T19:58:48Z","due_on":"2016-03-14T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/22511/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/22511/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/22511/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/140a513dc2216f8794806ca9f85d015178fbaf73","head":{"label":"madhusudancs:scale-hpa","ref":"scale-hpa","sha":"140a513dc2216f8794806ca9f85d015178fbaf73","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-03-07T09:37:26Z","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":175713,"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":"e4a387548ed49b1c5fbc0853af7e911ec08c2c86","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-03-07T19:39:15Z","pushed_at":"2016-03-07T19:57:38Z","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":335909,"stargazers_count":13071,"watchers_count":13071,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":3758,"mirror_url":null,"open_issues_count":2958,"forks":3758,"open_issues":2958,"watchers":13071,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/22511"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/22511"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/22511"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/22511/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/22511/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/22511/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/140a513dc2216f8794806ca9f85d015178fbaf73"}}}}