51 lines
1.0 KiB
YAML
51 lines
1.0 KiB
YAML
|
|
apiVersion: v1
|
||
|
|
kind: Service
|
||
|
|
metadata:
|
||
|
|
name: rabbit
|
||
|
|
namespace: audio-pipeline
|
||
|
|
spec:
|
||
|
|
selector:
|
||
|
|
app: rabbit
|
||
|
|
ports:
|
||
|
|
- name: amqp
|
||
|
|
port: 5672
|
||
|
|
targetPort: 5672
|
||
|
|
- name: management
|
||
|
|
port: 15672
|
||
|
|
targetPort: 15672
|
||
|
|
---
|
||
|
|
apiVersion: apps/v1
|
||
|
|
kind: Deployment
|
||
|
|
metadata:
|
||
|
|
name: rabbit
|
||
|
|
namespace: audio-pipeline
|
||
|
|
spec:
|
||
|
|
replicas: 1
|
||
|
|
selector:
|
||
|
|
matchLabels:
|
||
|
|
app: rabbit
|
||
|
|
template:
|
||
|
|
metadata:
|
||
|
|
labels:
|
||
|
|
app: rabbit
|
||
|
|
spec:
|
||
|
|
containers:
|
||
|
|
- name: rabbitmq
|
||
|
|
image: rabbitmq:3-management-alpine
|
||
|
|
ports:
|
||
|
|
- containerPort: 5672
|
||
|
|
- containerPort: 15672
|
||
|
|
envFrom:
|
||
|
|
- secretRef:
|
||
|
|
name: app-secrets
|
||
|
|
readinessProbe:
|
||
|
|
exec:
|
||
|
|
command: ["rabbitmq-diagnostics", "-q", "ping"]
|
||
|
|
initialDelaySeconds: 10
|
||
|
|
periodSeconds: 10
|
||
|
|
livenessProbe:
|
||
|
|
exec:
|
||
|
|
command: ["rabbitmq-diagnostics", "-q", "ping"]
|
||
|
|
initialDelaySeconds: 30
|
||
|
|
periodSeconds: 30
|