47 lines
922 B
YAML
47 lines
922 B
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: ai-agent
|
|
namespace: dev
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: ai-agent
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: ai-agent
|
|
spec:
|
|
containers:
|
|
- name: ai-agent
|
|
image: 127.0.0.1:5000/ai-agent:dev-latest
|
|
imagePullPolicy: IfNotPresent
|
|
ports:
|
|
- containerPort: 3005
|
|
env:
|
|
- name: TZ
|
|
value: Asia/Shanghai
|
|
readinessProbe:
|
|
tcpSocket:
|
|
port: 3005
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 10
|
|
livenessProbe:
|
|
tcpSocket:
|
|
port: 3005
|
|
initialDelaySeconds: 30
|
|
periodSeconds: 15
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: ai-agent
|
|
namespace: dev
|
|
spec:
|
|
selector:
|
|
app: ai-agent
|
|
ports:
|
|
- port: 3005
|
|
targetPort: 3005
|