{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/27193","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/27193/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/27193/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/27193/events","html_url":"https://github.com/kubernetes/kubernetes/pull/27193","id":159696708,"number":27193,"title":"Pass object being deleted to admission controller","user":{"login":"tcahill","id":3255190,"avatar_url":"https://avatars.githubusercontent.com/u/3255190?v=3","gravatar_id":"","url":"https://api.github.com/users/tcahill","html_url":"https://github.com/tcahill","followers_url":"https://api.github.com/users/tcahill/followers","following_url":"https://api.github.com/users/tcahill/following{/other_user}","gists_url":"https://api.github.com/users/tcahill/gists{/gist_id}","starred_url":"https://api.github.com/users/tcahill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tcahill/subscriptions","organizations_url":"https://api.github.com/users/tcahill/orgs","repos_url":"https://api.github.com/users/tcahill/repos","events_url":"https://api.github.com/users/tcahill/events{/privacy}","received_events_url":"https://api.github.com/users/tcahill/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/kind/api-change","name":"kind/api-change","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/release-note-label-needed","name":"release-note-label-needed","color":"db5a64"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/size/L","name":"size/L","color":"ee9900"}],"state":"open","locked":false,"assignee":{"login":"lavalamp","id":647318,"avatar_url":"https://avatars.githubusercontent.com/u/647318?v=3","gravatar_id":"","url":"https://api.github.com/users/lavalamp","html_url":"https://github.com/lavalamp","followers_url":"https://api.github.com/users/lavalamp/followers","following_url":"https://api.github.com/users/lavalamp/following{/other_user}","gists_url":"https://api.github.com/users/lavalamp/gists{/gist_id}","starred_url":"https://api.github.com/users/lavalamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lavalamp/subscriptions","organizations_url":"https://api.github.com/users/lavalamp/orgs","repos_url":"https://api.github.com/users/lavalamp/repos","events_url":"https://api.github.com/users/lavalamp/events{/privacy}","received_events_url":"https://api.github.com/users/lavalamp/received_events","type":"User","site_admin":false},"assignees":[{"login":"lavalamp","id":647318,"avatar_url":"https://avatars.githubusercontent.com/u/647318?v=3","gravatar_id":"","url":"https://api.github.com/users/lavalamp","html_url":"https://github.com/lavalamp","followers_url":"https://api.github.com/users/lavalamp/followers","following_url":"https://api.github.com/users/lavalamp/following{/other_user}","gists_url":"https://api.github.com/users/lavalamp/gists{/gist_id}","starred_url":"https://api.github.com/users/lavalamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lavalamp/subscriptions","organizations_url":"https://api.github.com/users/lavalamp/orgs","repos_url":"https://api.github.com/users/lavalamp/repos","events_url":"https://api.github.com/users/lavalamp/events{/privacy}","received_events_url":"https://api.github.com/users/lavalamp/received_events","type":"User","site_admin":false}],"milestone":null,"comments":37,"created_at":"2016-06-10T18:42:27Z","updated_at":"2016-08-20T23:24:31Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/27193","html_url":"https://github.com/kubernetes/kubernetes/pull/27193","diff_url":"https://github.com/kubernetes/kubernetes/pull/27193.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/27193.patch"},"body":"The `GetOldObject()` method on the `admission.Attributes` interface passed to `Admit` will now yield the object which is about to be deleted. This is potentially useful for admission controllers that need information about the object to determine whether the operation should proceed. In order to accomplish this:\r\n- The signature of `storage.Interface.Delete` has been modified to accept a function which takes the state of the object being deleted and returns an error to indicate whether the operation should succeed. The UID check previously being performed in this method has been refactored to be a part of this function argument.\r\n- The `rest.DeleteOptions` type was added, which contains settings from the `api.DeleteOptions` struct passed by the client and additionally includes a slice of functions which are passed down to `storage.Interface.Delete` as described above. This allows us to add more arbitrary checks prior to a delete operation being finalized.\r\n- `admission.Interface.Admit` is passed down to `storage` rather than being called directly in the delete handler. This allows us to supply the current state of the object being deleted to the admission controller without performing an additional fetch of the object.\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.kubernetes.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/27193)\n<!-- Reviewable:end -->\n"},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/241229749","html_url":"https://github.com/kubernetes/kubernetes/pull/27193#issuecomment-241229749","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/27193","id":241229749,"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-08-20T23:24:31Z","updated_at":"2016-08-20T23:24:31Z","body":"This PR hasn't been active in 30 days. It will be closed in 59 days (Oct 19, 2016).\n\ncc @lavalamp @tcahill\n\nYou can add 'keep-open' label to prevent this from happening, or add a comment to keep it open another 90 days"}}
{"actor":{"display_login":"k8s-merge-robot"}}