---
# Source: pelias/templates/api-deployment.tpl
apiVersion: v1
kind: Pod
metadata:
  name: pelias-csv-importer
  namespace: pelias
spec:
  restartPolicy: Never
  containers:
    - name: csv-importer
      image: pelias/csv-importer:master
      command: ["sh", "-c", "./bin/parallel || true"]
      volumeMounts:
        - name: config-volume
          mountPath: /etc/config
        - name: lantmateriet
          mountPath: /data/lantmateriet
      env:
        - name: PELIAS_CONFIG
          value: "/etc/config/pelias.json"
  volumes:
    - name: config-volume
      configMap:
        name: pelias-json-configmap
        items:
          - key: pelias.json
            path: pelias.json
    - name: lantmateriet
      hostPath:
        # directory location on host
        path: /storage/lantmateriet/csv
