-
Notifications
You must be signed in to change notification settings - Fork 141
Fix bug where user mounted files were being removed by agent #4178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Will add more details on manual testing below, then will mark PR as ready to review. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4178 +/- ##
==========================================
+ Coverage 86.01% 86.03% +0.01%
==========================================
Files 131 131
Lines 14111 14142 +31
Branches 35 35
==========================================
+ Hits 12138 12167 +29
- Misses 1771 1773 +2
Partials 202 202 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
With these yamls: And a modified NginxProxy: I've verified that the certs are able to be mounted. (that tls key is the same we use in our public examples, not a real secret). |
|
@ciarams87 and other reviewers, one thing to note is if a user is to add a volumeMount that is an existing directory / other nginx conf files are in it, those will be marked as unmanaged and will make agent fail to startup (I tried With our current constraints, I can't think of a way around this, so I think it is fine to require users to mount their files into a new directory. Any thoughts? |
3637ed2 to
6981901
Compare
@bjee19 So That makes a lot of sense, and we should absolutely require users mount their files into a new directory. We should clearly document that new volume mounts cannot conflict with our internal volume mounts and folder structure. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
yep |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great job 🥳
243a898 to
b56c970
Compare
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.
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.