This commit is contained in:
ITO Mac
2026-05-04 16:10:31 +02:00
parent 00cac53ff3
commit 739f70b440
7 changed files with 221 additions and 0 deletions

9
k8s/configmap.yaml Normal file
View File

@@ -0,0 +1,9 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: zadaca-config
namespace: student-blazp04
data:
SERVICE_NAME: "distribuirani-service"
LOG_LEVEL: "info"
WELCOME_MSG: "Zadaca 1"

37
k8s/deployment.yaml Normal file
View File

@@ -0,0 +1,37 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: zadaca-deployment
namespace: student-blazp04
spec:
replicas: 1
selector:
matchLabels:
app: zadaca
template:
metadata:
labels:
app: zadaca
spec:
containers:
- name: zadaca
image: git.fpmoz.sum.ba/blazp04/zadaca:latest
ports:
- containerPort: 8000
envFrom:
- configMapRef:
name: zadaca-config
readinessProbe:
httpGet:
path: /health
port: 8000
initialDelaySeconds: 3
periodSeconds: 5
resources:
requests:
memory: "64Mi"
cpu: "50m"
limits:
memory: "128Mi"
cpu: "200m"

19
k8s/ingress.yaml Normal file
View File

@@ -0,0 +1,19 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: zadaca-ingress
namespace: student-blazp04
annotations:
traefik.ingress.kubernetes.io/router.entrypoints: web
spec:
rules:
- host: blazp04-zadaca.argocd.fpmoz.sum.ba
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: zadaca-service
port:
number: 80

13
k8s/service.yaml Normal file
View File

@@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
name: zadaca-service
namespace: student-blazp04
spec:
selector:
app: zadaca
ports:
- port: 80
targetPort: 8000
protocol: TCP
type: ClusterIP