0af9c3935b
- PostgreSQL StatefulSet with ConfigMap, Secret, and Service - Backend Deployment with health checks and resource limits - Frontend Deployment with health checks and resource limits - Ingress configuration for traefik/nginx ingress controllers - Comprehensive deployment report documenting staging setup - All services running and healthy with 0 restarts - Database schema migration pending Staging cluster status: - gravl-backend: 1/1 Running ✅ - gravl-frontend: 1/1 Running ✅ - gravl-db: 1/1 Running ✅ - Ingress: traefik configured and responding ✅
93 lines
2.1 KiB
YAML
93 lines
2.1 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: gravl-backend
|
|
namespace: gravl-staging
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: gravl-backend
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: gravl-backend
|
|
spec:
|
|
containers:
|
|
- name: gravl-backend
|
|
image: gravl-gravl-backend:latest
|
|
imagePullPolicy: IfNotPresent
|
|
ports:
|
|
- name: http
|
|
containerPort: 3001
|
|
env:
|
|
- name: NODE_ENV
|
|
value: "production"
|
|
- name: DB_HOST
|
|
value: "postgres.gravl-prod.svc.cluster.local"
|
|
- name: DB_PORT
|
|
value: "5432"
|
|
- name: DB_NAME
|
|
value: "gravl"
|
|
- name: DB_USER
|
|
value: "gravl_user"
|
|
- name: DB_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: postgres-secret
|
|
key: POSTGRES_PASSWORD
|
|
- name: LOG_LEVEL
|
|
value: "info"
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: 3001
|
|
initialDelaySeconds: 30
|
|
periodSeconds: 10
|
|
timeoutSeconds: 5
|
|
failureThreshold: 3
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: 3001
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 5
|
|
timeoutSeconds: 3
|
|
failureThreshold: 3
|
|
resources:
|
|
requests:
|
|
memory: "512Mi"
|
|
cpu: "250m"
|
|
limits:
|
|
memory: "1Gi"
|
|
cpu: "500m"
|
|
affinity:
|
|
podAntiAffinity:
|
|
preferredDuringSchedulingIgnoredDuringExecution:
|
|
- weight: 100
|
|
podAffinityTerm:
|
|
labelSelector:
|
|
matchExpressions:
|
|
- key: app
|
|
operator: In
|
|
values:
|
|
- gravl-backend
|
|
topologyKey: kubernetes.io/hostname
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: gravl-backend
|
|
namespace: gravl-staging
|
|
labels:
|
|
app: gravl-backend
|
|
spec:
|
|
type: ClusterIP
|
|
selector:
|
|
app: gravl-backend
|
|
ports:
|
|
- name: http
|
|
port: 3001
|
|
targetPort: 3001
|
|
protocol: TCP
|