Open AndriiKhodyriev opened 3 years ago
Template:
...
metadata:
name: {{ template "grafana.fullname" $ }}-dashboards-{{ $provider }}
namespace: {{ template "grafana.namespace" $ }}
labels:
{{- include "grafana.labels" $ | nindent 4 }}
dashboard-provider: {{ $provider }}
...
Grafana labels :
{{/*
Common labels
*/}}
{{- define "grafana.labels" -}}
helm.sh/chart: {{ include "grafana.chart" . }}
{{ include "grafana.selectorLabels" . }}
{{- if or .Chart.AppVersion .Values.image.tag }}
app.kubernetes.io/version: {{ .Values.image.tag | default .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end -}}
I saw this problem. When I load the dashboard (below values.yaml file)
I use sidecar to connect dashboards and sidecar looks for configmap with label "grafana_dashboard"
But after the deployment, I see that the config maps are being created, but the required label is not in them.
I'll take a look at the template. And I see that all the labels there are taken from a certain variable grafana.labels
It doesn't have it.
How to be in such a situation?