All 5 CronJob manifests referenced 'myorg-assistant:latest' with imagePullPolicy: IfNotPresent, but that image was never pushed to any registry. The Deployment already uses the correct registry image (git.rogi.casa/roger/myorg-assistant/myorg-assistant:fcf79bf), so the CronJob pods were stuck in ImagePullBackOff indefinitely. Fix: use the same registry image + imagePullPolicy: Always.
30 lines
763 B
YAML
30 lines
763 B
YAML
apiVersion: batch/v1
|
|
kind: CronJob
|
|
metadata:
|
|
name: myorg-evening-summary
|
|
namespace: myorg-assistant
|
|
labels:
|
|
app: myorg-assistant
|
|
job: evening-summary
|
|
spec:
|
|
# Run at 8:00 PM every day
|
|
schedule: "0 20 * * *"
|
|
timeZone: "Europe/Madrid"
|
|
successfulJobsHistoryLimit: 3
|
|
failedJobsHistoryLimit: 3
|
|
concurrencyPolicy: Forbid
|
|
jobTemplate:
|
|
spec:
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: myorg-assistant
|
|
job: evening-summary
|
|
spec:
|
|
restartPolicy: OnFailure
|
|
imagePullSecrets:
|
|
- name: gitea-registry
|
|
containers:
|
|
- name: evening-summary
|
|
image: git.rogi.casa/roger/myorg-assistant/myorg-assistant:fcf79bf
|
|
imagePullPolicy: Always |