Files
agent_management/k8s/agent-manager-deployment.yaml
T
zhanggangyong e67aec11ef feat: 添加三个美股 AI Agent
- stock_quote_agent: 美股实时行情查询
- stock_news_agent: 美股新闻资讯分析
- stock_analysis_agent: 美股技术分析

更新:
- 添加 agent 代码到 agent_templates/agents/
- 更新 k8s_manager.py TEMPLATE_PORTS
- 添加构建和部署脚本
2026-02-05 13:58:00 +00:00

119 lines
2.8 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
apiVersion: apps/v1
kind: Deployment
metadata:
name: agent-manager
namespace: agent-manager
labels:
app: agent-manager
spec:
replicas: 2
selector:
matchLabels:
app: agent-manager
template:
metadata:
labels:
app: agent-manager
spec:
# 使用专用的 ServiceAccount
serviceAccountName: agent-manager
# ARM 架构节点选择器
nodeSelector:
kubernetes.io/arch: arm64
# 容忍度(如果需要)
tolerations:
- key: "kubernetes.io/arch"
operator: "Equal"
value: "arm64"
effect: "NoSchedule"
containers:
- name: agent-manager
image: agnettaiji.azurecr.io/ai-agents/agent-manager:latest
imagePullPolicy: Always
ports:
- containerPort: 8000
name: http
protocol: TCP
# 环境变量 - 从 ConfigMap
envFrom:
- configMapRef:
name: agent-manager-config
# 环境变量 - 从 Secret
env:
- name: AZURE_TENANT_ID
valueFrom:
secretKeyRef:
name: agent-manager-secret
key: AZURE_TENANT_ID
- name: AZURE_CLIENT_ID
valueFrom:
secretKeyRef:
name: agent-manager-secret
key: AZURE_CLIENT_ID
- name: AZURE_CLIENT_SECRET
valueFrom:
secretKeyRef:
name: agent-manager-secret
key: AZURE_CLIENT_SECRET
# Gitee 凭据
- name: GITEE_TOKEN
valueFrom:
secretKeyRef:
name: agent-manager-secret
key: GITEE_TOKEN
- name: GITEE_PASSWORD
valueFrom:
secretKeyRef:
name: agent-manager-secret
key: GITEE_PASSWORD
# 挂载 kubeconfig(用于管理其他 Agent)
volumeMounts:
- name: kubeconfig
mountPath: /root/.kube
readOnly: true
# 资源限制
resources:
requests:
memory: "256Mi"
cpu: "200m"
limits:
memory: "512Mi"
cpu: "500m"
# 健康检查
livenessProbe:
httpGet:
path: /
port: 8000
initialDelaySeconds: 30
periodSeconds: 30
timeoutSeconds: 5
failureThreshold: 3
readinessProbe:
httpGet:
path: /
port: 8000
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 3
volumes:
- name: kubeconfig
secret:
secretName: kubeconfig-secret
optional: true
# 使用 ACR 拉取镜像的凭据
imagePullSecrets:
- name: acr-secret