kubernetes / sample-controller

Repository for sample controller. Complements sample-apiserver
Apache License 2.0
3.18k stars 1.1k forks source link

Why I can delete the CRD resource Foo but I can't find the DeleteFunc in FooInformer? #33

Closed yhfeng666 closed 5 years ago

yhfeng666 commented 5 years ago

Just as the title shows,I can create the Foo CRD and then create or delete the Foo resource I created after I build the project but I can't find the DeleteFunc in the fooinformer.Informer().AddEventHandler().

devdattakulkarni commented 5 years ago

I think the reason this works is client-go machinery might be providing default delete handlers. You can override that by adding a DeleteFunc in AddEventHandler for some special handling.

yhfeng666 commented 5 years ago

I think the reason this works is client-go machinery might be providing default delete handlers. You can override that by adding a DeleteFunc in AddEventHandler for some special handling.

@devdattakulkarni Maybe you are true.But I want to know how the controller works when it receives a delete request.

fejta-bot commented 5 years ago

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale

fejta-bot commented 5 years ago

Stale issues rot after 30d of inactivity. Mark the issue as fresh with /remove-lifecycle rotten. Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle rotten

fejta-bot commented 5 years ago

Rotten issues close after 30d of inactivity. Reopen the issue with /reopen. Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /close

k8s-ci-robot commented 5 years ago

@fejta-bot: Closing this issue.

In response to [this](https://github.com/kubernetes/sample-controller/issues/33#issuecomment-482774593): >Rotten issues close after 30d of inactivity. >Reopen the issue with `/reopen`. >Mark the issue as fresh with `/remove-lifecycle rotten`. > >Send feedback to sig-testing, kubernetes/test-infra and/or [fejta](https://github.com/fejta). >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.