Skip to content

Conversation

sarthyparty
Copy link
Contributor

@sarthyparty sarthyparty commented Jun 20, 2024

Proposed changes

Problem: Nginx templates didn't support TLS passthrough inside stream block

Solution: I added nginx template for stream servers and also added a Layer4Server type to data plane

Testing: Tested the conversion from data plane type to nginx template

Please focus on (optional): If you any specific areas where you would like reviewers to focus their attention or provide
specific feedback, add them here.

Closes #ISSUE

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.


@github-actions github-actions bot added enhancement New feature or request helm-chart Relates to helm chart labels Jun 20, 2024
@sarthyparty sarthyparty requested a review from kate-osborn June 20, 2024 20:13
@sarthyparty
Copy link
Contributor Author

I didn't add anything to data plane for upstreams yet, I was thinking of reusing the existing type BackendGroup and just adding an IsStream boolean

@sarthyparty sarthyparty force-pushed the feature/add-nginx-template-config-for-tls-route branch 2 times, most recently from d76b1c4 to d48dba2 Compare June 20, 2024 20:23
Copy link
Contributor

@kate-osborn kate-osborn left a comment

Choose a reason for hiding this comment

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

@sarthyparty nice work! Please see my review

@sarthyparty sarthyparty force-pushed the feature/add-nginx-template-config-for-tls-route branch from eb22a09 to fa2812f Compare June 21, 2024 19:27
Parameters: []http.MapParameter{
{
Value: t.Hostname,
Result: "unix:/var/lib/nginx/" + t.Hostname + fmt.Sprint(t.Port) + ".sock",
Copy link
Contributor

Choose a reason for hiding this comment

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

Hostnames can have * which are not valid characters for file names.

  • are fine :)
server {
    listen unix:/var/run/*.server.sock;
    access_log off;

    return 200 "hello\n";
}
ls /var/run/*.sock
'/var/run/*.server.sock'

@sarthyparty sarthyparty force-pushed the feature/add-nginx-template-config-for-tls-route branch from a5e35b7 to af649df Compare June 26, 2024 20:34
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Jun 26, 2024
@sarthyparty sarthyparty marked this pull request as ready for review June 26, 2024 20:35
@sarthyparty sarthyparty requested review from a team as code owners June 26, 2024 20:35
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 we rebase the feature branch feature/tls-passthrough on main to reduce the diff in this PR? Some extra stuff in there from other unrelated commits.

@@ -170,7 +170,7 @@ func newEventHandlerImpl(cfg eventHandlerConfig) *eventHandlerImpl {

func (h *eventHandlerImpl) HandleEventBatch(ctx context.Context, logger logr.Logger, batch events.EventBatch) {
start := time.Now()
logger.V(1).Info("Started processing event batch")
logger.V(1).Info("Started processing event batch hello", "name", "sarthak")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Debugging log can be removed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok will do

@sarthyparty sarthyparty force-pushed the feature/add-nginx-template-config-for-tls-route branch from 23f8b38 to 47ba96e Compare June 26, 2024 21:37
@github-actions github-actions bot removed the documentation Improvements or additions to documentation label Jun 26, 2024
@pleshakov
Copy link
Contributor

would it make sense to enable GitHub pipeline including linting for the branch feature/tls-passthrough ?

@kate-osborn
Copy link
Contributor

kate-osborn commented Jun 27, 2024

would it make sense to enable GitHub pipeline including linting for the branch feature/tls-passthrough ?

Yes, definitely, good catch.

@lucacome what's the best way to do that? Should I just add the feature branch name to the on push in ci.yml on the feature branch?

Copy link
Contributor

@kate-osborn kate-osborn left a comment

Choose a reason for hiding this comment

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

Leaving a partial review. I'm about half-way through, but want to give you something to work on while I finish.

Copy link

codecov bot commented Jun 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.79%. Comparing base (04cfbc3) to head (3f5ee8b).

Additional details and impacted files
@@                     Coverage Diff                     @@
##           feature/tls-passthrough    #2166      +/-   ##
===========================================================
+ Coverage                    87.59%   87.79%   +0.20%     
===========================================================
  Files                           96       98       +2     
  Lines                         6698     6810     +112     
  Branches                        50       50              
===========================================================
+ Hits                          5867     5979     +112     
  Misses                         774      774              
  Partials                        57       57              

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

@sarthyparty sarthyparty requested a review from kate-osborn July 1, 2024 20:49
sarthyparty and others added 5 commits July 1, 2024 14:52
Problem: nginx configuration templates didn't support TLS passthrough

Solution: I added a template setup fro stream servers
@sarthyparty sarthyparty requested a review from kate-osborn July 2, 2024 20:40
@sarthyparty sarthyparty requested a review from sjberman July 3, 2024 14:59
@sarthyparty sarthyparty requested a review from pleshakov July 5, 2024 18:50
@sarthyparty sarthyparty merged commit 1bc8be4 into nginx:feature/tls-passthrough Jul 8, 2024
sarthyparty added a commit that referenced this pull request Jul 8, 2024
Update nginx template for TLS passthrough

Problem: nginx configuration templates didn't support TLS passthrough

Solution: I added a template setup fro stream servers
sarthyparty added a commit to sarthyparty/nginx-gateway-fabric that referenced this pull request Jul 23, 2024
Update nginx template for TLS passthrough

Problem: nginx configuration templates didn't support TLS passthrough

Solution: I added a template setup fro stream servers
sarthyparty added a commit to sarthyparty/nginx-gateway-fabric that referenced this pull request Jul 23, 2024
Update nginx template for TLS passthrough

Problem: nginx configuration templates didn't support TLS passthrough

Solution: I added a template setup fro stream servers
sarthyparty added a commit that referenced this pull request Jul 23, 2024
Update nginx template for TLS passthrough

Problem: nginx configuration templates didn't support TLS passthrough

Solution: I added a template setup fro stream servers
sarthyparty added a commit to sarthyparty/nginx-gateway-fabric that referenced this pull request Jul 23, 2024
Update nginx template for TLS passthrough

Problem: nginx configuration templates didn't support TLS passthrough

Solution: I added a template setup fro stream servers
sarthyparty added a commit to sarthyparty/nginx-gateway-fabric that referenced this pull request Jul 31, 2024
Update nginx template for TLS passthrough

Problem: nginx configuration templates didn't support TLS passthrough

Solution: I added a template setup fro stream servers
sarthyparty added a commit to sarthyparty/nginx-gateway-fabric that referenced this pull request Aug 7, 2024
Update nginx template for TLS passthrough

Problem: nginx configuration templates didn't support TLS passthrough

Solution: I added a template setup fro stream servers
sarthyparty added a commit that referenced this pull request Aug 8, 2024
Update nginx template for TLS passthrough

Problem: nginx configuration templates didn't support TLS passthrough

Solution: I added a template setup fro stream servers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request helm-chart Relates to helm chart
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants