{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/18352","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/18352/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/18352/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/18352/events","html_url":"https://github.com/kubernetes/kubernetes/issues/18352","id":121016483,"number":18352,"title":"Horizontal pod autoscaling based on custom metrics","user":{"login":"jszczepkowski","id":10820769,"avatar_url":"https://avatars.githubusercontent.com/u/10820769?v=3","gravatar_id":"","url":"https://api.github.com/users/jszczepkowski","html_url":"https://github.com/jszczepkowski","followers_url":"https://api.github.com/users/jszczepkowski/followers","following_url":"https://api.github.com/users/jszczepkowski/following{/other_user}","gists_url":"https://api.github.com/users/jszczepkowski/gists{/gist_id}","starred_url":"https://api.github.com/users/jszczepkowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jszczepkowski/subscriptions","organizations_url":"https://api.github.com/users/jszczepkowski/orgs","repos_url":"https://api.github.com/users/jszczepkowski/repos","events_url":"https://api.github.com/users/jszczepkowski/events{/privacy}","received_events_url":"https://api.github.com/users/jszczepkowski/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/area/api","name":"area/api","color":"e1ed21"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/area/autoscaling","name":"area/autoscaling","color":"5319e7"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/priority/P1","name":"priority/P1","color":"eb6420"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/team/control-plane","name":"team/control-plane","color":"d2b48c"}],"state":"open","locked":false,"assignee":{"login":"mwielgus","id":11994812,"avatar_url":"https://avatars.githubusercontent.com/u/11994812?v=3","gravatar_id":"","url":"https://api.github.com/users/mwielgus","html_url":"https://github.com/mwielgus","followers_url":"https://api.github.com/users/mwielgus/followers","following_url":"https://api.github.com/users/mwielgus/following{/other_user}","gists_url":"https://api.github.com/users/mwielgus/gists{/gist_id}","starred_url":"https://api.github.com/users/mwielgus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwielgus/subscriptions","organizations_url":"https://api.github.com/users/mwielgus/orgs","repos_url":"https://api.github.com/users/mwielgus/repos","events_url":"https://api.github.com/users/mwielgus/events{/privacy}","received_events_url":"https://api.github.com/users/mwielgus/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":66,"closed_issues":30,"state":"open","created_at":"2015-08-29T03:54:16Z","updated_at":"2016-01-08T23:59:53Z","due_on":"2016-01-22T08:00:00Z","closed_at":null},"comments":17,"created_at":"2015-12-08T14:22:34Z","updated_at":"2016-01-10T00:36:56Z","closed_at":null,"body":"We are planning to implement horizontal pod autoscaling base on custom metrics.\r\n\r\nThe custom metrics need to be exposed by each of pods from RC/deployment as described in [custom metrics proposal](https://github.com/kubernetes/kubernetes/blob/master/docs/proposals/custom-metrics.md#custom-metrics-in-kubernetes).\r\n\r\nSpec of HPA will contain a list of custom metric names together with their target utilizations. If the desired numbers of pods resulting from different custom metrics utilizations are different, the autoscaler will choose the bigger number. HPA Status will contain latest observed values of the custom metrics.\r\n\r\nProposed modification in the API:\r\n```go\r\ntype CustomMetricTargetUtilization struct {\r\n    Metric string\r\n    Target float64\r\n}\r\n\r\ntype HorizontalPodAutoscalerSpec struct {\r\n    ...\r\n    CustomMetricUtilizations []CustomMetricTargetUtilization\r\n}\r\n\r\ntype CustomMetricCurrentValue struct {\r\n    Metric string\r\n    Value float64\r\n}\r\n\r\ntype HorizontalPodAutoscalerStatus struct {\r\n    ...\r\n    CustomMetricValues []CustomMetricCurrentValue\r\n}\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/170296917","html_url":"https://github.com/kubernetes/kubernetes/issues/18352#issuecomment-170296917","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/18352","id":170296917,"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},"created_at":"2016-01-10T00:36:56Z","updated_at":"2016-01-10T00:36:56Z","body":"Reassigning to @mwielgus who will be working on this while @jszczepkowski is out.\r\n"}}