feat(bot): Update stuff to migrate to k8s.
This commit is contained in:
+11
-8
@@ -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
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: citus-loadbalancer
|
||||
spec:
|
||||
type: LoadBalancer
|
||||
selector:
|
||||
app: citus
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 5432
|
||||
targetPort: 5432
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: citus-headless
|
||||
spec:
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: bot-config
|
||||
data:
|
||||
SUGGESTIONS_CHANNEL_ID: "1287841493343801447"
|
||||
SERVER_INVITE: "https://discord.gg/Cb3rCrTxmm"
|
||||
@@ -0,0 +1,7 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: bot-secrets
|
||||
type: Opaque
|
||||
data:
|
||||
TOKEN: TVRJMU56ZzVOemMxT1RRM09URTNNekl4TWcuR2J0d0dsLk9IVGJmN2JScVZHa0tTeXNPTzRGUXAzQnV0MmxISUF6dGpuZnhz
|
||||
Reference in New Issue
Block a user