Skip to content

Commit 0bec27f

Browse files
Fix label formatting dashboards.yaml (#359)
Co-authored-by: David Collom <[email protected]>
1 parent 4b802dd commit 0bec27f

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

Diff for: deploy/charts/version-checker/templates/dashboards.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ metadata:
88
labels:
99
{{- include "version-checker.labels" . | nindent 4 }}
1010
{{- if .Values.dashboards.labels }}
11-
{{- .Values.dashboards.labels | toYaml }}
11+
{{ .Values.dashboards.labels | toYaml | nindent 4}}
1212
{{- end }}
1313
data:
1414
internal.json: |-

Diff for: deploy/charts/version-checker/tests/dashboards_test.yaml

+13
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,19 @@ tests:
2121
- isNotEmpty:
2222
path: .data["internal.json"]
2323

24+
- it: works w/ custom labels
25+
set:
26+
dashboards.labels:
27+
grafana: "123"
28+
asserts:
29+
- isKind:
30+
of: ConfigMap
31+
- hasDocuments:
32+
count: 1
33+
- equal:
34+
path: metadata.labels.grafana
35+
value: "123"
36+
2437
- it: Works w/ GrafanaDashboard
2538
capabilities:
2639
apiVersions:

0 commit comments

Comments
 (0)