2026-01-16 20:33:37 +00:00
|
|
|
|
|
|
|
|
apiVersion: batch/v1
|
|
|
|
|
kind: CronJob
|
|
|
|
|
metadata:
|
|
|
|
|
name: news-scraper
|
|
|
|
|
namespace: customer1
|
|
|
|
|
spec:
|
|
|
|
|
schedule: "0 * * * *"
|
|
|
|
|
jobTemplate:
|
|
|
|
|
spec:
|
|
|
|
|
template:
|
|
|
|
|
spec:
|
|
|
|
|
containers:
|
|
|
|
|
- name: news-scraper
|
2026-02-07 22:44:08 +00:00
|
|
|
image: siriussec/newsscraper:0.5.3
|
|
|
|
|
imagePullPolicy: "Always"
|
2026-02-07 22:13:17 +00:00
|
|
|
|
2026-01-21 20:37:07 -05:00
|
|
|
resources:
|
|
|
|
|
requests:
|
|
|
|
|
memory: "256Mi"
|
|
|
|
|
cpu: "100m"
|
|
|
|
|
limits:
|
|
|
|
|
memory: "512Mi"
|
|
|
|
|
cpu: "500m"
|
2026-01-16 20:33:37 +00:00
|
|
|
envFrom:
|
|
|
|
|
- configMapRef:
|
|
|
|
|
name: scrapy-config
|
|
|
|
|
env:
|
|
|
|
|
- name: DB_PASSWORD
|
|
|
|
|
valueFrom:
|
|
|
|
|
secretKeyRef:
|
|
|
|
|
name: news-user-password
|
|
|
|
|
key: password
|
|
|
|
|
volumeMounts:
|
|
|
|
|
- name: url-storage
|
|
|
|
|
mountPath: /app/urls.txt
|
|
|
|
|
subPath: urls.txt
|
2026-01-21 20:37:07 -05:00
|
|
|
|
|
|
|
|
- mountPath: /dev/shm
|
|
|
|
|
name: dshm
|
2026-01-16 20:33:37 +00:00
|
|
|
volumes:
|
|
|
|
|
- name: url-storage
|
|
|
|
|
configMap:
|
|
|
|
|
name: scrapy-urls
|
2026-01-21 20:37:07 -05:00
|
|
|
- name: dshm
|
|
|
|
|
emptyDir:
|
|
|
|
|
medium: Memory
|
2026-01-16 20:33:37 +00:00
|
|
|
restartPolicy: OnFailure
|
|
|
|
|
|