64 lines
1.4 KiB
YAML
64 lines
1.4 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: moj-servis
|
|
namespace: student-leonarda11
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: moj-servis
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: moj-servis
|
|
spec:
|
|
containers:
|
|
- name: moj-servis
|
|
image: git.fpmoz.sum.ba/leonarda11/moj-servis:1.2
|
|
ports:
|
|
- containerPort: 8000
|
|
|
|
# ── Liveness
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: 8000
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 15
|
|
timeoutSeconds: 3
|
|
failureThreshold: 3
|
|
|
|
# ── Readiness
|
|
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" |