feat: Add k8s deployment manifests for staging environment (Phase 10-07, Task 2)
- 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 ✅
This commit is contained in:
@@ -0,0 +1,77 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: gravl-frontend
|
||||
namespace: gravl-staging
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: gravl-frontend
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: gravl-frontend
|
||||
spec:
|
||||
containers:
|
||||
- name: gravl-frontend
|
||||
image: gravl-gravl-frontend:latest
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 80
|
||||
env:
|
||||
- name: API_URL
|
||||
value: "http://gravl-backend:3001"
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 80
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 3
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 80
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 5
|
||||
timeoutSeconds: 3
|
||||
failureThreshold: 3
|
||||
resources:
|
||||
requests:
|
||||
memory: "256Mi"
|
||||
cpu: "100m"
|
||||
limits:
|
||||
memory: "512Mi"
|
||||
cpu: "250m"
|
||||
affinity:
|
||||
podAntiAffinity:
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
- weight: 100
|
||||
podAffinityTerm:
|
||||
labelSelector:
|
||||
matchExpressions:
|
||||
- key: app
|
||||
operator: In
|
||||
values:
|
||||
- gravl-frontend
|
||||
topologyKey: kubernetes.io/hostname
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: gravl-frontend
|
||||
namespace: gravl-staging
|
||||
labels:
|
||||
app: gravl-frontend
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
app: gravl-frontend
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
targetPort: 80
|
||||
protocol: TCP
|
||||
Reference in New Issue
Block a user