{{- range $name := .Values.databases }}
{{ $dnsName := replace "_" "-" $name }}
---
apiVersion: k8s.mariadb.com/v1alpha1
kind: Database
metadata:
  name: {{ $.Release.Name }}-{{ $dnsName }}
spec:
  name: {{ $name }}
  mariaDbRef:
    name: {{ $.Release.Name }}
  characterSet: utf8
  collate: utf8_general_ci
{{- end }}
