@@ -704,7 +704,7 @@ func (n *NGINXController) OnUpdate(ingressCfg ingress.Configuration) error {
704
704
}
705
705
706
706
if klog .V (2 ).Enabled () {
707
- src , err := os .ReadFile (cfgPath )
707
+ src , err := os .ReadFile (cfgPath () )
708
708
if err != nil {
709
709
return err
710
710
}
@@ -719,7 +719,7 @@ func (n *NGINXController) OnUpdate(ingressCfg ingress.Configuration) error {
719
719
return err
720
720
}
721
721
//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 ()
723
723
if err != nil {
724
724
if exitError , ok := err .(* exec.ExitError ); ok {
725
725
ws , ok := exitError .Sys ().(syscall.WaitStatus )
@@ -740,7 +740,7 @@ func (n *NGINXController) OnUpdate(ingressCfg ingress.Configuration) error {
740
740
}
741
741
}
742
742
743
- err = os .WriteFile (cfgPath , content , file .ReadWriteByUser )
743
+ err = os .WriteFile (cfgPath () , content , file .ReadWriteByUser )
744
744
if err != nil {
745
745
return err
746
746
}
@@ -1105,7 +1105,7 @@ func (n *NGINXController) createLuaConfig(cfg *ngx_config.Configuration) error {
1105
1105
if err != nil {
1106
1106
return err
1107
1107
}
1108
- return os .WriteFile (luaCfgPath , jsonCfg , file .ReadWriteByUser )
1108
+ return os .WriteFile (luaCfgPath () , jsonCfg , file .ReadWriteByUser )
1109
1109
}
1110
1110
1111
1111
func cleanTempNginxCfg () error {
0 commit comments