Fixes #1893 - Removes crawl workflow-scoped configmaps, and replaces with operator-controlled per-crawl configmaps that only contain the json config passed to Browsertrix Crawler (as a volume). - Other configmap settings replaced are replaced the custom CrawlJob options (mostly already were, just added profile_filename and storage_filename) - Cron jobs also updated to create CrawlJob without relying on configmaps, querying the db for additional settings. - The `userid` associated with cron jobs is set to the user that last modified the schedule of the crawl, rather than whomever last modified the workflow - Various functions that deal with updating configmaps have been removed, including in migrations. - New migration 0029 added to remove all crawl workflow configmaps
		
			
				
	
	
		
			35 lines
		
	
	
		
			689 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			35 lines
		
	
	
		
			689 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
| apiVersion: batch/v1
 | |
| kind: CronJob
 | |
| metadata:
 | |
|   name: "{{ id }}"
 | |
|   labels:
 | |
|     btrix.crawlconfig: "{{ cid }}"
 | |
|     btrix.org: "{{ oid }}"
 | |
| {% if userid %}
 | |
|     btrix.userid: "{{ userid }}"
 | |
| {% endif %}
 | |
|     role: "cron-job"
 | |
| 
 | |
| spec:
 | |
|   concurrencyPolicy: Forbid
 | |
|   successfulJobsHistoryLimit: 0
 | |
|   failedJobsHistoryLimit: 2
 | |
| 
 | |
|   schedule: "{{ schedule }}"
 | |
| 
 | |
|   jobTemplate:
 | |
|     metadata:
 | |
|       labels:
 | |
|         btrix.crawlconfig: "{{ cid }}"
 | |
|         role: "scheduled-crawljob"
 | |
| 
 | |
|     spec:
 | |
|       suspend: true
 | |
|       template:
 | |
|         spec:
 | |
|           restartPolicy: Never
 | |
|           containers:
 | |
|             - name: noop
 | |
|               image: "docker.io/tianon/true"
 | |
|               imagePullPolicy: IfNotPresent
 |