forked from roger/k3s-cluster
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
733 B
YAML
30 lines
733 B
YAML
apiVersion: batch/v1
|
|
kind: CronJob
|
|
metadata:
|
|
name: myorg-git-sync
|
|
namespace: myorg-assistant
|
|
labels:
|
|
app: myorg-assistant
|
|
job: git-sync
|
|
spec:
|
|
# Run every 15 minutes
|
|
schedule: "*/15 * * * *"
|
|
timeZone: "Europe/Madrid"
|
|
successfulJobsHistoryLimit: 1
|
|
failedJobsHistoryLimit: 2
|
|
concurrencyPolicy: Forbid
|
|
jobTemplate:
|
|
spec:
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: myorg-assistant
|
|
job: git-sync
|
|
spec:
|
|
restartPolicy: OnFailure
|
|
imagePullSecrets:
|
|
- name: gitea-registry
|
|
containers:
|
|
- name: git-sync
|
|
image: git.rogi.casa/roger/myorg-assistant/myorg-assistant:fcf79bf
|
|
imagePullPolicy: Always |