{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/64843","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/64843/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/64843/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/64843/events","html_url":"https://github.com/kubernetes/kubernetes/issues/64843","id":329971440,"node_id":"MDU6SXNzdWUzMjk5NzE0NDA=","number":64843,"title":"feature request: eviction priority within same priority class","user":{"login":"xiang90","id":4479947,"node_id":"MDQ6VXNlcjQ0Nzk5NDc=","avatar_url":"https://avatars0.githubusercontent.com/u/4479947?v=4","gravatar_id":"","url":"https://api.github.com/users/xiang90","html_url":"https://github.com/xiang90","followers_url":"https://api.github.com/users/xiang90/followers","following_url":"https://api.github.com/users/xiang90/following{/other_user}","gists_url":"https://api.github.com/users/xiang90/gists{/gist_id}","starred_url":"https://api.github.com/users/xiang90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xiang90/subscriptions","organizations_url":"https://api.github.com/users/xiang90/orgs","repos_url":"https://api.github.com/users/xiang90/repos","events_url":"https://api.github.com/users/xiang90/events{/privacy}","received_events_url":"https://api.github.com/users/xiang90/received_events","type":"User","site_admin":false},"labels":[{"id":267761362,"node_id":"MDU6TGFiZWwyNjc3NjEzNjI=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/kind/feature","name":"kind/feature","color":"c7def8","default":false},{"id":125550211,"node_id":"MDU6TGFiZWwxMjU1NTAyMTE=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/sig/scheduling","name":"sig/scheduling","color":"d2b48c","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":16,"created_at":"2018-06-06T17:55:55Z","updated_at":"2018-06-11T02:50:14Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"<!-- This form is for bug reports and feature requests ONLY!\r\n\r\nIf you're looking for help check [Stack Overflow](https://stackoverflow.com/questions/tagged/kubernetes) and the [troubleshooting guide](https://kubernetes.io/docs/tasks/debug-application-cluster/troubleshooting/).\r\n\r\nIf the matter is security related, please disclose it privately via https://kubernetes.io/security/.\r\n-->\r\n\r\n**Is this a BUG REPORT or FEATURE REQUEST?**:\r\n/kind feature\r\n\r\n\r\n**What happened**:\r\n\r\nLet's assume we have two teams managing production services and batch-jobs respectively. This case is artificial, but it can still demonstrate the problem well. \r\n\r\n### We want to ensure the production team can:\r\npreempt the batch jobs when there is no enough resources\r\n\r\nTo achieve this, we can define two priority class as below\r\n\r\n```YAML\r\napiVersion: scheduling.k8s.io/v1alpha1\r\nkind: PriorityClass\r\nmetadata:\r\n  name: Production\r\nvalue: 1000000\r\nglobalDefault: true\r\ndescription: \"This priority class should be used for production service pods only.\"\r\n```\r\n\r\n```YAML\r\napiVersion: scheduling.k8s.io/v1alpha1\r\nkind: PriorityClass\r\nmetadata:\r\n  name: batch-job\r\nvalue: 10\r\nglobalDefault: false\r\ndescription: \"This priority class should be used for batch-job pods only.\"\r\n```\r\n\r\n### We also want to ensure the batch job team can:\r\ndefine the order of eviction of the batch jobs they launch when there is no enough resources for production services\r\navoid preemption within the batch jobs. In another word, no batch job can evict any other batch job. The reason of 2 is to avoid cascading eviction.\r\n\r\n**However, there is no way to achieve both of them with today's Kubernetes functionality.**\r\n\r\nTo achieve 1), we have to define more priority classes with the right value ordering for the batch jobs. However, once we define different priority classes for the batch jobs, the higher priority ones might preempt the lower ones, which violates 2).\r\n\r\nTo solve this problem, we need to have a finer grained preemption control for pods within the same priority class.\r\n\r\n/cc @kubernetes/sig-scheduling-feature-requests @resouer @bsalamat @k82cn \r\n"},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/396108443","html_url":"https://github.com/kubernetes/kubernetes/issues/64843#issuecomment-396108443","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/64843","id":396108443,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NjEwODQ0Mw==","user":{"login":"k82cn","id":18107181,"node_id":"MDQ6VXNlcjE4MTA3MTgx","avatar_url":"https://avatars0.githubusercontent.com/u/18107181?v=4","gravatar_id":"","url":"https://api.github.com/users/k82cn","html_url":"https://github.com/k82cn","followers_url":"https://api.github.com/users/k82cn/followers","following_url":"https://api.github.com/users/k82cn/following{/other_user}","gists_url":"https://api.github.com/users/k82cn/gists{/gist_id}","starred_url":"https://api.github.com/users/k82cn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/k82cn/subscriptions","organizations_url":"https://api.github.com/users/k82cn/orgs","repos_url":"https://api.github.com/users/k82cn/repos","events_url":"https://api.github.com/users/k82cn/events{/privacy}","received_events_url":"https://api.github.com/users/k82cn/received_events","type":"User","site_admin":false},"created_at":"2018-06-11T02:50:14Z","updated_at":"2018-06-11T02:50:14Z","author_association":"MEMBER","body":"> If there are more demands, we might consider to make it part of the priority API\r\n\r\nHonestly, if the \"customized ways\" helps, I prefer not to take this into API: as you and Bobby discussed above, there maybe some other criterial for batch job which maybe out of core :)"}}
{"actor":{"display_login":"k82cn"}}