rancher-partner-charts/charts/kubecost/cost-analyzer/2.2.3/templates/grafana-dashboard-node-util...

28 lines
935 B
YAML

{{- if .Values.grafana -}}
{{- if .Values.grafana.sidecar -}}
{{- if .Values.grafana.sidecar.dashboards -}}
{{- if and (.Values.grafana.sidecar.dashboards.enabled ) (eq (include "cost-analyzer.grafanaEnabled" .) "true") -}}
apiVersion: v1
kind: ConfigMap
metadata:
name: node-utilization-dashboard
{{- 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 }}: "{{ $.Values.grafana.sidecar.dashboards.labelValue }}"
{{- else }}
grafana_dashboard: "1"
{{- end }}
annotations:
{{ toYaml .Values.grafana.sidecar.dashboards.annotations | indent 4 }}
data:
node-utilization.json: |-
{{ .Files.Get "node-utilization.json" | indent 8 }}
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}