{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/7355","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/7355/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/7355/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/7355/events","html_url":"https://github.com/kubernetes/kubernetes/issues/7355","id":71276230,"number":7355,"title":"ResourceRequest Limits does not work as described","user":{"login":"gmarek","id":1703842,"avatar_url":"https://avatars.githubusercontent.com/u/1703842?v=3","gravatar_id":"","url":"https://api.github.com/users/gmarek","html_url":"https://github.com/gmarek","followers_url":"https://api.github.com/users/gmarek/followers","following_url":"https://api.github.com/users/gmarek/following{/other_user}","gists_url":"https://api.github.com/users/gmarek/gists{/gist_id}","starred_url":"https://api.github.com/users/gmarek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gmarek/subscriptions","organizations_url":"https://api.github.com/users/gmarek/orgs","repos_url":"https://api.github.com/users/gmarek/repos","events_url":"https://api.github.com/users/gmarek/events{/privacy}","received_events_url":"https://api.github.com/users/gmarek/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/area/isolation","name":"area/isolation","color":"aba420"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/area/scheduling","name":"area/scheduling","color":"ab6420"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/priority/P2","name":"priority/P2","color":"fbca04"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/team/control-plane","name":"team/control-plane","color":"d2b48c"}],"state":"open","locked":false,"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,"comments":11,"created_at":"2015-04-27T12:57:18Z","updated_at":"2015-08-21T14:07:06Z","closed_at":null,"body":"The API v3 says that:\r\n```\r\n// ResourceRequirements describes the compute resource requirements.\r\ntype ResourceRequirements struct {\r\n\t// Limits describes the maximum amount of compute resources required.\r\n\tLimits ResourceList `json:\"limits,omitempty\" description:\"Maximum amount of compute resources allowed\"`\r\n\t// Requests describes the minimum amount of compute resources required.\r\n\tRequests ResourceList `json:\"requests,omitempty\" description:\"Minimum amount of resources requested\"`\r\n}\r\n```\r\n\r\nBut in our scheduler implementation we use:\r\n```\r\nfunc getResourceRequest(pod *api.Pod) resourceRequest {\r\n\tresult := resourceRequest{}\r\n\tfor ix := range pod.Spec.Containers {\r\n\t\tlimits := pod.Spec.Containers[ix].Resources.Limits\r\n\t\tresult.memory += limits.Memory().Value()\r\n\t\tresult.milliCPU += limits.Cpu().MilliValue()\r\n\t}\r\n\treturn result\r\n}\r\n```\r\n\r\nThis means that in practice we use Limits as an amount used by the Scheduler to see if Pod fits the Node (i.e. we use it as ```Request``` should be), and we don't use ```Requests``` in any meaningful way.\r\n\r\nFor obvious reasons this is confusing, and we should fix that by either removing ```Requests``` from API and changing the comment, or fix current usages. I'm in favor of removing, even though I see that in future we may wan't to introduce this split again.\r\n\r\n@ggarson @bgrant0607 @davidopp @thockin "},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/133436746","html_url":"https://github.com/kubernetes/kubernetes/issues/7355#issuecomment-133436746","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/7355","id":133436746,"user":{"login":"gmarek","id":1703842,"avatar_url":"https://avatars.githubusercontent.com/u/1703842?v=3","gravatar_id":"","url":"https://api.github.com/users/gmarek","html_url":"https://github.com/gmarek","followers_url":"https://api.github.com/users/gmarek/followers","following_url":"https://api.github.com/users/gmarek/following{/other_user}","gists_url":"https://api.github.com/users/gmarek/gists{/gist_id}","starred_url":"https://api.github.com/users/gmarek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gmarek/subscriptions","organizations_url":"https://api.github.com/users/gmarek/orgs","repos_url":"https://api.github.com/users/gmarek/repos","events_url":"https://api.github.com/users/gmarek/events{/privacy}","received_events_url":"https://api.github.com/users/gmarek/received_events","type":"User","site_admin":false},"created_at":"2015-08-21T14:07:06Z","updated_at":"2015-08-21T14:07:06Z","body":"@bgrant0607 is this fixed by current QoS implementation?"}}