{{- if .Values.config }}
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "elasticsearch.fullname" . }}
  labels: {{- include "elasticsearch.labels" . | nindent 4 }}
data:
  elasticsearch.yml: |- {{- toYaml .Values.config | nindent 4 }}
{{- end }}
