From d9b826c92b80bdcd2e9b0ea1dd605a0dac2f2a0f Mon Sep 17 00:00:00 2001 From: Nicolas Lamirault Date: Thu, 30 May 2024 18:09:18 +0200 Subject: [PATCH] fix(cilium-mixin): json file key in lowercase (#836) Signed-off-by: Nicolas Lamirault --- charts/cilium-mixin/Chart.yaml | 4 ++-- charts/cilium-mixin/templates/configmap-dashboards.yaml | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/charts/cilium-mixin/Chart.yaml b/charts/cilium-mixin/Chart.yaml index 2e5ac2db..b77d5d09 100644 --- a/charts/cilium-mixin/Chart.yaml +++ b/charts/cilium-mixin/Chart.yaml @@ -27,7 +27,7 @@ keywords: - cilium - monitoring-mixin - portefaix -version: 0.3.1 +version: 0.3.2 appVersion: master maintainers: @@ -53,4 +53,4 @@ annotations: url: https://keybase.io/nlamirault/pgp_keys.asc artifacthub.io/changes: | - kind: fixed - description: dashboards names in lowercase \ No newline at end of file + description: key for dashboard json file in lowercase \ No newline at end of file diff --git a/charts/cilium-mixin/templates/configmap-dashboards.yaml b/charts/cilium-mixin/templates/configmap-dashboards.yaml index aca8cc78..1bd782a8 100644 --- a/charts/cilium-mixin/templates/configmap-dashboards.yaml +++ b/charts/cilium-mixin/templates/configmap-dashboards.yaml @@ -17,7 +17,7 @@ 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: |- @@ -25,7 +25,7 @@ items: {{- 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 @@ -33,7 +33,7 @@ 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 }} @@ -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 }}