- Replace non-persistent emptyDir with PersistentVolumeClaim for database storage - Add imagePullSecrets to both API and frontend deployments for private registry access - Implement database initialization Job that creates schema and populates fake data - Fix incomplete frontend-deployment.yaml YAML structure - Add database initialization ServiceAccount with minimal privileges - Ensure idempotent initialization (checks if DB exists before creating) - Update kustomization.yaml to include all new resources in correct order These changes ensure the deployment: 1. Persists database across pod restarts 2. Authenticates with private container registry 3. Automatically initializes the database with schema and sample KPI data 4. Follows DRY and KISS principles with single reusable init job 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
51 lines
1.1 KiB
YAML
51 lines
1.1 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: sqdc-frontend
|
|
namespace: sqdc-dashboard
|
|
labels:
|
|
app: sqdc-frontend
|
|
spec:
|
|
replicas: 2
|
|
selector:
|
|
matchLabels:
|
|
app: sqdc-frontend
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: sqdc-frontend
|
|
spec:
|
|
containers:
|
|
- name: frontend
|
|
image: gitea.vidoks.fr/sortifal/pfee-frontend:latest
|
|
imagePullPolicy: Always
|
|
ports:
|
|
- containerPort: 80
|
|
name: http
|
|
protocol: TCP
|
|
resources:
|
|
requests:
|
|
memory: "64Mi"
|
|
cpu: "50m"
|
|
limits:
|
|
memory: "128Mi"
|
|
cpu: "100m"
|
|
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: 2
|
|
imagePullSecrets:
|
|
- name: registry-credentials
|