{{- $reportingValues :=  index .Values "openshift-reporting" -}}

{{- if $reportingValues.spec.defaultReportDataSources.base.enabled }}
# base reportDataSources
{{- range $_, $body := $reportingValues.spec.defaultReportDataSources.base.items }}
---
{{- include "new-report-datasource" $body -}}
{{- end }}{{/* end range */}}
{{- end }}{{/* end if */}}

{{- if $reportingValues.spec.defaultReportDataSources.postKube_1_14.enabled }}

# post-kubernetes 1.14 reportDataSources
{{- range $_, $body := $reportingValues.spec.defaultReportDataSources.postKube_1_14.items }}
---
{{- include "new-report-datasource" $body -}}
{{- end }}{{/* end range */}}

{{- else }}

# pre-kubernetes 1.14 reportDataSources
{{- range $_, $body := $reportingValues.spec.defaultReportDataSources.preKube_1_14.items }}
---
{{- include "new-report-datasource" $body -}}
{{- end }}{{/* end range */}}

{{- end }}{{/* end if */}}
