forked from xiaohei/taiji-AI-PAD
75 lines
1.4 KiB
YAML
75 lines
1.4 KiB
YAML
# NATS Message Queue Deployment (测试环境)
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: nats
|
|
namespace: taiji-ai-test
|
|
labels:
|
|
app: nats
|
|
environment: test
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: nats
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: nats
|
|
spec:
|
|
containers:
|
|
- name: nats
|
|
image: nats:2.10-alpine
|
|
args: ["-js", "-m", "8222"]
|
|
ports:
|
|
- containerPort: 4222
|
|
name: client
|
|
- containerPort: 6222
|
|
name: routing
|
|
- containerPort: 8222
|
|
name: monitoring
|
|
resources:
|
|
requests:
|
|
memory: "64Mi"
|
|
cpu: "50m"
|
|
limits:
|
|
memory: "256Mi"
|
|
cpu: "250m"
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: 8222
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 10
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: 8222
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 5
|
|
volumeMounts:
|
|
- name: nats-data
|
|
mountPath: /data
|
|
volumes:
|
|
- name: nats-data
|
|
emptyDir: {}
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: nats
|
|
namespace: taiji-ai-test
|
|
spec:
|
|
selector:
|
|
app: nats
|
|
ports:
|
|
- name: client
|
|
port: 4222
|
|
targetPort: 4222
|
|
- name: routing
|
|
port: 6222
|
|
targetPort: 6222
|
|
- name: monitoring
|
|
port: 8222
|
|
targetPort: 8222
|