Skip to content

Commit dcc3657

Browse files
committed
Enable OTEL gRPC on the Tempo gateway
Signed-off-by: Jonas De Gendt <[email protected]>
1 parent 6186ff4 commit dcc3657

File tree

5 files changed

+39
-2
lines changed

5 files changed

+39
-2
lines changed

charts/tempo-distributed/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: tempo-distributed
33
description: Grafana Tempo in MicroService mode
44
type: application
5-
version: 1.38.2
5+
version: 1.38.3
66
appVersion: 2.7.1
77
engine: gotpl
88
home: https://grafana.com/docs/tempo/latest/

charts/tempo-distributed/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# tempo-distributed
22

3-
![Version: 1.38.2](https://img.shields.io/badge/Version-1.38.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.7.1](https://img.shields.io/badge/AppVersion-2.7.1-informational?style=flat-square)
3+
![Version: 1.38.3](https://img.shields.io/badge/Version-1.38.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.7.1](https://img.shields.io/badge/AppVersion-2.7.1-informational?style=flat-square)
44

55
Grafana Tempo in MicroService mode
66

@@ -492,6 +492,7 @@ The memcached default args are removed and should be provided manually. The sett
492492
| gateway.basicAuth.htpasswd | string | `"{{ htpasswd (required \"'gateway.basicAuth.username' is required\" .Values.gateway.basicAuth.username) (required \"'gateway.basicAuth.password' is required\" .Values.gateway.basicAuth.password) }}"` | Uses the specified username and password to compute a htpasswd using Sprig's `htpasswd` function. The value is templated using `tpl`. Override this to use a custom htpasswd, e.g. in case the default causes high CPU load. |
493493
| gateway.basicAuth.password | string | `nil` | The basic auth password for the gateway |
494494
| gateway.basicAuth.username | string | `nil` | The basic auth username for the gateway |
495+
| gateway.enableGrpc | bool | `false` | Enables the routes and ports that enable pushing traces using gRPC |
495496
| gateway.enabled | bool | `false` | Specifies whether the gateway should be enabled |
496497
| gateway.extraArgs | list | `[]` | Additional CLI args for the gateway |
497498
| gateway.extraEnv | list | `[]` | Environment variables to add to the gateway pods |

charts/tempo-distributed/templates/gateway/deployment-gateway.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@ spec:
5858
- name: http-metrics
5959
containerPort: 8080
6060
protocol: TCP
61+
{{- if .Values.gateway.enableGrpc }}
62+
- name: grpc-otlp
63+
containerPort: 4317
64+
protocol: TCP
65+
{{- end }}
6166
{{- if or .Values.global.extraEnv .Values.gateway.extraEnv }}
6267
env:
6368
{{- with .Values.global.extraEnv }}

charts/tempo-distributed/templates/gateway/service-gateway.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ spec:
2929
nodePort: {{ .Values.gateway.service.nodePort }}
3030
{{- end }}
3131
protocol: TCP
32+
{{- if .Values.gateway.enableGrpc }}
33+
- name: grpc-otlp
34+
targetPort: grpc-otlp
35+
protocol: TCP
36+
{{- end }}
3237
{{ range .Values.gateway.service.additionalPorts }}
3338
- name: {{ .name }}
3439
port: {{ .port }}

charts/tempo-distributed/values.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1937,6 +1937,8 @@ gateway:
19371937
extraVolumes: []
19381938
# -- Volume mounts to add to the gateway pods
19391939
extraVolumeMounts: []
1940+
# -- Enables the routes and ports that enable pushing traces using gRPC
1941+
enableGrpc: false
19401942
# -- Resource requests and limits for the gateway
19411943
resources: {}
19421944
# -- Grace period to allow the gateway to shutdown before it is killed
@@ -2162,6 +2164,30 @@ gateway:
21622164
{{ . | nindent 4 }}
21632165
{{- end }}
21642166
}
2167+
2168+
{{- if .Values.gateway.enableGrpc }}
2169+
# OTLP gRPC
2170+
server {
2171+
listen 4317 http2;
2172+
2173+
{{- if .Values.gateway.basicAuth.enabled }}
2174+
auth_basic "Tempo";
2175+
auth_basic_user_file /etc/nginx/secrets/.htpasswd;
2176+
{{- end }}
2177+
2178+
location = /opentelemetry.proto.collector.trace.v1.TraceService/Export {
2179+
grpc_pass grpc://{{ include "tempo.resourceName" (dict "ctx" . "component" "distributor") }}.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}:4317;
2180+
}
2181+
2182+
location ~ /opentelemetry {
2183+
grpc_pass grpc://{{ include "tempo.resourceName" (dict "ctx" . "component" "distributor") }}.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}:4317;
2184+
}
2185+
2186+
{{- with .Values.gateway.nginxConfig.serverSnippet }}
2187+
{{ . | nindent 4 }}
2188+
{{- end }}
2189+
}
2190+
{{- end }}
21652191
}
21662192
21672193
##############################################################################

0 commit comments

Comments
 (0)