Skip to content
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

[BUGFIX] Update nginx deployment to mount nginx.conf as file #7150

Merged
merged 1 commit into from
Jan 17, 2024

Conversation

blut
Copy link
Contributor

@blut blut commented Jan 17, 2024

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 with load_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

  • Tests updated.
  • Documentation added.
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX].
  • about-versioning.md updated with experimental features.

Signed-off-by: Hannes Blut (external expert on behalf of InfraGO) <hannes.blut-extern@deutschebahn.com>
@blut blut requested a review from a team as a code owner January 17, 2024 10:37
@CLAassistant
Copy link

CLAassistant commented Jan 17, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@dimitarvdimitrov dimitarvdimitrov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome, thanks for getting back to this :) LGTM

@dimitarvdimitrov dimitarvdimitrov enabled auto-merge (squash) January 17, 2024 19:14
@dimitarvdimitrov dimitarvdimitrov merged commit f8708c0 into grafana:main Jan 17, 2024
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants