Skip to content

Feat/ingress regex routes#42

Merged
pigri merged 2 commits into
mainfrom
feat/ingress-regex-routes
Jun 18, 2026
Merged

Feat/ingress regex routes#42
pigri merged 2 commits into
mainfrom
feat/ingress-regex-routes

Conversation

@pigri

@pigri pigri commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

No description provided.

pigri added 2 commits June 18, 2026 13:37
Gateway RegularExpression path matches and nginx use-regex Ingress paths
were dropped ("no regex path support"), but synapse supports regex
routing via match_expr. Render them as match_expr regex routes instead:

- routeCfg.matchExpr + annSettings.useRegex; addRegexRoute() keyed by the
  regex (first-writer-wins), match_expr = http.request.path matches "<re>"
- emit match_expr in both the v1 and v2 upstreams schemas
- rulePaths returns prefixes + regexes; HTTPRoute RegularExpression and
  Ingress paths under nginx.ingress.kubernetes.io/use-regex now produce
  regex routes (primary host + server-aliases)

Tests: TestRulePaths updated; new TestRegexRouteRender covers v1+v2.
An Ingress/HTTPRoute path regex matches from the beginning of the request
path (nginx use-regex / Gateway semantics); k8s also requires the stored
Ingress path to begin with "/", so the leading ^ is supplied by the
renderer. Prevents an unanchored match (e.g. /x/api/runs/1/stream).
@pigri pigri merged commit 26d2f99 into main Jun 18, 2026
4 checks passed
@pigri pigri deleted the feat/ingress-regex-routes branch June 18, 2026 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant