apiVersion: batch/v1
kind: Job
metadata:
  labels:
    purpose: execute-sparql-operations
  name: d2s-sparql-operations-job
  namespace: data2services-test
spec:
  parallelism: 1
  completions: 1
  template:
    metadata:
      name: sparql-job
    spec:
      containers:
      - name: d2s-sparql-operations
        image: umids/d2s-sparql-operations
        env:
        - name: triplestore_url
          value: "https://graphdb.dumontierlab.com"
        - name: triplestore_repository
          value: "public"
        - name: sparql_username
          value: "import_user"
        - name: sparql_password
          value: "test"
        - name: input_file
          value: "https://raw.githubusercontent.com/MaastrichtU-IDS/d2s-sparql-operations/master/src/main/resources/example-insert.rq"
        args: ["-ep", "$(triplestore_url)", "-rep", "$(triplestore_repository)", "-op", "update", "-un", "$(sparql_username)", "-pw", "$(sparql_password)", "-f", "$(input_file)"]
      restartPolicy: OnFailure