Why does the nginx sidecar mount data and config?
Nobody has claimed this yet.
- Dominant language
- Go Template
- Stars
- 534
- Forks
- 314
- Avg merge
- 42m
- Merged PRs (30d)
- 1
Description
The nginx sidecar gets data, config and /var/www/tmp mounted, and I can't work out what it uses them for.
The default server block already refuses both paths (files/nginx.config.tpl):
location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)(?:$|/) { return 404; }
That's a regex location declared before the static file ones, so it matches first and nginx never touches the filesystem for those URLs. And /var/www/tmp sits outside root /var/www/html, so it isn't reachable at all.
Am I missing a case where nginx actually needs to read them? Asking partly because #816 is adding a dataVolumeMount flag that also applies to the nginx container, and if the mount is never used there then it does not need the flag either. Dropping the three mounts would also mean the internet-facing container no longer has the user data directory attached, and would sidestep the /var/www/html/config ownership trouble in #335.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the nginx sidecar mount definitions and files/nginx.config.tpl, then trace whether the mounted data, config, and /var/www/tmp paths are used. Compare the result with the dataVolumeMount change in #816 and the ownership concern in #335. Done means documenting the need for each mount and updating the chart if any are unnecessary.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- helm, kubernetes, nginx
- Domain
- devops, infrastructure
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100