Private
Public Access
1
0

Add NATS deployment and service configuration, integrate environment variables, and update server to support NATS and Redis connections.
All checks were successful
Dynamic Branch Deploy / build-and-deploy (push) Successful in 2m24s

This commit is contained in:
Sebastian Unterschütz
2026-01-04 15:37:09 +01:00
parent ecd994ae73
commit 43680ece16
4 changed files with 73 additions and 2 deletions

View File

@@ -22,6 +22,11 @@ spec:
- containerPort: 8080
name: http
protocol: TCP
env:
- name: REDIS_ADDR
value: "redis-service:6379"
- name: NATS_URL
value: "nats://nats-service:4222"
livenessProbe:
httpGet:
path: /health

55
k8s/nats.yaml Normal file
View File

@@ -0,0 +1,55 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: nats
labels:
app: nats
spec:
replicas: 1
selector:
matchLabels:
app: nats
template:
metadata:
labels:
app: nats
spec:
containers:
- name: nats
image: nats:2-alpine
ports:
- containerPort: 4222
name: client
- containerPort: 8222
name: monitoring
resources:
requests:
memory: "64Mi"
cpu: "100m"
limits:
memory: "256Mi"
cpu: "500m"
args:
- "-js"
- "-m"
- "8222"
---
apiVersion: v1
kind: Service
metadata:
name: nats-service
labels:
app: nats
spec:
type: ClusterIP
selector:
app: nats
ports:
- port: 4222
targetPort: 4222
name: client
protocol: TCP
- port: 8222
targetPort: 8222
name: monitoring
protocol: TCP