Files
k3s-cluster/myorg-assistant/cronjobs/waiting-followup.yaml
Platform Engineer a84e348263 fix(myorg-assistant): fix CronJob image refs to use full registry path + imagePullSecrets
CronJobs were using bare image name 'myorg-assistant:latest' with
imagePullPolicy: IfNotPresent and no imagePullSecrets. K8s tried to
pull from Docker Hub → ImagePullBackOff on all 4 running CronJob pods.

Changed to git.rogi.casa/roger/myorg-assistant/myorg-assistant:fcf79bf
(matching the Deployment), imagePullPolicy: Always, and added
imagePullSecrets: gitea-registry to all 5 CronJob manifests.
2026-07-05 19:02:46 +00:00

63 lines
1.8 KiB
YAML

apiVersion: batch/v1
kind: CronJob
metadata:
name: myorg-waiting-followup
namespace: myorg-assistant
labels:
app: myorg-assistant
job: waiting-followup
spec:
# Run every Monday at 9:00 AM
schedule: "0 9 * * 1"
timeZone: "Europe/Madrid"
successfulJobsHistoryLimit: 2
failedJobsHistoryLimit: 2
concurrencyPolicy: Forbid
jobTemplate:
spec:
template:
metadata:
labels:
app: myorg-assistant
job: waiting-followup
spec:
restartPolicy: OnFailure
imagePullSecrets:
- name: gitea-registry
containers:
- name: waiting-followup
image: git.rogi.casa/roger/myorg-assistant/myorg-assistant:fcf79bf
imagePullPolicy: Always
command:
- python
- run_job.py
- waiting-followup
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