feat: add httpRoute resource to signoz chart - #795
Conversation
WalkthroughAdds conditional HTTPRoute support to the SigNoz Helm chart: a new Helm template renders a Kubernetes Changes
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
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used🧠 Learnings (1)📚 Learning: 2025-03-14T08:35:17.880ZApplied to files:
🪛 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)
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. Comment |
There was a problem hiding this comment.
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.parentRefsis empty (the default), the template renders an emptyparentRefsfield. 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
📒 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
httprouteblock 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.
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 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.
|
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. |
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
✏️ Tip: You can customize this high-level summary in your review settings.