{"action":"created","issue":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/10217","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/10217/labels{/name}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/10217/comments","events_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/10217/events","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/issues/10217","id":90341471,"number":10217,"title":"Support bulk resource deletion in the API","user":{"login":"wojtek-t","id":10743879,"avatar_url":"https://avatars.githubusercontent.com/u/10743879?v=3","gravatar_id":"","url":"https://api.github.com/users/wojtek-t","html_url":"https://github.com/wojtek-t","followers_url":"https://api.github.com/users/wojtek-t/followers","following_url":"https://api.github.com/users/wojtek-t/following{/other_user}","gists_url":"https://api.github.com/users/wojtek-t/gists{/gist_id}","starred_url":"https://api.github.com/users/wojtek-t/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wojtek-t/subscriptions","organizations_url":"https://api.github.com/users/wojtek-t/orgs","repos_url":"https://api.github.com/users/wojtek-t/repos","events_url":"https://api.github.com/users/wojtek-t/events{/privacy}","received_events_url":"https://api.github.com/users/wojtek-t/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/labels/area/usability","name":"area/usability","color":"bfe5bf"},{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/labels/component/CLI","name":"component/CLI","color":"0052cc"},{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/labels/kind/enhancement","name":"kind/enhancement","color":"c7def8"},{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/labels/priority/P2","name":"priority/P2","color":"fbca04"},{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/labels/team/master","name":"team/master","color":"d2b48c"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/milestones/11","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/milestones/v1.0-post","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/milestones/11/labels","id":1035380,"number":11,"title":"v1.0-post","description":"Things that are triaged and decided not for inclusion to v1.0","creator":{"login":"brendandburns","id":5751682,"avatar_url":"https://avatars.githubusercontent.com/u/5751682?v=3","gravatar_id":"","url":"https://api.github.com/users/brendandburns","html_url":"https://github.com/brendandburns","followers_url":"https://api.github.com/users/brendandburns/followers","following_url":"https://api.github.com/users/brendandburns/following{/other_user}","gists_url":"https://api.github.com/users/brendandburns/gists{/gist_id}","starred_url":"https://api.github.com/users/brendandburns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brendandburns/subscriptions","organizations_url":"https://api.github.com/users/brendandburns/orgs","repos_url":"https://api.github.com/users/brendandburns/repos","events_url":"https://api.github.com/users/brendandburns/events{/privacy}","received_events_url":"https://api.github.com/users/brendandburns/received_events","type":"User","site_admin":false},"open_issues":297,"closed_issues":52,"state":"open","created_at":"2015-03-23T22:54:17Z","updated_at":"2015-06-25T13:54:17Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2015-06-23T09:58:04Z","updated_at":"2015-06-25T14:22:49Z","closed_at":null,"body":"We would like to support bulk resource deletion (filtered by label selector) in the API.\r\n\r\nThe motivation is that currently removing the namespace after scalability tests (removing all events from that namespace) can take more than half an hour.\r\n\r\nHaving a single API call \"remove all resources satisfying this selector\" can hopefully reduce this time to less than a minute.\r\n\r\nSimilarly to what while deleting a single object, we need to support graceful termination, thus the call will need to be asynchronous.\r\n\r\ncc @fgrzadkowski @bgrant0607 "},"comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/comments/115274570","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/issues/10217#issuecomment-115274570","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/10217","id":115274570,"user":{"login":"bgrant0607","id":7725777,"avatar_url":"https://avatars.githubusercontent.com/u/7725777?v=3","gravatar_id":"","url":"https://api.github.com/users/bgrant0607","html_url":"https://github.com/bgrant0607","followers_url":"https://api.github.com/users/bgrant0607/followers","following_url":"https://api.github.com/users/bgrant0607/following{/other_user}","gists_url":"https://api.github.com/users/bgrant0607/gists{/gist_id}","starred_url":"https://api.github.com/users/bgrant0607/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgrant0607/subscriptions","organizations_url":"https://api.github.com/users/bgrant0607/orgs","repos_url":"https://api.github.com/users/bgrant0607/repos","events_url":"https://api.github.com/users/bgrant0607/events{/privacy}","received_events_url":"https://api.github.com/users/bgrant0607/received_events","type":"User","site_admin":false},"created_at":"2015-06-25T14:22:49Z","updated_at":"2015-06-25T14:22:49Z","body":"Let's not add a field selector to DeleteOptions for now, please. I'm not convinced that's a pattern we want to encourage, and power is hard to take away.\r\n\r\nFor these bulk mutations, we need to figure out how to make them work asynchronously, even in the presence of TCP disconnects and apiserver failures. For instance, Namespace deletion (#7372) can record the fact that it's deleting in the DeletionTimestamp of the Namespace resource. We probably need to create a Deletion controller with the specified label selector in order to drive the process until completion. We should have an API that would allow users to discover/confirm that a such deletion operation was in progress. Perhaps this suggests we should reintroduce an Operation API, only properly scoped (e.g., by namespace and kind) and persisted.\r\n\r\ncc @derekwaynecarr @smarterclayton "}}