---
apiVersion: batch/v1
kind: Job
metadata:
  name: happn-location-near-{{ uuid }}
spec:
  template:
    metadata:
      labels:
        app: happn-location-near
    spec:
      containers:
        - name: happn-location-{{ uuid }}
          image: "{{ registry_host }}:{{ registry_port }}/happn-locations"
          env:
            - name: NEO4J_URL
              value: "bolt://{{ neo4j_host }}:{{ neo4j_port }}"
            - name: HAPPN_ID
              value: "{{ userID }}"
            - name: HAPPN_TOKEN
              value: "{{ token }}"
          args: ["python", "./happn/script.py"]
      restartPolicy: Never
