feat(bot): ✨ Migrate from Citus to PostgreSQL.

This commit is contained in:
Nyeki.py
2024-11-01 14:37:30 -03:00
parent f9da23fc1a
commit 00ad045a35
3 changed files with 17 additions and 64 deletions
+54
View File
@@ -0,0 +1,54 @@
apiVersion: v1
kind: Service
metadata:
name: postgresql
spec:
type: ClusterIP # Internal access only
selector:
app: postgresql
ports:
- protocol: TCP
port: 5432
targetPort: 5432
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: postgresql
spec:
serviceName: postgresql
replicas: 1 # Single-node PostgreSQL
selector:
matchLabels:
app: postgresql
template:
metadata:
labels:
app: postgresql
spec:
containers:
- name: postgres
image: postgres:latest # Standard PostgreSQL image
env:
- name: POSTGRES_DB
value: "payphone"
- name: POSTGRES_USER
value: "payphone"
- name: POSTGRES_PASSWORD
value: "payphone"
ports:
- containerPort: 5432
volumeMounts:
- name: postgres-storage
mountPath: /var/lib/postgresql/data
subPath: postgres
volumeClaimTemplates:
- metadata:
name: postgres-storage
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: openebs-hostpath # Your storage class
resources:
requests:
storage: 20Gi # Adjust storage as needed