-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgithub-agent-deployment.yaml
More file actions
105 lines (101 loc) · 3 KB
/
github-agent-deployment.yaml
File metadata and controls
105 lines (101 loc) · 3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
apiVersion: apps/v1
kind: Deployment
metadata:
name: ${AGENT_NAME}
labels:
app: ${AGENT_NAME}
spec:
replicas: 1
selector:
matchLabels:
app: ${AGENT_NAME}
template:
metadata:
labels:
app: ${AGENT_NAME}
spec:
containers:
- name: agent
image: ${AGENT_IMAGE}
imagePullPolicy: Never # Force K8s to use local image that's loaded
env:
# Route directly to the internal Kubernetes service name
- name: MCP_SERVER_URL
value: "http://${MCP_SERVICE_NAME}:80/mcp"
# The agent's own cluster-internal URL — used in the A2A agent card so that other pods know where to send tasks
- name: AGENT_HOST
value: "http://${AGENT_SERVICE_NAME}.${NAMESPACE}.svc.cluster.local"
# Reuse the GitHub PAT already stored in the MCP server's secret
- name: GITHUB_PAT
valueFrom:
secretKeyRef:
name: ${MCP_SECRET_NAME}
key: GITHUB_PERSONAL_ACCESS_TOKEN
# LLM API key (Google Gemini by default)
# Create with: kubectl create secret generic ${AGENT_SECRET_NAME} \
# --from-literal=GOOGLE_API_KEY=<key> -n ${NAMESPACE}
- name: GOOGLE_API_KEY
valueFrom:
secretKeyRef:
name: ${AGENT_SECRET_NAME}
key: GOOGLE_API_KEY
- name: DEV_MODE # if true, starts ADK Web UI on port 8001 alongside FastAPI 8000
valueFrom:
secretKeyRef:
name: ${AGENT_SECRET_NAME}
key: DEVELOPMENT_MODE
# Optional: switch to Claude by setting these two env vars instead
# - name: AGENT_MODEL
# value: "anthropic/claude-sonnet-4-5"
# - name: ANTHROPIC_API_KEY
# valueFrom:
# secretKeyRef:
# name: ${AGENT_SECRET_NAME}
# key: ANTHROPIC_API_KEY
ports:
- name: fastapi # FastAPI
containerPort: 8000
- name: adk-web # ADK Web UI
containerPort: 8001
# Kubernetes uses /health on the FastAPI port to decide if the pod is ready to receive traffic.
# The ADK web UI has no health endpoint.
readinessProbe:
httpGet:
path: /readyz
port: 8000
initialDelaySeconds: 10
periodSeconds: 5
livenessProbe:
httpGet:
path: /healthz
port: 8000
initialDelaySeconds: 15
periodSeconds: 10
---
# Service for FastAPI — used for A2A inter-agent communication inside the cluster
apiVersion: v1
kind: Service
metadata:
name: ${AGENT_SERVICE_NAME}
spec:
selector:
app: ${AGENT_NAME}
ports:
- name: fastapi
protocol: TCP
port: 80
targetPort: 8000
---
# Separate service for the ADK Web UI; only for development, when needed.
apiVersion: v1
kind: Service
metadata:
name: ${AGENT_SERVICE_NAME}-adk
spec:
selector:
app: ${AGENT_NAME}
ports:
- name: adk-web
protocol: TCP
port: 8001
targetPort: 8001