-
Notifications
You must be signed in to change notification settings - Fork 144
feat(signoz): adds new http ingress for otel-collector #667
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,53 @@ | ||||||||||||||
| {{- if .Values.otelCollector.httpIngress.enabled -}} | ||||||||||||||
| {{- $fullName := include "otelCollector.fullname" . -}} | ||||||||||||||
| {{- $ingressApiIsStable := eq (include "ingress.isStable" .) "true" -}} | ||||||||||||||
| {{- $ingressSupportsPathType := eq (include "ingress.supportsPathType" .) "true" -}} | ||||||||||||||
| apiVersion: {{ include "ingress.apiVersion" . }} | ||||||||||||||
| kind: Ingress | ||||||||||||||
| metadata: | ||||||||||||||
| name: {{ $fullName }}-http | ||||||||||||||
| labels: | ||||||||||||||
| {{- include "otelCollector.labels" . | nindent 4 }} | ||||||||||||||
| {{- with .Values.otelCollector.httpIngress.annotations }} | ||||||||||||||
| annotations: | ||||||||||||||
| {{- toYaml . | nindent 4 }} | ||||||||||||||
| {{- end }} | ||||||||||||||
| spec: | ||||||||||||||
| {{- if and .Values.otelCollector.httpIngress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} | ||||||||||||||
| ingressClassName: {{ .Values.otelCollector.httpIngress.className }} | ||||||||||||||
| {{- end }} | ||||||||||||||
| {{- if .Values.otelCollector.httpIngress.tls }} | ||||||||||||||
| tls: | ||||||||||||||
| {{- range .Values.otelCollector.httpIngress.tls }} | ||||||||||||||
| - hosts: | ||||||||||||||
| {{- range .hosts }} | ||||||||||||||
| - {{ . | quote }} | ||||||||||||||
| {{- end }} | ||||||||||||||
| {{- with .secretName }} | ||||||||||||||
| secretName: {{ . }} | ||||||||||||||
| {{- end }} | ||||||||||||||
| {{- end }} | ||||||||||||||
| {{- end }} | ||||||||||||||
| rules: | ||||||||||||||
| {{- range .Values.otelCollector.httpIngress.hosts }} | ||||||||||||||
| - host: {{ .host | quote }} | ||||||||||||||
| http: | ||||||||||||||
| paths: | ||||||||||||||
| {{- range .paths }} | ||||||||||||||
| - path: {{ .path }} | ||||||||||||||
| {{- if $ingressSupportsPathType }} | ||||||||||||||
| pathType: {{ .pathType }} | ||||||||||||||
| {{- end }} | ||||||||||||||
|
Comment on lines
+38
to
+40
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Guard Wrap both checks together: - {{- if $ingressSupportsPathType }}
+ {{- if and $ingressSupportsPathType .pathType }}
pathType: {{ .pathType }}
{{- end }}📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @grandwizard28 for the change mentioned above:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||||||||||||||
| backend: | ||||||||||||||
| {{- if $ingressApiIsStable }} | ||||||||||||||
| service: | ||||||||||||||
| name: {{ $fullName }} | ||||||||||||||
| port: | ||||||||||||||
| number: {{ .port }} | ||||||||||||||
| {{- else }} | ||||||||||||||
| serviceName: {{ $fullName }} | ||||||||||||||
| servicePort: {{ .port }} | ||||||||||||||
| {{- end }} | ||||||||||||||
| {{- end }} | ||||||||||||||
| {{- end }} | ||||||||||||||
| {{- end }} | ||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Proper conditional rendering with feature flag
Rendering is correctly gated by
.Values.otelCollector.httpIngress.enabledand helper variables are initialized for later use.Ensure that
otelCollector.httpIngress.enabledand related settings are documented invalues.yamlandREADME.md:🏁 Script executed:
Length of output: 101
Document HTTP Ingress in README.md
charts/signoz/values.yamlalready defines theotelCollector.httpIngressblock (line 1237), but the feature is not mentioned inREADME.md. Please add documentation for the new HTTP Ingress flags, for example under the “Configuration” or “Values” section:This will keep your feature flags discoverable and maintain consistency between
values.yamland the chart documentation.🧰 Tools
🪛 YAMLlint (1.37.1)
[error] 1-1: syntax error: expected the node content, but found '-'
(syntax)
🤖 Prompt for AI Agents