CronJobs were referencing 'myorg-assistant:latest' (a local image that doesn't exist in the cluster), causing ImagePullBackOff on all 4 active CronJob pods. Updated all 5 CronJob manifests to use the same image as the Deployment (git.rogi.casa/roger/myorg-assistant/myorg-assistant:fcf79bf) and added imagePullSecrets: gitea-registry for authentication.
63 lines
1.8 KiB
YAML
63 lines
1.8 KiB
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: IfNotPresent
|
|
command:
|
|
- python
|
|
- run_job.py
|
|
- evening-summary
|
|
env:
|
|
- name: MYORG_REPO_PATH
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: myorg-assistant-config
|
|
key: MYORG_REPO_PATH
|
|
- name: DISCORD_BOT_TOKEN
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: myorg-assistant-secret
|
|
key: DISCORD_BOT_TOKEN
|
|
- name: DISCORD_CHANNEL_ID
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: myorg-assistant-secret
|
|
key: DISCORD_CHANNEL_ID
|
|
- name: LITELLM_API_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: myorg-assistant-secret
|
|
key: LITELLM_API_KEY
|
|
volumeMounts:
|
|
- name: myorg-data
|
|
mountPath: /data/myorg
|
|
volumes:
|
|
- name: myorg-data
|
|
persistentVolumeClaim:
|
|
claimName: myorg-assistant-pvc
|