@@ -704,7 +704,7 @@ func (n *NGINXController) OnUpdate(ingressCfg ingress.Configuration) error {
704704}
705705
706706if klog .V (2 ).Enabled () {
707- src , err := os .ReadFile (cfgPath )
707+ src , err := os .ReadFile (cfgPath () )
708708if err != nil {
709709return err
710710}
@@ -719,7 +719,7 @@ func (n *NGINXController) OnUpdate(ingressCfg ingress.Configuration) error {
719719return 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 ()
723723if err != nil {
724724if exitError , ok := err .(* exec.ExitError ); ok {
725725ws , 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 )
744744if err != nil {
745745return err
746746}
@@ -1105,7 +1105,7 @@ func (n *NGINXController) createLuaConfig(cfg *ngx_config.Configuration) error {
11051105if err != nil {
11061106return 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