{{ if not .Values.worker.config.configmapName }}
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ template "locust.worker-configmap" . }}
  labels:
    heritage: {{ .Release.Service | quote }}
    release: {{ .Release.Name | quote }}
    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
    app: {{ template "locust.fullname" . }}
data:
{{ (.Files.Glob "tasks/*").AsConfig | indent 2 }}
{{ end }}