{{- if and .Values.replication.enabled .Values.slave.config }}
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ template "mysql.slave.fullname" . }}
  labels: {{- include "mysql.labels" . | nindent 4 }}
    component: slave
data:
  my.cnf: |-
{{ .Values.slave.config | indent 4 }}
{{- end }}
