Files
stack/deploy/k8s/api-eventbus.yml
Piotr Biernat 0938338b99 Removed docker swarm config
Added K8S config
With big refactor
2025-10-20 13:51:45 +02:00

66 lines
1.4 KiB
YAML

apiVersion: v1
kind: Service
metadata:
name: api-eventbus
namespace: egommerce
labels:
app: api-eventbus
spec:
type: NodePort
selector:
app: api-eventbus
ports:
- name: api-eventbus-mngmnt
protocol: TCP
port: 15672
nodePort: 31200
# - name: api-eventbus-metrics
# protocol: TCP
# port: 15692
# nodePort: 31201
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: api-eventbus
namespace: egommerce
spec:
replicas: 1
selector:
matchLabels:
app: api-eventbus
template:
metadata:
labels:
app: api-eventbus
spec:
containers:
- name: api-eventbus
image: git.ego.freeddns.org/egommerce/api-eventbus:dev
imagePullPolicy: Always
command: [
"rabbitmq-server"
]
env:
- name: APP_NAME
value: api-eventbus
- name: RABBITMQ_ERLANG_COOKIE
value: rabbitmq
volumeMounts:
- name: eventbus-data
mountPath: /var/lib/rabbitmq
- name: eventbus-logs
mountPath: /var/log/rabbitmq
resources:
limits:
cpu: "1"
memory: 1G
ports:
- containerPort: 5672
- containerPort: 15672
- containerPort: 15692
volumes:
- name: eventbus-data
emptyDir:
- name: eventbus-logs
emptyDir: