@@ -704,7 +704,7 @@ func (n *NGINXController) OnUpdate(ingressCfg ingress.Configuration) error {
704704 }
705705
706706 if klog .V (2 ).Enabled () {
707- src , err := os .ReadFile (cfgPath )
707+ src , err := os .ReadFile (cfgPath () )
708708 if err != nil {
709709 return err
710710 }
@@ -719,7 +719,7 @@ func (n *NGINXController) OnUpdate(ingressCfg ingress.Configuration) error {
719719 return err
720720 }
721721 //nolint:gosec //Ignore G204 error
722- diffOutput , err := exec .Command ("diff" , "-I" , "'# Configuration.*'" , "-u" , cfgPath , tmpfile .Name ()).CombinedOutput ()
722+ diffOutput , err := exec .Command ("diff" , "-I" , "'# Configuration.*'" , "-u" , cfgPath () , tmpfile .Name ()).CombinedOutput ()
723723 if err != nil {
724724 if exitError , ok := err .(* exec.ExitError ); ok {
725725 ws , ok := exitError .Sys ().(syscall.WaitStatus )
@@ -740,7 +740,7 @@ func (n *NGINXController) OnUpdate(ingressCfg ingress.Configuration) error {
740740 }
741741 }
742742
743- err = os .WriteFile (cfgPath , content , file .ReadWriteByUser )
743+ err = os .WriteFile (cfgPath () , content , file .ReadWriteByUser )
744744 if err != nil {
745745 return err
746746 }
@@ -1105,7 +1105,7 @@ func (n *NGINXController) createLuaConfig(cfg *ngx_config.Configuration) error {
11051105 if err != nil {
11061106 return err
11071107 }
1108- return os .WriteFile (luaCfgPath , jsonCfg , file .ReadWriteByUser )
1108+ return os .WriteFile (luaCfgPath () , jsonCfg , file .ReadWriteByUser )
11091109}
11101110
11111111func cleanTempNginxCfg () error {
0 commit comments