[BUGFIX] Update nginx deployment to mount nginx.conf as file #7150
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR does
At the moment, the nginx-config configmap is mounted as folder, masking everything else that is located in
/etc/nginx
.I'm trying to load a module in the
nginx.conf
withload_module modules/ngx_http_js_module.so;
.With the current setup, this fails with the following logs:
/docker-entrypoint.sh: No files found in /docker-entrypoint.d/, skipping configuration 2023/05/09 11:46:27 [emerg] 1#1: dlopen() "/etc/nginx/modules/ngx_http_js_module.so" failed (/etc/nginx/modules/ngx_http_js_module.so: cannot open shared object file: No such file or directory) in /etc/nginx/nginx.conf:1 nginx: [emerg] dlopen() "/etc/nginx/modules/ngx_http_js_module.so" failed (/etc/nginx/modules/ngx_http_js_module.so: cannot open shared object file: No such file or directory) in /etc/nginx/nginx.conf:1
With the proposed change, the
nginx.conf
file is still mounted to/etc/nginx/nginx.conf
, however loading modules is now possible.Unfortunately, I did not find any parameters to nginx which would allow an alternative module path (e.g. in
/usr/lib/nginx/modules
) and since the directory is mounted read-only, it is not possible copying the module through an entrypoint script.Alternative fixes would include larger changes, such as moving the config volume & mount to the
values.yaml
Which issue(s) this PR fixes or relates to
Recreates #4954
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]
.about-versioning.md
updated with experimental features.