bez ispravljeni koda
This commit is contained in:
@@ -1,58 +1,28 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: moj-servis
|
||||
name: hello-cicd
|
||||
namespace: student-sz11zs
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: moj-servis
|
||||
app: hello-cicd
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: moj-servis
|
||||
app: hello-cicd
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: gitea-creds
|
||||
containers:
|
||||
- name: moj-servis
|
||||
image: git.fpmoz.sum.ba/sz11zs/moj-servis:1.1
|
||||
- name: hello-cicd
|
||||
image: git.fpmoz.sum.ba/sz11zs/hello-cicd:latest
|
||||
ports:
|
||||
- containerPort: 8000
|
||||
|
||||
# 1. POVEZIVANJE S OKOLINSKIM VARIJABLAMA (Secret i ConfigMap)
|
||||
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
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: moj-servis-config
|
||||
|
||||
# 2. LIVENESS PROBE: Dodano za Korak 1.4
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: 8000
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 15
|
||||
timeoutSeconds: 3
|
||||
failureThreshold: 3
|
||||
|
||||
# 3. READINESS PROBE: Dodano za Korak 1.4
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: 8000
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 2
|
||||
failureThreshold: 2
|
||||
- name: APP_VERSION
|
||||
value: "latest"
|
||||
resources:
|
||||
requests: {cpu: 50m, memory: 64Mi}
|
||||
limits: {cpu: 200m, memory: 128Mi}
|
||||
|
||||
Reference in New Issue
Block a user