feat(bot): ✨ Move background tasks to separate image.
This commit is contained in:
+2
-2
@@ -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
@@ -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
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user