nginx-gateway-fabric
nginx-gateway-fabric copied to clipboard
Fix bug where user mounted files were being removed by agent
Proposed changes
Fix bug where user mounted files were being removed by agent.
Problem: User mounted files are being removed by nginx agent.
Solution: Mark user mounted files as unmanaged so nginx agent doesn't remove them. To do so we use agent's UpdateOverview function to get all files referenced in the nginx conf. We compare that with the user added volumeMounts and mark any files that were user mounted as unmanaged, ensuring nginx agent doesn't remove them.
Testing: Added unit tests and manual testing.
Closes #3776
Checklist
Before creating a PR, run through this checklist and mark each as complete.
- [x] I have read the CONTRIBUTING doc
- [x] I have added tests that prove my fix is effective or that my feature works
- [x] I have checked that all unit tests pass after adding my changes
- [ ] I have updated necessary documentation
- [x] I have rebased my branch onto main
- [x] I will ensure my PR is targeting the main branch and pulling from my branch from my own fork
Release notes
If this PR introduces a change that affects users and needs to be mentioned in the release notes, please add a brief note that summarizes the change.
Fix bug where user mounted files were being removed by NGINX.