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

Allow configuration of NGINX Plus API access #3066

Merged
merged 8 commits into from
Jan 30, 2025

Conversation

bjee19
Copy link
Contributor

@bjee19 bjee19 commented Jan 27, 2025

Allow configuration of NGINX Plus API access.

Problem: We want the ability to configure access to the NGINX Plus dashboard.

Solution: Add a field AllowedAddresses in the NginxProxy API to allow the user to configure access to the NGINX Plus dashboard.

Testing: Unit tests. Manually configured an NginxProxy resource, set up a Kind cluster with a Nodeport following our Get started guide, and confirmed that I could access the dashboard without needing to port-forward. Verified nginx plus template code is present when running on nginx plus and not present when running on nginx oss.

Closes #2716

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.

Allow configuration of NGINX Plus API access. 

@bjee19 bjee19 requested review from a team as code owners January 27, 2025 19:14
@github-actions github-actions bot added documentation Improvements or additions to documentation enhancement New feature or request labels Jan 27, 2025
Copy link
Contributor

Deploy Preview will be available once build job completes!

Name Link
😎 Deploy Preview https://frontdoor-test-docs.nginx.com/previews/nginx-gateway-fabric/3066/

Copy link

codecov bot commented Jan 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.06%. Comparing base (7a08f11) to head (b538622).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3066      +/-   ##
==========================================
+ Coverage   90.00%   90.06%   +0.05%     
==========================================
  Files         111      112       +1     
  Lines       11501    11570      +69     
  Branches       50       50              
==========================================
+ Hits        10351    10420      +69     
  Misses       1089     1089              
  Partials       61       61              

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

@sjberman
Copy link
Collaborator

The values.yaml helm file should also be updated with the schema for this field. We'll also want to update the NGINX Dashboard document to mention that this value can be changed to allow access from different sources. A brief overview on how to set it up at install time or updating at runtime in the NginxProxy resource can be mentioned, with a link to the data plane configuration doc for more details.

@github-actions github-actions bot added the helm-chart Relates to helm chart label Jan 29, 2025
@bjee19
Copy link
Contributor Author

bjee19 commented Jan 30, 2025

Realized I hadn't added any checks to NOT generate the nginx plus template code when running on oss. Added those checks by not populating the NginxPlus Configuration resource if we are running not in plus. Manually verified that the nginx plus template code is not present when running on oss, and still is present when running on plus.

Cool that this got caught in our automated Helm chart tests.

@bjee19 bjee19 requested review from sjberman and salonichf5 January 30, 2025 17:35
Copy link
Contributor

@salonichf5 salonichf5 left a comment

Choose a reason for hiding this comment

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

looks good to me

@bjee19 bjee19 force-pushed the enh/set-plus-dashboard-ip-addresses branch from 69292b8 to b538622 Compare January 30, 2025 20:10
@bjee19 bjee19 merged commit 833a608 into main Jan 30, 2025
50 checks passed
@bjee19 bjee19 deleted the enh/set-plus-dashboard-ip-addresses branch January 30, 2025 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request helm-chart Relates to helm chart
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

nginx plus dashboard from something other than 127.0.0.1
4 participants