Skip to content

Conversation

ciarams87
Copy link
Contributor

Proposed changes

Problem: NGF does not support routing to services outside the cluster

Solution: Add support for ExternalName type Services.

Testing: Tested locally targeting httpbin.org for both HTTPRoute and TLSRoute

Closes #243

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.

Added support for ExternalName Service

@ciarams87 ciarams87 requested a review from a team as a code owner August 19, 2025 15:56
@github-actions github-actions bot added documentation Improvements or additions to documentation enhancement New feature or request helm-chart Relates to helm chart labels Aug 19, 2025
Copy link

codecov bot commented Aug 19, 2025

Codecov Report

❌ Patch coverage is 97.59036% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.00%. Comparing base (5688ba8) to head (b5c2241).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
internal/controller/nginx/config/upstreams.go 83.33% 2 Missing and 1 partial ⚠️
internal/controller/state/dataplane/convert.go 66.66% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3759      +/-   ##
==========================================
+ Coverage   86.87%   87.00%   +0.13%     
==========================================
  Files         128      128              
  Lines       16202    16404     +202     
  Branches       62       62              
==========================================
+ Hits        14075    14273     +198     
- Misses       1953     1956       +3     
- Partials      174      175       +1     

☔ 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.

@ciarams87 ciarams87 force-pushed the feat/externalname-svc branch from 474d729 to 9fbb003 Compare August 20, 2025 18:20
Copy link
Collaborator

@sjberman sjberman left a comment

Choose a reason for hiding this comment

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

Can I make one small request to be added in this PR? Though irrelevant, I don't think it warrants a brand new PR.

In the servers nginx template, right after js_preload_object, can you add another newline? I've noticed in some rendered nginx configs, a server block renders on the same line and it looks off.

@ciarams87 ciarams87 force-pushed the feat/externalname-svc branch from 9fbb003 to 1608048 Compare August 21, 2025 10:24
Copy link
Contributor

@shaun-nx shaun-nx left a comment

Choose a reason for hiding this comment

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

All looks great from what I can see. Left two comments that aren't blocking the PR. Great job @ciarams87! 🎉

Problem: NGF does not support routing to services outside the cluster

Solution: Add support for ExternalName type Services
@ciarams87 ciarams87 force-pushed the feat/externalname-svc branch from 75e8c95 to b5c2241 Compare August 21, 2025 17:51
@ciarams87 ciarams87 enabled auto-merge (squash) August 21, 2025 17:52
@ciarams87 ciarams87 merged commit fc6aa9a into main Aug 21, 2025
50 of 51 checks passed
@ciarams87 ciarams87 deleted the feat/externalname-svc branch August 21, 2025 18:18
@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in NGINX Gateway Fabric Aug 21, 2025
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 release-notes
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Support for ExternalName Service
3 participants