Files
elixirAI/kubernetes/db.yml
Alex Mickelson 25be2e5210
All checks were successful
CI/CD Pipeline / build (push) Successful in 11s
db startup
2026-03-09 15:12:10 -06:00

61 lines
1.3 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: postgres
namespace: ai-ha-elixir
spec:
replicas: 1
selector:
matchLabels:
app: postgres
template:
metadata:
labels:
app: postgres
spec:
containers:
- name: postgres
image: postgres:16
ports:
- containerPort: 5432
env:
- name: POSTGRES_USER
value: "elixir_ai"
- name: POSTGRES_PASSWORD
value: "elixir_ai"
- name: POSTGRES_DB
value: "elixir_ai"
volumeMounts:
- name: schema
mountPath: /docker-entrypoint-initdb.d
readOnly: true
readinessProbe:
exec:
command: ["pg_isready", "-U", "elixir_ai"]
initialDelaySeconds: 5
periodSeconds: 5
resources:
requests:
memory: "128Mi"
cpu: "100m"
limits:
memory: "512Mi"
cpu: "500m"
volumes:
- name: schema
configMap:
name: db-schema
---
apiVersion: v1
kind: Service
metadata:
name: postgres
namespace: ai-ha-elixir
spec:
selector:
app: postgres
ports:
- port: 5432
targetPort: 5432