rancher-partner-charts/charts/kubecost/cost-analyzer/templates/grafana-pod-utilization-mul...

28 lines
869 B
YAML

{{- if .Values.grafana -}}
{{- if .Values.grafana.sidecar -}}
{{- if .Values.grafana.sidecar.dashboards -}}
{{- if .Values.grafana.sidecar.dashboards.enabled -}}
apiVersion: v1
kind: ConfigMap
metadata:
name: grafana-dashboard-pod-utilization-multi-cluster
{{- if $.Values.grafana.namespace_dashboards }}
namespace: {{ $.Values.grafana.namespace_dashboards }}
{{- end }}
labels:
{{ include "cost-analyzer.commonLabels" . | nindent 4 }}
{{- if $.Values.grafana.sidecar.dashboards.label }}
{{ $.Values.grafana.sidecar.dashboards.label }}: "1"
{{- else }}
grafana_dashboard: "1"
{{- end }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
data:
pod-utilization-multi-cluster.json: |-
{{ .Files.Get "pod-utilization-multi-cluster.json" | indent 8 }}
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}