feat(bot): Update stuff to migrate to k8s.

This commit is contained in:
Nyeki.py
2024-10-31 04:57:58 -03:00
parent d20f808b88
commit c0616cbcfe
16 changed files with 367 additions and 330 deletions
+11 -8
View File
@@ -6,7 +6,7 @@ metadata:
app: bot
spec:
serviceName: "bot-headless"
replicas: 2
replicas: 1 # Adjust this manually together with env.TOTAL_SHARDS down below.
selector:
matchLabels:
app: bot
@@ -17,7 +17,12 @@ spec:
spec:
containers:
- name: bot
image: nekidev/payphone:latest
image: git.nyeki.dev/payphone/payphone:latest
envFrom:
- configMapRef:
name: bot-config
- secretsRef:
name: bot-secrets
env:
- name: IS_DEBUG
value: "false"
@@ -25,17 +30,15 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.labels['apps.kubernetes.io/pod-index']
- name: TOTAL_SHARDS
value: "2" # Adjust this manually or with a ConfigMap
- name: SHARD_COUNT
value: "1" # Adjust this manually together with spec.replicas up at the top.
resources:
limits:
cpu: "500m"
memory: "512Mi"
cpu: "1000m"
memory: "1Gi"
requests:
cpu: "250m"
memory: "256Mi"
imagePullSecrets:
- name: regcred
volumeClaimTemplates:
- metadata:
name: bot-storage