Not found errors still occur in finalizers #2440
-
I use finalizers to delete dependence, but it will occurs error of "unable to fetch CRD" Although this will not be a problem because it is only connected to the current Reconciile, I still don't want any errors. How can I solve this problem I really appreciate any help with this |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi @moluzhui, Are you fetching the resource in the beginner of your reconcile as it is done in the example: https://github.com/operator-framework/operator-sdk/blob/master/testdata/go/v3/memcached-operator/controllers/memcached_controller.go#L62-L76? Are you adding the finalizers inside of the logic to ensure that is only called when the resource is found? (e.g. https://sdk.operatorframework.io/docs/building-operators/golang/advanced-topics/#external-resources) |
Beta Was this translation helpful? Give feedback.
-
Closing since it is answered. |
Beta Was this translation helpful? Give feedback.
Hi @moluzhui,
Are you fetching the resource in the beginner of your reconcile as it is done in the example: https://github.com/operator-framework/operator-sdk/blob/master/testdata/go/v3/memcached-operator/controllers/memcached_controller.go#L62-L76?
Are you adding the finalizers inside of the logic to ensure that is only called when the resource is found? (e.g. https://sdk.operatorframework.io/docs/building-operators/golang/advanced-topics/#external-resources)