Files
math-tables/deploy/base/deployment.yaml
Rene Luria 75548dab2b feat: migrate to S3 storage with automatic download and timestamped filenames
- Replace local file storage with S3-compatible object storage

- Add automatic PDF download after generation

- Include timestamps in filenames to ensure uniqueness

- Remove unused static volume from Kubernetes deployment

- Update ConfigMap to remove unused variables and add S3 configuration

- Configure S3 credentials via Kubernetes secrets for both dev and prod environments

- Add boto3 dependency for S3 integration
2025-09-03 22:41:16 +02:00

68 lines
1.6 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: math-exercises-app
labels:
app: math-exercises
spec:
replicas: 2
selector:
matchLabels:
app: math-exercises
template:
metadata:
labels:
app: math-exercises
spec:
# Security context for the pod
securityContext:
runAsNonRoot: true
runAsUser: 1000
fsGroup: 2000
seccompProfile:
type: RuntimeDefault
containers:
- name: math-exercises
image: math-exercises:latest
ports:
- containerPort: 8000
# Security context for the container
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 1000
capabilities:
drop:
- ALL
# Resource limits and requests
resources:
requests:
memory: "64Mi"
cpu: "250m"
limits:
memory: "128Mi"
cpu: "500m"
# Liveness probe
livenessProbe:
httpGet:
path: /
port: 8000
initialDelaySeconds: 30
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 3
# Readiness probe
readinessProbe:
httpGet:
path: /
port: 8000
initialDelaySeconds: 5
periodSeconds: 10
timeoutSeconds: 3
failureThreshold: 3
# Environment variables from ConfigMap
envFrom:
- configMapRef:
name: math-exercises-config