nginxinc / nginx-loadbalancer-kubernetes

A Kubernetes Controller to synchronize NGINX+ Resources with Kubernetes Ingress Resources
Apache License 2.0
58 stars 19 forks source link

Ensure Informer is not nil in initializeEventHandlers Method #130

Open ciroque opened 11 months ago

ciroque commented 11 months ago

In the Run method, there's a check for nil informer but no such check in initializeEventHandlers method which also accesses the informer. It would be prudent to add a nil check for the informer in the initializeEventHandlers method to avoid potential nil pointer dereference issues.