{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes-incubator/apiserver-builder/issues/236","repository_url":"https://api.github.com/repos/kubernetes-incubator/apiserver-builder","labels_url":"https://api.github.com/repos/kubernetes-incubator/apiserver-builder/issues/236/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes-incubator/apiserver-builder/issues/236/comments","events_url":"https://api.github.com/repos/kubernetes-incubator/apiserver-builder/issues/236/events","html_url":"https://github.com/kubernetes-incubator/apiserver-builder/issues/236","id":316657199,"number":236,"title":"[Question]How could I know if the intention is for create, update or delete when Reconcile called","user":{"login":"keshin","id":531949,"avatar_url":"https://avatars0.githubusercontent.com/u/531949?v=4","gravatar_id":"","url":"https://api.github.com/users/keshin","html_url":"https://github.com/keshin","followers_url":"https://api.github.com/users/keshin/followers","following_url":"https://api.github.com/users/keshin/following{/other_user}","gists_url":"https://api.github.com/users/keshin/gists{/gist_id}","starred_url":"https://api.github.com/users/keshin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keshin/subscriptions","organizations_url":"https://api.github.com/users/keshin/orgs","repos_url":"https://api.github.com/users/keshin/repos","events_url":"https://api.github.com/users/keshin/events{/privacy}","received_events_url":"https://api.github.com/users/keshin/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-04-23T04:22:43Z","updated_at":"2018-04-27T16:14:58Z","closed_at":"2018-04-27T16:14:58Z","author_association":"NONE","body":"I tried this tool, the code structure is very clear and easy to understand, while I have question when Reconcile of Controller get called.\r\n1. How could I know if is for creating, updating or deletion when the Reconcile get called?\r\n2. If it is updating, how could I get the old value/instance of the resource?\r\n\r\nThe reason I ask is my controller needs to go different approach with another service in case of creating and updating, while I didn't see a way to distinguish them.\r\n\r\nMany thanks.\r\nKeshin"},"comment":{"url":"https://api.github.com/repos/kubernetes-incubator/apiserver-builder/issues/comments/385019429","html_url":"https://github.com/kubernetes-incubator/apiserver-builder/issues/236#issuecomment-385019429","issue_url":"https://api.github.com/repos/kubernetes-incubator/apiserver-builder/issues/236","id":385019429,"user":{"login":"pwittrock","id":7882754,"avatar_url":"https://avatars0.githubusercontent.com/u/7882754?v=4","gravatar_id":"","url":"https://api.github.com/users/pwittrock","html_url":"https://github.com/pwittrock","followers_url":"https://api.github.com/users/pwittrock/followers","following_url":"https://api.github.com/users/pwittrock/following{/other_user}","gists_url":"https://api.github.com/users/pwittrock/gists{/gist_id}","starred_url":"https://api.github.com/users/pwittrock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pwittrock/subscriptions","organizations_url":"https://api.github.com/users/pwittrock/orgs","repos_url":"https://api.github.com/users/pwittrock/repos","events_url":"https://api.github.com/users/pwittrock/events{/privacy}","received_events_url":"https://api.github.com/users/pwittrock/received_events","type":"User","site_admin":false},"created_at":"2018-04-27T16:14:58Z","updated_at":"2018-04-27T16:14:58Z","author_association":"CONTRIBUTOR","body":"You really don't want to do this because events maybe batched together.  e.g. a reconcile may see the results of a create and 2 updates."}}
{"actor":{"display_login":"pwittrock"}}