Skip to content

[tempo-distributed] Add Gateway API support#298

Open
DrFaust92 wants to merge 3 commits intomainfrom
tempo-distributed-gateway-api
Open

[tempo-distributed] Add Gateway API support#298
DrFaust92 wants to merge 3 commits intomainfrom
tempo-distributed-gateway-api

Conversation

@DrFaust92
Copy link
Copy Markdown

Summary

  • Adds native Gateway API route support (HTTPRoute/GRPCRoute) as an alternative to traditional Ingress resources
  • Three route entry points mirror the existing ingress structure: top-level route, gateway.route, and queryFrontend.route
  • Includes auto-detection of Gateway API version (v1/v1beta1), mutual exclusivity checks with ingress, and full support for parentRefs, hostnames, matches, filters, timeouts, and additional rules

Closes #296

Test plan

  • helm template renders correct HTTPRoute for top-level route with multi-service path routing
  • helm template renders correct HTTPRoute for gateway route
  • helm template renders correct HTTPRoute for query-frontend route
  • Mutual exclusivity: enabling both ingress.enabled and route.enabled produces an error
  • Mutual exclusivity: enabling both gateway.ingress.enabled and gateway.route.enabled produces an error
  • GRPCRoute kind renders correctly when route.kind: GRPCRoute
  • All existing helm-unittests pass

🤖 Generated with Claude Code

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>
@DrFaust92 DrFaust92 marked this pull request as draft April 8, 2026 15:18
…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 DrFaust92 marked this pull request as ready for review April 8, 2026 16:00
@Sheikh-Abubaker
Copy link
Copy Markdown

@DrFaust92 Thanks for the comprehensive implementation is this tested on a live cluster ?

distributor:
- path: /v1/traces
pathType: PathPrefix
port: 4318
Copy link
Copy Markdown

@Sheikh-Abubaker Sheikh-Abubaker Apr 10, 2026

Choose a reason for hiding this comment

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

port 4318 is not exposed by default unless gateway:

gateway:
# -- Specifies whether the gateway should be enabled
enabled: false

and otlp http traces are enabled:

otlp:
http:
# -- Enable Tempo to ingest Open Telemetry HTTP traces
enabled: false

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
Copy link
Copy Markdown

@Sheikh-Abubaker Sheikh-Abubaker Apr 10, 2026

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown

@Sheikh-Abubaker Sheikh-Abubaker left a comment

Choose a reason for hiding this comment

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

I tested this change on a KIND cluster configured with NGINX Gateway Fabric controller, the feature is working as intended!

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.

[tempo-distributed] Gateway API support

2 participants