Skip to content

Commit

Permalink
fix(cilium-mixin): json file key in lowercase (#836)
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolas Lamirault <[email protected]>
  • Loading branch information
nlamirault authored May 30, 2024
1 parent 68b0329 commit d9b826c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions charts/cilium-mixin/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ keywords:
- cilium
- monitoring-mixin
- portefaix
version: 0.3.1
version: 0.3.2
appVersion: master

maintainers:
Expand All @@ -53,4 +53,4 @@ annotations:
url: https://keybase.io/nlamirault/pgp_keys.asc
artifacthub.io/changes: |
- kind: fixed
description: dashboards names in lowercase
description: key for dashboard json file in lowercase
8 changes: 4 additions & 4 deletions charts/cilium-mixin/templates/configmap-dashboards.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@ items:
grafana-dashboard: {{ $dashboardName }}
{{- include "cilium-mixin.labels" $ | indent 6 }}
app.kubernetes.io/component: dashboard
name: {{ printf "dashboard-%s" $dashboardName | trunc 63 | trimSuffix "-" | lower }}
name: {{ printf "dashboard-%s" $dashboardName | trunc 63 | trimSuffix "-" }}
namespace: {{ include "cilium-mixin.namespace" $ }}
data:
{{ $dashboardName }}.json: |-
{{ $.Files.Get $path | indent 6}}
{{- end }}
{{ if $.Values.grafanaDashboard.grafanaOperator.enabled -}}
{{- range $path, $fileContents := $files }}
{{- $dashboardName := regexReplaceAll "(^.*/)(.*)\\.json$" $path "${2}" }}
{{- $dashboardName := regexReplaceAll "(^.*/)(.*)\\.json$" $path "${2}" | lower }}
---
apiVersion: grafana.integreatly.org/v1beta1
kind: GrafanaDashboard
metadata:
labels:
{{- include "cilium-mixin.labels" $ | indent 4 }}
app.kubernetes.io/component: dashboard
name: {{ printf "%s" $dashboardName | trunc 63 | trimSuffix "-" | lower }}
name: {{ printf "%s" $dashboardName | trunc 63 | trimSuffix "-" }}
namespace: {{ $.Release.Namespace }}
spec:
allowCrossNamespaceImport: {{ $.Values.grafanaDashboard.grafanaOperator.allowCrossNamespaceImport }}
Expand All @@ -42,7 +42,7 @@ spec:
matchLabels:
{{- toYaml $.Values.grafanaDashboard.grafanaOperator.matchLabels | nindent 6 }}
configMapRef:
name: {{ printf "dashboard-%s" $dashboardName | trunc 63 | trimSuffix "-" | lower }}
name: {{ printf "dashboard-%s" $dashboardName | trunc 63 | trimSuffix "-" }}
key: {{ $dashboardName }}.json
{{- end }}
{{- end }}
Expand Down

0 comments on commit d9b826c

Please sign in to comment.