diff --git a/charts/capsule/templates/dashboards.yaml b/charts/capsule/templates/dashboards.yaml index 14d76532..b074d7fc 100644 --- a/charts/capsule/templates/dashboards.yaml +++ b/charts/capsule/templates/dashboards.yaml @@ -14,7 +14,7 @@ metadata: {{- toYaml . | nindent 4 }} {{- end }} labels: - {{- include "capsule.labels" . | nindent 4 }} + {{- include "capsule.labels" $ | nindent 4 }} {{- with $.Values.monitoring.dashboards.labels }} {{- toYaml . | nindent 4 }} {{- end }} @@ -27,20 +27,20 @@ data: apiVersion: grafana.integreatly.org/v1beta1 kind: GrafanaDashboard metadata: - name: {{ include "capsule.fullname" . }}-{{ $path | base | trimSuffix "-dashboard.json" | regexFind "[^_]+$" }} + name: {{ include "capsule.fullname" $ }}-{{ $path | base | trimSuffix "-dashboard.json" | regexFind "[^_]+$" }} namespace: {{ default $.Release.Namespace $.Values.monitoring.dashboards.namespace | quote }} annotations: {{- with $.Values.monitoring.dashboards.annotations }} {{- toYaml . | nindent 4 }} {{- end }} labels: - {{- include "capsule.labels" . | nindent 4 }} + {{- include "capsule.labels" $ | nindent 4 }} {{- with $.Values.monitoring.dashboards.labels }} {{- toYaml . | nindent 4 }} {{- end }} spec: configMapRef: - name: {{ include "capsule.fullname" . }}-{{ $path | base | trimSuffix "-dashboard.json" | regexFind "[^_]+$" }}-dashboard + name: {{ include "capsule.fullname" $ }}-{{ $path | base | trimSuffix "-dashboard.json" | regexFind "[^_]+$" }}-dashboard key: {{ base $path }} {{- with (omit $.Values.monitoring.dashboards.operator "enabled") }} {{- toYaml . | nindent 2 }}