apiVersion: batch/v1
kind: Job
metadata:
  name: crawler-seedjob
  namespace: dashboard
spec:
  template:
    spec:
      containers:
      - name: sd-covid-dashboard-crawler
        image: flrs/sd_covid_dashboard_crawler:latest
        env:
          - name: DB_HOST
            valueFrom:
              secretKeyRef:
                name: postgres-credentials
                key: db_host
          - name: DB_NAME
            valueFrom:
              secretKeyRef:
                name: postgres-credentials
                key: db_name
          - name: DB_USER
            valueFrom:
              secretKeyRef:
                name: postgres-credentials
                key: db_user
          - name: DB_PASSWORD
            valueFrom:
              secretKeyRef:
                name: postgres-credentials
                key: db_pass
      restartPolicy: Never