Skip to content

feat: add httpRoute resource to signoz chart - #795

Open
dominicbinarly wants to merge 3 commits into
SigNoz:mainfrom
dominicbinarly:feature/signoz-httproute
Open

feat: add httpRoute resource to signoz chart#795
dominicbinarly wants to merge 3 commits into
SigNoz:mainfrom
dominicbinarly:feature/signoz-httproute

Conversation

@dominicbinarly

@dominicbinarly dominicbinarly commented Nov 21, 2025

Copy link
Copy Markdown

Since Ingress NGINX is being retired, more users will move to the Gateway API. Signoz doesn't have httpRoute resources so here is a simple one for general ingress to the platform.

I am using this internally as I moved everything to gateways from ingress.

I also have a branch on my fork with additional gateway configuration for the Otel Collector to use a gateway, but I cannot test this properly this year.

Summary by CodeRabbit

  • New Features
    • Added an optional Kubernetes HTTPRoute networking option for deployments, enabling Gateway API–style traffic routing. Disabled by default.
    • Provides configurable annotations, parent references, hostnames, and backend targeting (service/port) so routing behavior can be customized per deployment.

✏️ Tip: You can customize this high-level summary in your review settings.

@dominicbinarly
dominicbinarly requested a review from a team as a code owner November 21, 2025 16:14
@coderabbitai

coderabbitai Bot commented Nov 21, 2025

Copy link
Copy Markdown

Walkthrough

Adds conditional HTTPRoute support to the SigNoz Helm chart: a new Helm template renders a Kubernetes gateway.networking.k8s.io/v1 HTTPRoute when .Values.signoz.httproute.enabled is true, with configurable annotations, parentRefs, hostnames, and a backendRef to the release service.

Changes

Cohort / File(s) Summary
HTTPRoute Template Addition
charts/signoz/templates/signoz/httproute.yaml
New Helm template for apiVersion: gateway.networking.k8s.io/v1, kind: HTTPRoute. Conditionally rendered when .Values.signoz.httproute.enabled is true. Metadata and optional annotations, parentRefs, and hostnames are driven by values. Spec contains a single rule with a backendRefs entry pointing to the release service and port from .Values.signoz.service.port, weight fixed at 1.
Values Configuration
charts/signoz/values.yaml
Adds a signoz.httproute configuration block (default enabled: false) exposing annotations, parentRefs, hostnames, and related fields to control the rendered HTTPRoute.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Operator as Operator (Helm)
  participant Helm as Helm renderer
  participant K8s as Kubernetes API
  note over Helm,Operator `#DDEEFF`: Chart values include signoz.httproute.enabled = true/false

  Operator->>Helm: helm install/upgrade (values)
  Helm-->>Helm: evaluate templates\n(.Values.signoz.httproute.enabled)
  alt httproute enabled
    Helm->>K8s: POST HTTPRoute (gateway.networking.k8s.io/v1)
    K8s-->>Helm: 201 Created
  else httproute disabled
    note right of Helm: No HTTPRoute resource rendered
  end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Review templating of optional blocks (annotations, parentRefs, hostnames) to ensure empty values don't produce invalid YAML.
  • Verify .Values.signoz.service.port matches existing service port definitions.
  • Confirm API fields (gateway.networking.k8s.io/v1, HTTPRoute spec) align with target Kubernetes gateway implementation.

Poem

🐰 I stitched a route across the sky,
A tiny HTTP hop—oh my!
Helm sings names in gentle queues,
ParentRefs guide the traffic through,
Hop, hop, deploy — a rabbit's cue! 🥕

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title accurately and specifically describes the main change: adding an HTTPRoute resource to the SigNoz Helm chart, which aligns with the file modifications and stated objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f8956cf and 91f29df.

