UNCLASSIFIED - NO CUI

Skip to content

Grafana dashboard ConfigMap has naming collisions in scenarios where customers deploy multiple helm releases of this chart in a single cluster

Problem statement

The grafana dashboard configmap included in this chart has a static namespace and name, meaning multiple concurrent releases of this chart on a single cluster will all attempt to claim a single monitoring/gitlab-runner-grafana-dashboards ConfigMap.

Current configmap yaml from main:

{{- if .Values.monitoring.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
  # this part needs to be dynamic in order to support multiple concurrent chart releases
  name: "gitlab-runner-grafana-dashboards"
  namespace: monitoring
  labels:
    grafana_dashboard: "1"
data:
  gitlab-ci-metrics_rev1.json: |
    {{ .Files.Get "dashboards/gitlab-runner-metrics_rev1.json"  | nindent 4 }}
{{- end }}

Potential solution

I'm unsure what the resulting behavior is, but I believe we need a way for separate releases to each publish their own ConfigMap, likely by including {{ .Release.Name }} somewhere in the ConfigMap's metadata.name.

References

Edited by Daniel Pritchett