{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/27093","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/27093/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/27093/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/27093/events","html_url":"https://github.com/kubernetes/kubernetes/issues/27093","id":159296818,"number":27093,"title":"Proposal: Add scheduler priority function for scheduling pod using host filesystem.","user":{"login":"xuant","id":4276135,"avatar_url":"https://avatars.githubusercontent.com/u/4276135?v=3","gravatar_id":"","url":"https://api.github.com/users/xuant","html_url":"https://github.com/xuant","followers_url":"https://api.github.com/users/xuant/followers","following_url":"https://api.github.com/users/xuant/following{/other_user}","gists_url":"https://api.github.com/users/xuant/gists{/gist_id}","starred_url":"https://api.github.com/users/xuant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xuant/subscriptions","organizations_url":"https://api.github.com/users/xuant/orgs","repos_url":"https://api.github.com/users/xuant/repos","events_url":"https://api.github.com/users/xuant/events{/privacy}","received_events_url":"https://api.github.com/users/xuant/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-06-08T23:08:49Z","updated_at":"2016-06-25T07:12:02Z","closed_at":null,"body":"## Background\r\nFor applications that need to use host local filesystem, we need some level of node-affinity in case when the application pod get wiped out on some host, we want the host to be of high priority once the pod gets rescheduled. \r\nAt the beginning, the application might not care where it is going to be deployed. However, once it gets scheduled onto some node, the node should keep in mind (by adding a label or annotation) that this application has been deployed onto itself and should be able to get high priority next time with the same app.\r\n\r\n## Use case:\r\nApplications wishing to use this priority function need to add a label (or annotation) so that the priority function can decide whether to run against the application. An example would be:\r\n```\r\n{\r\n  \"kind\": \"Pod\",\r\n  \"apiVersion\": \"v1\",\r\n  \"metadata\": {\r\n    \"name\": \"\",\r\n    \"labels\": {\r\n      \"name\": \"\"\r\n    },\r\n    \"generateName\": \"\",\r\n    \"namespace\": \"\",\r\n    \"annotations\": {\r\n        \"usePriorityFunction\": \"MyPriorityFunction\"\r\n    }\r\n  },\r\n  \"spec\": {\r\n\r\n    ....\r\n\r\n  }\r\n}\r\n```\r\nWhen first time deployed, this priority function will have no effect because no node has information of having deployed this app. So the application will be deployed just like without this priority function.\r\nOnce it gets deployed, the node will start having the history of hosting this application. Now, for some reason, the application pod gets wiped out (while the node is still working), a new pod will be scheduled. This time the node will have the information of hosting the application thus the priority function will put this node in a high priority. The app-hosting history can be stored as an annotation of the node.\r\n\r\n## Benefits\r\nApplication intending to use node filesystem has low chance of losing data."},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/228518299","html_url":"https://github.com/kubernetes/kubernetes/issues/27093#issuecomment-228518299","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/27093","id":228518299,"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-06-25T07:12:02Z","updated_at":"2016-06-25T07:12:02Z","body":"We don't currently have a plan for it but hopefully we can start designing it later this year. I would suggest to subscribe to issue #7562 and watch for updates. We would definitely like to get community help in designing and implementing it!\r\n"}}
{"actor":{"display_login":"davidopp"}}