Open
Conversation
Add native Gateway API route support as an alternative to traditional Ingress resources, supporting HTTPRoute, GRPCRoute, and other route kinds. Three route entry points mirror the existing ingress structure: - Top-level `route` for multi-service path-based routing - `gateway.route` for the nginx gateway component - `queryFrontend.route` for the Jaeger UI query frontend Includes auto-detection of the Gateway API version, mutual exclusivity checks with ingress, and configurable parentRefs, hostnames, matches, filters, and timeouts. Closes #296 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: drfaust92 <ilia.lazebnik@gmail.com>
…alues DRY up the three route templates by extracting common HTTPRoute/GRPCRoute rendering into a reusable `tempo.route` helper in _helpers.tpl. The individual route template files now contain only guard logic and delegate to the shared helper. Also adds CI test values file for Gateway API route rendering. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: drfaust92 <ilia.lazebnik@gmail.com>
|
@DrFaust92 Thanks for the comprehensive implementation is this tested on a live cluster ? |
| distributor: | ||
| - path: /v1/traces | ||
| pathType: PathPrefix | ||
| port: 4318 |
There was a problem hiding this comment.
port 4318 is not exposed by default unless gateway:
helm-charts/charts/tempo-distributed/values.yaml
Lines 2088 to 2090 in fba349d
and otlp http traces are enabled:
helm-charts/charts/tempo-distributed/values.yaml
Lines 1341 to 1344 in fba349d
Otherwise the HTTPRoute object states Message: no matching port for Service tempo-distributor and port 4318
Status:
Parents:
Conditions:
Last Transition Time: 2026-04-09T20:12:49Z
Message: The route is accepted
Observed Generation: 1
Reason: Accepted
Status: True
Type: Accepted
Last Transition Time: 2026-04-09T20:12:49Z
Message: no matching port for Service tempo-distributor and port 4318
Observed Generation: 1
Reason: BackendNotFound
Status: False
Type: ResolvedRefs
Controller Name: gateway.nginx.org/nginx-gateway-controller
Comment on lines
+1
to
+29
| route: | ||
| enabled: true | ||
| apiVersion: gateway.networking.k8s.io/v1 | ||
| kind: HTTPRoute | ||
| annotations: | ||
| test-annotation: test-value | ||
| labels: | ||
| test-label: test-value | ||
| hostnames: | ||
| - tempo.example.com | ||
| parentRefs: | ||
| - name: my-gateway | ||
| namespace: default | ||
| paths: | ||
| distributor: | ||
| - path: /v1/traces | ||
| pathType: PathPrefix | ||
| port: 4318 | ||
| - path: /distributor/ring | ||
| pathType: PathPrefix | ||
| ingester: | ||
| - path: /flush | ||
| pathType: PathPrefix | ||
| query-frontend: | ||
| - path: /api | ||
| pathType: PathPrefix | ||
| compactor: | ||
| - path: /compactor/ring | ||
| pathType: PathPrefix |
There was a problem hiding this comment.
To support port 4318, you'd need to gateway and otlp http traces
Suggested change
| route: | |
| enabled: true | |
| apiVersion: gateway.networking.k8s.io/v1 | |
| kind: HTTPRoute | |
| annotations: | |
| test-annotation: test-value | |
| labels: | |
| test-label: test-value | |
| hostnames: | |
| - tempo.example.com | |
| parentRefs: | |
| - name: my-gateway | |
| namespace: default | |
| paths: | |
| distributor: | |
| - path: /v1/traces | |
| pathType: PathPrefix | |
| port: 4318 | |
| - path: /distributor/ring | |
| pathType: PathPrefix | |
| ingester: | |
| - path: /flush | |
| pathType: PathPrefix | |
| query-frontend: | |
| - path: /api | |
| pathType: PathPrefix | |
| compactor: | |
| - path: /compactor/ring | |
| pathType: PathPrefix | |
| traces: | |
| otlp: | |
| http: | |
| enabled: true | |
| gateway: | |
| enabled: true | |
| route: | |
| enabled: true | |
| apiVersion: gateway.networking.k8s.io/v1 | |
| kind: HTTPRoute | |
| annotations: | |
| test-annotation: test-value | |
| labels: | |
| test-label: test-value | |
| hostnames: | |
| - tempo.example.com | |
| parentRefs: | |
| - name: my-gateway | |
| namespace: default | |
| paths: | |
| distributor: | |
| - path: /v1/traces | |
| pathType: PathPrefix | |
| port: 4318 | |
| - path: /distributor/ring | |
| pathType: PathPrefix | |
| ingester: | |
| - path: /flush | |
| pathType: PathPrefix | |
| query-frontend: | |
| - path: /api | |
| pathType: PathPrefix | |
| compactor: | |
| - path: /compactor/ring | |
| pathType: PathPrefix |
OR just define the default distributor port i.e 3200
Suggested change
| route: | |
| enabled: true | |
| apiVersion: gateway.networking.k8s.io/v1 | |
| kind: HTTPRoute | |
| annotations: | |
| test-annotation: test-value | |
| labels: | |
| test-label: test-value | |
| hostnames: | |
| - tempo.example.com | |
| parentRefs: | |
| - name: my-gateway | |
| namespace: default | |
| paths: | |
| distributor: | |
| - path: /v1/traces | |
| pathType: PathPrefix | |
| port: 4318 | |
| - path: /distributor/ring | |
| pathType: PathPrefix | |
| ingester: | |
| - path: /flush | |
| pathType: PathPrefix | |
| query-frontend: | |
| - path: /api | |
| pathType: PathPrefix | |
| compactor: | |
| - path: /compactor/ring | |
| pathType: PathPrefix | |
| route: | |
| enabled: true | |
| apiVersion: gateway.networking.k8s.io/v1 | |
| kind: HTTPRoute | |
| annotations: | |
| test-annotation: test-value | |
| labels: | |
| test-label: test-value | |
| hostnames: | |
| - tempo.example.com | |
| parentRefs: | |
| - name: my-gateway | |
| namespace: default | |
| paths: | |
| distributor: | |
| - path: /v1/traces | |
| pathType: PathPrefix | |
| port: 3200 | |
| - path: /distributor/ring | |
| pathType: PathPrefix | |
| ingester: | |
| - path: /flush | |
| pathType: PathPrefix | |
| query-frontend: | |
| - path: /api | |
| pathType: PathPrefix | |
| compactor: | |
| - path: /compactor/ring | |
| pathType: PathPrefix |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
route,gateway.route, andqueryFrontend.routev1/v1beta1), mutual exclusivity checks with ingress, and full support for parentRefs, hostnames, matches, filters, timeouts, and additional rulesCloses #296
Test plan
helm templaterenders correct HTTPRoute for top-level route with multi-service path routinghelm templaterenders correct HTTPRoute for gateway routehelm templaterenders correct HTTPRoute for query-frontend routeingress.enabledandroute.enabledproduces an errorgateway.ingress.enabledandgateway.route.enabledproduces an errorroute.kind: GRPCRoute🤖 Generated with Claude Code