{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/20204","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/20204/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/20204/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/20204/events","html_url":"https://github.com/kubernetes/kubernetes/pull/20204","id":129073325,"number":20204,"title":"[WIP] move predicates into library","user":{"login":"HaiyangDING","id":11399486,"avatar_url":"https://avatars.githubusercontent.com/u/11399486?v=3","gravatar_id":"","url":"https://api.github.com/users/HaiyangDING","html_url":"https://github.com/HaiyangDING","followers_url":"https://api.github.com/users/HaiyangDING/followers","following_url":"https://api.github.com/users/HaiyangDING/following{/other_user}","gists_url":"https://api.github.com/users/HaiyangDING/gists{/gist_id}","starred_url":"https://api.github.com/users/HaiyangDING/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HaiyangDING/subscriptions","organizations_url":"https://api.github.com/users/HaiyangDING/orgs","repos_url":"https://api.github.com/users/HaiyangDING/repos","events_url":"https://api.github.com/users/HaiyangDING/events{/privacy}","received_events_url":"https://api.github.com/users/HaiyangDING/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/cla:%20yes","name":"cla: yes","color":"bfe5bf"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/size/L","name":"size/L","color":"ee9900"}],"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":27,"created_at":"2016-01-27T08:47:26Z","updated_at":"2016-02-18T11:29:51Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/20204","html_url":"https://github.com/kubernetes/kubernetes/pull/20204","diff_url":"https://github.com/kubernetes/kubernetes/pull/20204.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/20204.patch"},"body":"This PR tries to implement #12744 \r\n\r\nAny suggestions/ideas are welcome. @davidopp \r\n\r\ncurrent state: integration test fails if including podCount check in Kubelet.\r\n    \r\nDONE:\r\n    1. refactor all predicates: predicates return fitOrNot(bool) and error(Error) in which the latter is of type PredicateFailureError or InsufficientResourceError\r\n    2. GeneralPredicates() is a predicate function, which includes serveral other predicate functions (PodFitsResource, PodFitsHost, PodFitsHostPort). It is registered as one of the predicates in DefaultAlgorithmProvider, and is also called in canAdmitPod() in Kubelet and should be called by other components (like rescheduler, etc if necessary. See discussion in issue #12744\r\nTODO:\r\n    1. determine which predicates should be included in GeneralPredicates()\r\n    2. separate GeneralPredicates() into: a.) GeneralPredicatesEvictPod() and b.) GeneralPredicatesNotEvictPod()\r\n    3. DaemonSet should use GeneralPredicates()"},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/185675223","html_url":"https://github.com/kubernetes/kubernetes/pull/20204#issuecomment-185675223","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/20204","id":185675223,"user":{"login":"HaiyangDING","id":11399486,"avatar_url":"https://avatars.githubusercontent.com/u/11399486?v=3","gravatar_id":"","url":"https://api.github.com/users/HaiyangDING","html_url":"https://github.com/HaiyangDING","followers_url":"https://api.github.com/users/HaiyangDING/followers","following_url":"https://api.github.com/users/HaiyangDING/following{/other_user}","gists_url":"https://api.github.com/users/HaiyangDING/gists{/gist_id}","starred_url":"https://api.github.com/users/HaiyangDING/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HaiyangDING/subscriptions","organizations_url":"https://api.github.com/users/HaiyangDING/orgs","repos_url":"https://api.github.com/users/HaiyangDING/repos","events_url":"https://api.github.com/users/HaiyangDING/events{/privacy}","received_events_url":"https://api.github.com/users/HaiyangDING/received_events","type":"User","site_admin":false},"created_at":"2016-02-18T11:29:51Z","updated_at":"2016-02-18T11:29:51Z","body":"Thanks for all the comments. I will leave this for one day or two and then update the PR."}}