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

Exact PathMatch support for HTTPRoutes #603

Merged
merged 7 commits into from
May 4, 2023

Conversation

sjberman
Copy link
Contributor

@sjberman sjberman commented May 1, 2023

Add support for Exact PathMatch in an HTTPRoute. Internal locations now include the type of path (prefix, exact, regex) in the path name to distinguish between the possibility of the same path name being used with different path match types.

nginx conf is updated to include "= " in the location path if that path has been defined as "Exact".

Closes #476

  • 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

@sjberman sjberman requested a review from a team as a code owner May 1, 2023 16:27
@github-actions github-actions bot added the documentation Improvements or additions to documentation label May 1, 2023
@sjberman sjberman added the enhancement New feature or request label May 1, 2023
@sjberman sjberman force-pushed the exact-path-match branch from a6cde69 to ab97cc2 Compare May 1, 2023 17:59
@github-actions github-actions bot removed the enhancement New feature or request label May 1, 2023
@kate-osborn kate-osborn added the enhancement New feature or request label May 1, 2023
docs/gateway-api-compatibility.md Outdated Show resolved Hide resolved
internal/state/graph/httproute_test.go Outdated Show resolved Hide resolved
internal/state/dataplane/configuration_test.go Outdated Show resolved Hide resolved
internal/nginx/config/servers.go Outdated Show resolved Hide resolved
internal/nginx/config/servers_test.go Outdated Show resolved Hide resolved
internal/nginx/config/servers_test.go Outdated Show resolved Hide resolved
@kate-osborn
Copy link
Contributor

@sjberman it would be nice to have an example that uses Exact Path Match. We probably don't need a new example, but maybe one of the routes in the cafe-example could be updated to use Exact instead of Prefix.

Since we aren't running conformance tests yet, we don't have a way to ensure we haven't regressed. We typically run through the examples before releasing as a sanity check to ensure we haven't broken any features.

docs/gateway-api-compatibility.md Outdated Show resolved Hide resolved
internal/nginx/config/servers_template.go Show resolved Hide resolved
internal/nginx/config/servers.go Outdated Show resolved Hide resolved
internal/state/dataplane/configuration.go Outdated Show resolved Hide resolved
@github-actions github-actions bot removed the enhancement New feature or request label May 2, 2023
internal/nginx/config/servers.go Outdated Show resolved Hide resolved
internal/nginx/config/servers.go Outdated Show resolved Hide resolved
internal/nginx/config/servers_test.go Outdated Show resolved Hide resolved
sjberman added 6 commits May 4, 2023 11:59
Add support for Exact PathMatch in an HTTPRoute. Internal locations now include the type of path (prefix, exact, regex) in the path name to distinguish between the possibility of the same path name being used with different path match types.

nginx conf is updated to include "= " in the location path if that path has been defined as "Exact".
@sjberman sjberman force-pushed the exact-path-match branch from e49ce42 to c5113c0 Compare May 4, 2023 17:59
internal/nginx/config/servers_test.go Show resolved Hide resolved
internal/state/dataplane/configuration.go Outdated Show resolved Hide resolved
Copy link
Contributor

@pleshakov pleshakov left a comment

Choose a reason for hiding this comment

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

👍

@sjberman sjberman merged commit 1e7a7a8 into nginxinc:main May 4, 2023
@sjberman sjberman deleted the exact-path-match branch May 4, 2023 20:31
sjberman added a commit to sjberman/nginx-gateway-fabric that referenced this pull request May 4, 2023
* Exact PathMatch support for HTTPRoutes

Add support for Exact PathMatch in an HTTPRoute. Internal locations now include the type of path (prefix, exact, regex) in the path name to distinguish between the possibility of the same path name being used with different path match types.

nginx conf is updated to include "= " in the location path if that path has been defined as "Exact".
@sjberman sjberman mentioned this pull request Jul 5, 2023
@sjberman sjberman added the enhancement New feature or request label Jul 5, 2023
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
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Core API: Exact PathMatch
3 participants