Skip to content

Conversation

shaun-nx
Copy link
Contributor

@shaun-nx shaun-nx commented Oct 2, 2025

Proposed changes

This change updates references to /usr/lib/nginx/modues to use the relative path modules/<module_to_load>
By default NGINX creates a symlink from /etc/nginx/modules/ to the appropriate module dir based on the base image used

Closes #4002

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto main
  • 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.

NONE

@shaun-nx shaun-nx changed the base branch from main to feat/openshift-support October 2, 2025 09:30
@github-actions github-actions bot added documentation Improvements or additions to documentation chore Pull requests for routine tasks helm-chart Relates to helm chart labels Oct 2, 2025
@ciarams87 ciarams87 mentioned this pull request Oct 2, 2025
6 tasks
ciarams87 and others added 4 commits October 2, 2025 11:06
@github-actions github-actions bot removed documentation Improvements or additions to documentation helm-chart Relates to helm chart labels Oct 2, 2025
Copy link

codecov bot commented Oct 2, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.80%. Comparing base (28d8e3f) to head (a65cba6).
⚠️ Report is 1 commits behind head on feat/openshift-support.

Additional details and impacted files
@@                    Coverage Diff                     @@
##           feat/openshift-support    #4004      +/-   ##
==========================================================
+ Coverage                   86.77%   86.80%   +0.03%     
==========================================================
  Files                         128      128              
  Lines                       16607    16607              
  Branches                       62       62              
==========================================================
+ Hits                        14410    14416       +6     
+ Misses                       2012     2008       -4     
+ Partials                      185      183       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@shaun-nx shaun-nx changed the title Chore/module dir Use relative module path for both UBI and Alpine builds Oct 2, 2025
@shaun-nx shaun-nx marked this pull request as ready for review October 2, 2025 10:30
@shaun-nx shaun-nx requested a review from a team as a code owner October 2, 2025 10:30

# Configure directories and logging
RUN mkdir -p /usr/lib/nginx/modules /var/run/nginx /usr/lib64/nginx/modules \
RUN mkdir -p /var/run/nginx /usr/lib64/nginx/modules \
Copy link
Contributor

Choose a reason for hiding this comment

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

why not to make /usr/lib64/nginx/modules env variable?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't quite understand.
If we set /usr/lib64/nginx/modules as an env variable (e.g. export LIB_DIR=/usr/lib64/nginx/modules ) does that mean we can avoid making the directory?

Copy link
Contributor

Choose a reason for hiding this comment

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

no, just having it to edit in one place

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think it should be an ENV var because then it's technically over writable at build time which is not what we want here. It's correct to be explicit here - and anyway it's only specified in the file twice.

@shaun-nx shaun-nx requested a review from tataruty October 2, 2025 10:41
tests/go.mod Outdated
replace github.com/nginx/nginx-gateway-fabric/v2 => ../

require (
github.com/nginx/nginx-gateway-fabric/v2 v2.1.1
Copy link
Contributor

Choose a reason for hiding this comment

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

I'll rebase the base branch to main again so that we don't need these changes here

@ciarams87 ciarams87 force-pushed the feat/openshift-support branch from 4504014 to 28d8e3f Compare October 2, 2025 10:46
@shaun-nx shaun-nx requested a review from ciarams87 October 2, 2025 10:48
@shaun-nx shaun-nx merged commit d609c5a into feat/openshift-support Oct 2, 2025
54 checks passed
@shaun-nx shaun-nx deleted the chore/module-dir branch October 2, 2025 12:29
@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in NGINX Gateway Fabric Oct 2, 2025
This was referenced Oct 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Pull requests for routine tasks

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Use relative module path for both UBI and Alpine builds

3 participants