feat(bot): ✨ Move background tasks to separate image.

This commit is contained in:
Nyeki.py
2024-11-01 01:52:53 -03:00
parent cd578e43bd
commit 3c7d9e193c
11 changed files with 71 additions and 32 deletions
+2 -2
View File
@@ -17,7 +17,7 @@ spec:
spec:
containers:
- name: bot
image: git.nyeki.dev/payphone/payphone:latest
image: git.nyeki.dev/payphone/payphone-shard:latest
imagePullPolicy: "Always"
envFrom:
- configMapRef:
@@ -41,7 +41,7 @@ spec:
cpu: "250m"
memory: "256Mi"
imagePullSecrets:
- name: regcred
- name: regcred
volumeClaimTemplates:
- metadata:
name: bot-storage
+1 -1
View File
@@ -64,4 +64,4 @@ spec:
storageClassName: "standard" # Update based on your storage class
resources:
requests:
storage: 5Gi # Size for each pod's storage
storage: 20Gi # Size for each pod's storage
+17
View File
@@ -0,0 +1,17 @@
apiVersion: batch/v1
kind: CronJob
metadata:
name: tasks
spec:
schedule: "* * * * *"
jobTemplate:
spec:
template:
spec:
containers:
- name: tasks
image: git.nyeki.dev/payphone/payphone-tasks:latest
command: ["uv", "run", "--no-dev", "tasks.py", "flush"]
restartPolicy: OnFailure
imagePullSecrets:
- name: regcred