{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/22985","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/22985/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/22985/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/22985/events","html_url":"https://github.com/kubernetes/kubernetes/pull/22985","id":140966121,"number":22985,"title":"Inter pod topological affinity and anti-affinity implementation","user":{"login":"kevin-wangzefeng","id":6914660,"avatar_url":"https://avatars.githubusercontent.com/u/6914660?v=3","gravatar_id":"","url":"https://api.github.com/users/kevin-wangzefeng","html_url":"https://github.com/kevin-wangzefeng","followers_url":"https://api.github.com/users/kevin-wangzefeng/followers","following_url":"https://api.github.com/users/kevin-wangzefeng/following{/other_user}","gists_url":"https://api.github.com/users/kevin-wangzefeng/gists{/gist_id}","starred_url":"https://api.github.com/users/kevin-wangzefeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevin-wangzefeng/subscriptions","organizations_url":"https://api.github.com/users/kevin-wangzefeng/orgs","repos_url":"https://api.github.com/users/kevin-wangzefeng/repos","events_url":"https://api.github.com/users/kevin-wangzefeng/events{/privacy}","received_events_url":"https://api.github.com/users/kevin-wangzefeng/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/do-not-merge","name":"do-not-merge","color":"e11d21"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/kind/api-change","name":"kind/api-change","color":"c7def8"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/kind/old-docs","name":"kind/old-docs","color":"c7def8"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/needs-rebase","name":"needs-rebase","color":"BDBDBD"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/size/XXL","name":"size/XXL","color":"ee0000"}],"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":17,"created_at":"2016-03-15T13:06:10Z","updated_at":"2016-03-26T16:50:40Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/22985","html_url":"https://github.com/kubernetes/kubernetes/pull/22985","diff_url":"https://github.com/kubernetes/kubernetes/pull/22985.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/22985.patch"},"body":"This PR implements the Phase 1 of [inter-pod topological affinity and anti-affinity](https://github.com/kubernetes/kubernetes/blob/master/docs/design/podaffinity.md):\r\n\r\n> 1. Add the `Affinity` field to PodSpec and the `PodAffinity` and `PodAntiAffinity` types to the API along with all of their descendant types.\r\n2. Implement a scheduler predicate that takes `RequiredDuringSchedulingIgnoredDuringExecution`\r\naffinity and anti-affinity into account. Include a workaround for the issue described at the end of the Affinity section of the Examples section (can't schedule first pod).\r\n3. Implement a scheduler priority function that takes `PreferredDuringSchedulingIgnoredDuringExecution` affinity and anti-affinity into account\r\n4. Implement admission controller that rejects requests that specify \"all namespaces\" with non-\"node\" TopologyKey for `RequiredDuringScheduling` anti-affinity.\r\nThis admission controller should be enabled by default.\r\n\r\nP.S. For step 4, this PR currently only implements the admission controller, and \"enabling it by default\" (changing the deployment scripts) will be in a follow up PR.\r\n\r\nAs it is the Phase 1, the API change does not contain adding the new field into podSpec, but is in the annotation way which is the same with what we did for the node affinity. A follow up PR to add introductions is also in the plan.\r\n\r\n@davidopp @kubernetes/sig-scheduling PTAL."},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/201891284","html_url":"https://github.com/kubernetes/kubernetes/pull/22985#issuecomment-201891284","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/22985","id":201891284,"user":{"login":"k8s-merge-robot","id":13653959,"avatar_url":"https://avatars.githubusercontent.com/u/13653959?v=3","gravatar_id":"","url":"https://api.github.com/users/k8s-merge-robot","html_url":"https://github.com/k8s-merge-robot","followers_url":"https://api.github.com/users/k8s-merge-robot/followers","following_url":"https://api.github.com/users/k8s-merge-robot/following{/other_user}","gists_url":"https://api.github.com/users/k8s-merge-robot/gists{/gist_id}","starred_url":"https://api.github.com/users/k8s-merge-robot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/k8s-merge-robot/subscriptions","organizations_url":"https://api.github.com/users/k8s-merge-robot/orgs","repos_url":"https://api.github.com/users/k8s-merge-robot/repos","events_url":"https://api.github.com/users/k8s-merge-robot/events{/privacy}","received_events_url":"https://api.github.com/users/k8s-merge-robot/received_events","type":"User","site_admin":false},"created_at":"2016-03-26T16:50:40Z","updated_at":"2016-03-26T16:50:40Z","body":"@kevin-wangzefeng PR needs rebase"}}