📒 Files selected for processing (1)
  • charts/signoz/templates/signoz/httproute.yaml (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-03-14T08:35:17.880Z
Learnt from: prashant-shahi
Repo: SigNoz/charts PR: 631
File: charts/signoz/templates/query-service/statefulset.yaml:0-0
Timestamp: 2025-03-14T08:35:17.880Z
Learning: In Helm templates, `{{- include "template" . | nindent 4 }}` is valid syntax. The hyphen in `{{-` removes whitespace/newlines before the directive while `nindent 4` adds a newline and indents by 4 spaces. YAMLlint may incorrectly flag this as an error as it does not properly interpret Helm template directives.

Applied to files:

  • charts/signoz/templates/signoz/httproute.yaml
🪛 YAMLlint (1.37.1)
charts/signoz/templates/signoz/httproute.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

🔇 Additional comments (1)
charts/signoz/templates/signoz/httproute.yaml (1)

1-30: HTTPRoute template structure is valid and prior critical issues are resolved.

The template correctly:

  • Conditionally renders the HTTPRoute only when .Values.signoz.httproute.enabled is true (line 1)
  • Wraps the entire parentRefs: block in a conditional (lines 15–18), preventing orphaned keys when unset
  • Structures rules: as an array with a single rule element (line 24 has the required dash) and nested backendRefs: array (line 25 has dash)
  • Uses proper Helm patterns: include for fullname and labels, nindent for indentation, toYaml for value serialization

The YAMLlint error is a false positive—YAMLlint does not understand Helm template syntax (as noted in your team's learnings). As per coding conventions, this is expected and does not indicate a real issue.

To confirm the template works as intended, please verify:

  1. The service port reference path {{ .Values.signoz.service.port }} (line 28) is correctly set in values.yaml
  2. The rendered HTTPRoute manifests are valid by testing with helm template or deploying to a test cluster with the Gateway API installed

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
charts/signoz/templates/signoz/httproute.yaml (1)

15-18: Empty parentRefs by default may leave HTTPRoute non-functional.

When .Values.signoz.httproute.parentRefs is empty (the default), the template renders an empty parentRefs field. This means the HTTPRoute won't attach to any gateway, making it non-functional unless users explicitly configure parentRefs. Consider either: (1) adding a validation/warning in documentation that parentRefs must be configured, or (2) providing a sensible default gateway reference in the example values.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a349bb6 and a3b51df.

📒 Files selected for processing (2)
  • charts/signoz/templates/signoz/httproute.yaml (1 hunks)
  • charts/signoz/values.yaml (1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
charts/signoz/templates/signoz/httproute.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

🔇 Additional comments (1)
charts/signoz/values.yaml (1)

1009-1031: Configuration structure is well-designed and follows existing patterns.

The new httproute block integrates seamlessly with the existing ingress configuration. Default values (disabled, empty arrays) are safe, and the provided examples are helpful for users setting up Gateway API integration.

Comment thread charts/signoz/templates/signoz/httproute.yaml
Comment thread charts/signoz/templates/signoz/httproute.yaml Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a3b51df and f8956cf.

📒 Files selected for processing (1)
  • charts/signoz/templates/signoz/httproute.yaml (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-03-14T08:35:17.880Z
Learnt from: prashant-shahi
Repo: SigNoz/charts PR: 631
File: charts/signoz/templates/query-service/statefulset.yaml:0-0
Timestamp: 2025-03-14T08:35:17.880Z
Learning: In Helm templates, `{{- include "template" . | nindent 4 }}` is valid syntax. The hyphen in `{{-` removes whitespace/newlines before the directive while `nindent 4` adds a newline and indents by 4 spaces. YAMLlint may incorrectly flag this as an error as it does not properly interpret Helm template directives.

Applied to files:

  • charts/signoz/templates/signoz/httproute.yaml
🪛 YAMLlint (1.37.1)
charts/signoz/templates/signoz/httproute.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

🔇 Additional comments (1)
charts/signoz/templates/signoz/httproute.yaml (1)

23-29: HTTPRoute rules array structure is correct.

The rules: field is properly formatted as an array with the dash indicator (line 24), and the backendRefs structure follows the HTTPRoute spec. The indentation and field layout are correct. The static analysis error at line 1-1 appears to be a false positive from YAMLlint's inability to properly parse Helm template directives.

Comment thread charts/signoz/templates/signoz/httproute.yaml Outdated
@drtobbyas

Copy link
Copy Markdown

This is essential as more people migrate to Gateway API. Support for Gateway API needs to be added. I'm currently using an internal httproute for this.

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.

2 participants