Files
manifesti/k8s/moj-servis/deployment.yaml
2026-05-03 00:05:01 +00:00

60 lines
1.3 KiB
YAML

# k8s/moj-servis/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: moj-servis
namespace: student-mihaeljanjic
spec:
replicas: 1
selector:
matchLabels:
app: moj-servis
template:
metadata:
labels:
app: moj-servis
spec:
containers:
- name: moj-servis
image: git.fpmoz.sum.ba/mihaeljanjic/moj-servis:3.2
ports:
- containerPort: 8000
livenessProbe:
httpGet:
path: /health
port: 8000
initialDelaySeconds: 10
periodSeconds: 15
timeoutSeconds: 3
failureThreshold: 3
readinessProbe:
httpGet:
path: /health
port: 8000
initialDelaySeconds: 5
periodSeconds: 10
timeoutSeconds: 2
failureThreshold: 2
envFrom:
- configMapRef:
name: moj-servis-config
env:
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
name: moj-servis-secret
key: DB_PASSWORD
- name: API_KEY
valueFrom:
secretKeyRef:
name: moj-servis-secret
key: API_KEY
resources:
requests:
memory: "64Mi"
cpu: "50m"
limits:
memory: "128Mi"
cpu: "200m"