---
apiVersion: batch/v1
kind: CronJob
metadata:
  name: solr-crawler
spec:
  schedule: "10 9 * * *"  
  concurrencyPolicy: Forbid
  startingDeadlineSeconds: 30
  successfulJobsHistoryLimit: 5
  failedJobsHistoryLimit: 5
  jobTemplate:
    spec:            
      template:
        spec:
          restartPolicy: Never
          containers:
          - name: solr-crawler
            image: inovtst9.u-aizu.ac.jp/library/solr-crawler:1.1.0
            env:
            - name: LC_CTYPE
              value: ja_JP.UTF-8
            - name: TARGET_URL
              value: "https://u-aizu.ac.jp/~yasu-abe/ja/"
            - name: VISIT_URL_PATTERN
              value: "^https://u-aizu.ac.jp/~yasu-abe/.+$"
            - name: OK_FILTER
              value: ".*(\\.(text|txt|html|htm|yaml|yml|csv|json))$|.*/$"
            - name: MYC_SOLR_URL
              value: "http://solr:8983/solr/testcore"