fix path in file changed detected message

Signed-off-by: Tom Hayward <thayward@infoblox.com>
This commit is contained in:
Tom Hayward 2024-04-17 16:58:36 -07:00 committed by k8s-infra-cherrypick-robot
parent 6fbd58353f
commit 0abf03c7da

View file

@ -202,6 +202,7 @@ func NewNGINXController(config *Configuration, mc metric.Collector) *NGINXContro
} }
for _, f := range filesToWatch { for _, f := range filesToWatch {
f := f
_, err = file.NewFileWatcher(f, func() { _, err = file.NewFileWatcher(f, func() {
klog.InfoS("File changed detected. Reloading NGINX", "path", f) klog.InfoS("File changed detected. Reloading NGINX", "path", f)
n.syncQueue.EnqueueTask(task.GetDummyObject("file-change")) n.syncQueue.EnqueueTask(task.GetDummyObject("file-change"))