feat(infra): replace RabbitMQ with LavinMQ
This commit is contained in:
@@ -0,0 +1,100 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: lavinmq
|
||||
stringData:
|
||||
AMQP_URL: "amqp://guest:guest@lavinmq:5672/"
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: lavinmq
|
||||
release: lavinmq
|
||||
name: lavinmq
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: lavinmq
|
||||
strategy:
|
||||
rollingUpdate:
|
||||
maxSurge: 1
|
||||
maxUnavailable: 1
|
||||
type: RollingUpdate
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: lavinmq
|
||||
spec:
|
||||
containers:
|
||||
- image: cloudamqp/lavinmq:2.6.8
|
||||
imagePullPolicy: Always
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
port: 5672
|
||||
failureThreshold: 6
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 10
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 5
|
||||
name: lavinmq
|
||||
ports:
|
||||
- containerPort: 5672
|
||||
name: amqp
|
||||
protocol: TCP
|
||||
- containerPort: 15672
|
||||
name: stats
|
||||
protocol: TCP
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
port: 15672
|
||||
path: /api/whoami
|
||||
httpHeaders:
|
||||
- name: "Authorization"
|
||||
value: "Basic Z3Vlc3Q6Z3Vlc3Q="
|
||||
failureThreshold: 3
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 5
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 3
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 256Mi
|
||||
terminationMessagePath: /dev/termination-log
|
||||
terminationMessagePolicy: File
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /var/lib/lavinmq
|
||||
volumes:
|
||||
- name: data
|
||||
hostPath:
|
||||
path: /data/lavinmq
|
||||
dnsPolicy: ClusterFirst
|
||||
restartPolicy: Always
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: lavinmq
|
||||
release: lavinmq
|
||||
name: lavinmq
|
||||
spec:
|
||||
externalTrafficPolicy: Cluster
|
||||
ports:
|
||||
- name: amqp
|
||||
nodePort: 5672
|
||||
port: 5672
|
||||
protocol: TCP
|
||||
targetPort: amqp
|
||||
- name: stats
|
||||
nodePort: 15672
|
||||
port: 15672
|
||||
protocol: TCP
|
||||
targetPort: stats
|
||||
selector:
|
||||
app.kubernetes.io/name: lavinmq
|
||||
sessionAffinity: None
|
||||
type: NodePort
|
||||
Reference in New Issue
Block a user