refactor: use AddEventHandlerWithOptions in cronjob and certificates#139641
refactor: use AddEventHandlerWithOptions in cronjob and certificates#139641ogulcanaydogan wants to merge 1 commit into
Conversation
Migrate plain AddEventHandler calls in the cronjob and certificate
signing request controllers to AddEventHandlerWithOptions with
cache.HandlerOptions{Logger: &logger} so the contextual logger is
propagated into the informer handler goroutines.
The logger is already in scope at each call site (klog.FromContext(ctx))
so this is a pure API migration with no behaviour change.
Fixes: kubernetes#126379
Signed-off-by: Ogulcan Aydogan <ogulcanaydogan@hotmail.com>
|
/sig apps |
|
/sig auth |
|
Hi @ogulcanaydogan. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/release-note-none |

Migrate plain
AddEventHandlercalls inpkg/controller/cronjobandpkg/controller/certificatestoAddEventHandlerWithOptionswithcache.HandlerOptions{Logger: &logger}, so the contextual logger is propagated into the informer handler goroutines.The logger is already in scope at each call site (
klog.FromContext(ctx)) so this is a pure API migration with no behaviour change.Files changed (2):
pkg/controller/cronjob/cronjob_controllerv2.go(2 call sites)pkg/controller/certificates/certificate_controller.go(1 call site)Fixes: #126379