# helm_charts_config-map_mysql-config.yaml
kind: ConfigMap
apiVersion: v1
metadata:
  name: {{ template "percona-xtradb-cluster.fullname" . }}-config-files
  labels:
    app: {{ template "percona-xtradb-cluster.fullname" . }}
    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
    release: "{{ .Release.Name }}"
    heritage: "{{ .Release.Service }}"
data:
{{- if .Values.configFiles }}
{{ toYaml .Values.configFiles | indent 2 }}
{{ if not (index .Values.configFiles "node.cnf") }}
  node.cnf: |
{{ .Files.Get "files/node.cnf" | indent 4 }}
{{ end }}
{{ else }}
  node.cnf: |
{{ .Files.Get "files/node.cnf" | indent 4 }}
{{ end }}