Skip to content

Commit b7646e3

Browse files
committed
feat(tempo): add grafana sidecar datasource to tempo
Signed-off-by: Yordis Prieto <[email protected]>
1 parent e1178ed commit b7646e3

File tree

4 files changed

+57
-2
lines changed

4 files changed

+57
-2
lines changed

charts/tempo/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
33
description: Grafana Tempo Single Binary Mode
44
type: application
5-
version: 1.23.1
5+
version: 1.24.0
66
appVersion: 2.8.0
77
engine: gotpl
88
home: https://grafana.net

charts/tempo/README.md

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

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

55
Grafana Tempo Single Binary Mode
66

@@ -19,6 +19,10 @@ Grafana Tempo Single Binary Mode
1919
| extraVolumes | list | `[]` | Volumes to add |
2020
| fullnameOverride | string | `""` | Overrides the chart's computed fullname |
2121
| global.commonLabels | object | `{}` | Common labels for all object directly managed by this chart. |
22+
| grafana.sidecar.datasources.enabled | bool | `true` | |
23+
| grafana.sidecar.datasources.label | string | `""` | |
24+
| grafana.sidecar.datasources.labelValue | string | `""` | |
25+
| grafana.sidecar.datasources.maxLines | int | `1000` | |
2226
| hostAliases | list | `[]` | hostAliases to add |
2327
| labels | object | `{}` | labels for tempo |
2428
| nameOverride | string | `""` | Overrides the chart's name |
@@ -57,6 +61,10 @@ Grafana Tempo Single Binary Mode
5761
| serviceMonitor.annotations | object | `{}` | |
5862
| serviceMonitor.enabled | bool | `false` | |
5963
| serviceMonitor.interval | string | `""` | |
64+
| tempo.datasource.isDefault | bool | `false` | |
65+
| tempo.datasource.jsonData | string | `"{}"` | |
66+
| tempo.datasource.uid | string | `"tempo"` | |
67+
| tempo.datasource.url | string | `"http://{{(include \"tempo.fullname\" .)}}:{{ .Values.tempo.server.http_listen_port }}"` | |
6068
| tempo.extraArgs | object | `{}` | |
6169
| tempo.extraEnv | list | `[]` | Environment variables to add |
6270
| tempo.extraEnvFrom | list | `[]` | Environment variables from secrets or configmaps to add to the ingester pods |
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{{- if .Values.grafana.sidecar.datasources.enabled }}
2+
apiVersion: v1
3+
kind: ConfigMap
4+
metadata:
5+
name: {{ include "tempo.fullname" . }}
6+
namespace: {{ .Release.Namespace }}
7+
labels:
8+
app: {{ include "tempo.name" . }}
9+
chart: {{ include "tempo.chart" . }}
10+
release: {{ .Release.Name }}
11+
heritage: {{ .Release.Service }}
12+
{{- if .Values.grafana.sidecar.datasources.label }}
13+
{{ .Values.grafana.sidecar.datasources.label }}: {{ .Values.grafana.sidecar.datasources.labelValue | quote }}
14+
{{- else }}
15+
grafana_datasource: "1"
16+
{{- end }}
17+
data:
18+
tempo-datasource.yaml: |-
19+
apiVersion: 1
20+
datasources:
21+
- name: Tempo
22+
type: tempo
23+
access: proxy
24+
url: {{ tpl .Values.tempo.datasource.url . | quote }}
25+
version: 1
26+
isDefault: {{ default false .Values.tempo.datasource.isDefault }}
27+
{{- with .Values.tempo.datasource.uid }}
28+
uid: {{ . | quote }}
29+
{{- end }}
30+
{{- with .Values.tempo.datasource.jsonData }}
31+
jsonData:
32+
{{- tpl . $ | nindent 8 }}
33+
{{- end }}
34+
{{- end }}

charts/tempo/values.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,11 @@ tempo:
165165
# mountPath: /mnt/volume
166166
# readOnly: true
167167
# existingClaim: volume-claim
168+
datasource:
169+
isDefault: false
170+
uid: "tempo"
171+
url: http://{{(include "tempo.fullname" .)}}:{{ .Values.tempo.server.http_listen_port }}
172+
jsonData: "{}"
168173

169174
# -- Tempo configuration file contents
170175
# @default -- Dynamically generated tempo configmap
@@ -413,3 +418,11 @@ networkPolicy:
413418
## - namespaceSelector:
414419
## matchExpressions:
415420
## - {key: role, operator: In, values: [tempo]}
421+
422+
grafana:
423+
sidecar:
424+
datasources:
425+
enabled: true
426+
label: ""
427+
labelValue: ""
428+
maxLines: 1000

0 commit comments

Comments
 (0)