apiVersion: batch/v1
kind: Job
metadata:
  name: twitter-fetcher-get-all-twit-for-user-{{ username }}-{{ uuid }}
spec:
  template:
    metadata:
      labels:
        app: twitter-fetcher
    spec:
      containers:
        - name: twitter-fetcher-get-all-twit-for-user-{{ username }}-{{ uuid }}
          image: "{{ registry_host }}:{{ registry_port }}/twit-fetcher"
          env:
            - name: MONGO_HOST
              value: "{{ mongodb_host }}"
            - name: MONGO_PORT
              value: "{{ mongodb_port }}"
          args: ["python", "main.py", "{{ username }}", "-l", "{{ limit }}"]
      restartPolicy: Never
