URL-5 Added Kubernetes manifests, services and deployments. Also included Ingress and namespace and service configs.

This commit is contained in:
LenaGmbh
2026-01-07 16:21:29 +01:00
parent 22bb61abac
commit 0d02f3e8aa
14 changed files with 562 additions and 0 deletions

View File

@@ -0,0 +1,79 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: shortener-service
namespace: urlshortener
labels:
app: shortener-service
component: backend
spec:
replicas: 2
selector:
matchLabels:
app: shortener-service
template:
metadata:
labels:
app: shortener-service
component: backend
spec:
containers:
- name: shortener-service
image: shortener-service:latest
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8083
name: http
protocol: TCP
env:
- name: SERVER_PORT
value: "8083"
- name: SPRING_APPLICATION_NAME
value: shortener-service
- name: SPRING_R2DBC_PASSWORD
valueFrom:
secretKeyRef:
name: urlshortener-secrets
key: database-password
envFrom:
- configMapRef:
name: application-config
- configMapRef:
name: database-config
- configMapRef:
name: service-config
- secretRef:
name: urlshortener-secrets
resources:
requests:
memory: "256Mi"
cpu: "100m"
limits:
memory: "512Mi"
cpu: "500m"
livenessProbe:
httpGet:
path: /actuator/health/liveness
port: 8083
initialDelaySeconds: 60
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 3
readinessProbe:
httpGet:
path: /actuator/health/readiness
port: 8083
initialDelaySeconds: 30
periodSeconds: 5
timeoutSeconds: 3
failureThreshold: 3
startupProbe:
httpGet:
path: /actuator/health
port: 8083
initialDelaySeconds: 0
periodSeconds: 10
timeoutSeconds: 3
failureThreshold: 30
restartPolicy: Always