66 lines
1.4 KiB
YAML
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: |