{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/42463841","id":42463841,"diff_hunk":"@@ -105,50 +98,45 @@ Now that the server is running, we will create a horizontal pod autoscaler for i\n To create it, we will use the [hpa-php-apache.yaml](hpa-php-apache.yaml) file, which looks like this:\n \n ```yaml\n-apiVersion: extensions/v1beta1 \n+apiVersion: extensions/v1beta1\n kind: HorizontalPodAutoscaler\n metadata:\n   name: php-apache\n   namespace: default\n spec:\n-  maxReplicas: 10\n-  minReplicas: 1\n   scaleRef:\n     kind: ReplicationController\n     name: php-apache\n     namespace: default\n-  target:\n-    quantity: 100m\n-    resource: cpu\n+  minReplicas: 1\n+  maxReplicas: 10\n+  cpuUtilization:\n+    targetPercentage: 50\n ```\n \n This defines a horizontal pod autoscaler that maintains between 1 and 10 replicas of the Pods\n controlled by the php-apache replication controller you created in the first step of these instructions.\n Roughly speaking, the horizontal autoscaler will increase and decrease the number of replicas\n-(via the replication controller) so as to maintain an average CPU utilization across all Pods of 100 millicores.\n+(via the replication controller) so as to maintain an average CPU utilization across all Pods of 50%\n+(please note, that in [rc-php-apache.yaml](rc-php-apache.yaml) each pod requests 200 milli-cores).","path":"examples/extensions/horizontal-pod-autoscaling/README.md","position":79,"original_position":79,"commit_id":"e4500ab22fa9914d941f2b86276b7aff8d28f0f1","original_commit_id":"e4500ab22fa9914d941f2b86276b7aff8d28f0f1","user":{"login":"davidopp","id":8264113,"avatar_url":"https://avatars.githubusercontent.com/u/8264113?v=3","gravatar_id":"","url":"https://api.github.com/users/davidopp","html_url":"https://github.com/davidopp","followers_url":"https://api.github.com/users/davidopp/followers","following_url":"https://api.github.com/users/davidopp/following{/other_user}","gists_url":"https://api.github.com/users/davidopp/gists{/gist_id}","starred_url":"https://api.github.com/users/davidopp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidopp/subscriptions","organizations_url":"https://api.github.com/users/davidopp/orgs","repos_url":"https://api.github.com/users/davidopp/repos","events_url":"https://api.github.com/users/davidopp/events{/privacy}","received_events_url":"https://api.github.com/users/davidopp/received_events","type":"User","site_admin":false},"body":"the meaning of this comment is non-obvious\r\ninstead I would say:\r\n(since each pod requests 200 milli-cores [rc-php-apache.yaml](rc-php-apache.yaml), this means average CPU utilization of 100 milli-cores)","created_at":"2015-10-20T07:36:09Z","updated_at":"2015-10-20T07:36:09Z","html_url":"https://github.com/kubernetes/kubernetes/pull/15842#discussion_r42463841","pull_request_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/15842","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/42463841"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/15842#discussion_r42463841"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/15842"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/15842","id":48069514,"html_url":"https://github.com/kubernetes/kubernetes/pull/15842","diff_url":"https://github.com/kubernetes/kubernetes/pull/15842.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/15842.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/15842","number":15842,"state":"open","locked":false,"title":"Change HPA example to use new API objects","user":{"login":"piosz","id":10819974,"avatar_url":"https://avatars.githubusercontent.com/u/10819974?v=3","gravatar_id":"","url":"https://api.github.com/users/piosz","html_url":"https://github.com/piosz","followers_url":"https://api.github.com/users/piosz/followers","following_url":"https://api.github.com/users/piosz/following{/other_user}","gists_url":"https://api.github.com/users/piosz/gists{/gist_id}","starred_url":"https://api.github.com/users/piosz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/piosz/subscriptions","organizations_url":"https://api.github.com/users/piosz/orgs","repos_url":"https://api.github.com/users/piosz/repos","events_url":"https://api.github.com/users/piosz/events{/privacy}","received_events_url":"https://api.github.com/users/piosz/received_events","type":"User","site_admin":false},"body":"cc @derekwaynecarr @fgrzadkowski @jszczepkowski @mwielgus ","created_at":"2015-10-19T13:13:06Z","updated_at":"2015-10-20T07:36:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dc29721f8278644161f968e4bd1c183eec75b9ff","assignee":{"login":"davidopp","id":8264113,"avatar_url":"https://avatars.githubusercontent.com/u/8264113?v=3","gravatar_id":"","url":"https://api.github.com/users/davidopp","html_url":"https://github.com/davidopp","followers_url":"https://api.github.com/users/davidopp/followers","following_url":"https://api.github.com/users/davidopp/following{/other_user}","gists_url":"https://api.github.com/users/davidopp/gists{/gist_id}","starred_url":"https://api.github.com/users/davidopp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidopp/subscriptions","organizations_url":"https://api.github.com/users/davidopp/orgs","repos_url":"https://api.github.com/users/davidopp/repos","events_url":"https://api.github.com/users/davidopp/events{/privacy}","received_events_url":"https://api.github.com/users/davidopp/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/15842/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/15842/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/15842/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/e4500ab22fa9914d941f2b86276b7aff8d28f0f1","head":{"label":"piosz:hpa-example","ref":"hpa-example","sha":"e4500ab22fa9914d941f2b86276b7aff8d28f0f1","user":{"login":"piosz","id":10819974,"avatar_url":"https://avatars.githubusercontent.com/u/10819974?v=3","gravatar_id":"","url":"https://api.github.com/users/piosz","html_url":"https://github.com/piosz","followers_url":"https://api.github.com/users/piosz/followers","following_url":"https://api.github.com/users/piosz/following{/other_user}","gists_url":"https://api.github.com/users/piosz/gists{/gist_id}","starred_url":"https://api.github.com/users/piosz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/piosz/subscriptions","organizations_url":"https://api.github.com/users/piosz/orgs","repos_url":"https://api.github.com/users/piosz/repos","events_url":"https://api.github.com/users/piosz/events{/privacy}","received_events_url":"https://api.github.com/users/piosz/received_events","type":"User","site_admin":false},"repo":{"id":30922782,"name":"kubernetes","full_name":"piosz/kubernetes","owner":{"login":"piosz","id":10819974,"avatar_url":"https://avatars.githubusercontent.com/u/10819974?v=3","gravatar_id":"","url":"https://api.github.com/users/piosz","html_url":"https://github.com/piosz","followers_url":"https://api.github.com/users/piosz/followers","following_url":"https://api.github.com/users/piosz/following{/other_user}","gists_url":"https://api.github.com/users/piosz/gists{/gist_id}","starred_url":"https://api.github.com/users/piosz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/piosz/subscriptions","organizations_url":"https://api.github.com/users/piosz/orgs","repos_url":"https://api.github.com/users/piosz/repos","events_url":"https://api.github.com/users/piosz/events{/privacy}","received_events_url":"https://api.github.com/users/piosz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/piosz/kubernetes","description":"Container Cluster Manager","fork":true,"url":"https://api.github.com/repos/piosz/kubernetes","forks_url":"https://api.github.com/repos/piosz/kubernetes/forks","keys_url":"https://api.github.com/repos/piosz/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/piosz/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/piosz/kubernetes/teams","hooks_url":"https://api.github.com/repos/piosz/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/piosz/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/piosz/kubernetes/events","assignees_url":"https://api.github.com/repos/piosz/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/piosz/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/piosz/kubernetes/tags","blobs_url":"https://api.github.com/repos/piosz/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/piosz/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/piosz/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/piosz/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/piosz/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/piosz/kubernetes/languages","stargazers_url":"https://api.github.com/repos/piosz/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/piosz/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/piosz/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/piosz/kubernetes/subscription","commits_url":"https://api.github.com/repos/piosz/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/piosz/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/piosz/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/piosz/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/piosz/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/piosz/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/piosz/kubernetes/merges","archive_url":"https://api.github.com/repos/piosz/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/piosz/kubernetes/downloads","issues_url":"https://api.github.com/repos/piosz/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/piosz/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/piosz/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/piosz/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/piosz/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/piosz/kubernetes/releases{/id}","created_at":"2015-02-17T15:23:02Z","updated_at":"2015-05-07T17:23:24Z","pushed_at":"2015-10-19T13:11:42Z","git_url":"git://github.com/piosz/kubernetes.git","ssh_url":"git@github.com:piosz/kubernetes.git","clone_url":"https://github.com/piosz/kubernetes.git","svn_url":"https://github.com/piosz/kubernetes","homepage":"http://kubernetes.io","size":116850,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"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":"58f168315e1dba872edf70f83022c7f2480c5268","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}","created_at":"2014-06-06T22:56:04Z","updated_at":"2015-10-20T07:14:49Z","pushed_at":"2015-10-20T07:35:47Z","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":476431,"stargazers_count":10781,"watchers_count":10781,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2733,"mirror_url":null,"open_issues_count":2074,"forks":2733,"open_issues":2074,"watchers":10781,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/15842"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/15842"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/15842"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/15842/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/15842/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/15842/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/e4500ab22fa9914d941f2b86276b7aff8d28f0f1"}}}}