nginxinc/nginx-loadbalancer-kubernetes

Use obj2 for Updated Object in handleUpdateEvent Method

ciroque opened this issue · 0 comments

Describe the bug

The Certificates::handleUpdateEvent method uses the first argument to update the value of the Certificate. The first argument represents the old value, the second argument is the new value.

This bug will cause Certificate rotation to fail.

To reproduce

With a running nginx-loadbalancer-kubernetes, update one of the Secrets containing a Certificate. Updating the NGINX Plus host(s) may fail, depending on how aggressively certificate management is implemented.

Expected behavior

The internal state should be updated with the new certificate value.

Additional context

In the handleUpdateEvent method, it should use obj2 instead of obj to get the updated value of the object to reflect the latest changes.