apiVersion: batch/v1
kind: CronJob
metadata:
  name: crawl-cubanews
  labels:
    project: cubanews
spec:
  schedule: "0 8 * * *"
  jobTemplate:
    spec:
      template:
        spec:
          containers:
            - name: crawl-cubanews
              image: curlimages/curl:7.72.0
              imagePullPolicy: IfNotPresent
              command:
                - /bin/sh
                - -ec
                - "curl --location --request POST 'https://cubanews.icu/api/crawl' --header 'Content-Type: application/json' --data-raw '{ \"indexName\": \"cubanews\", \"baseUrls\": [ \"https://adncuba.com/noticias-de-cuba\", \"https://www.14ymedio.com/\", \"https://www.cibercuba.com/noticias\" ] }'"
          restartPolicy: OnFailure
