-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathgit-issue-agent-deployment.yaml
More file actions
161 lines (154 loc) · 5.29 KB
/
Copy pathgit-issue-agent-deployment.yaml
File metadata and controls
161 lines (154 loc) · 5.29 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
# GitHub Issue Agent Deployment with AuthBridge
#
# This deployment uses the operator webhook to automatically inject
# a single combined AuthBridge sidecar (post-cortex#411). The exact
# container shape depends on the resolved AuthBridge mode:
# - proxy-sidecar (default): one container "authbridge-proxy" from the
# "authbridge" image. spiffe-helper is bundled inside; gated per-workload
# by SPIRE_ENABLED.
# - envoy-sidecar: a "proxy-init" init container (iptables) plus one
# container "envoy-proxy" from the "authbridge-envoy" image (Envoy +
# ext_proc + bundled spiffe-helper).
# Either way the sidecar handles inbound JWT validation, outbound token
# exchange (HTTP), and HTTPS passthrough.
#
# Keycloak client registration is operator-managed (no in-pod sidecar);
# the operator creates a rossoctl-keycloak-client-credentials-<hash> Secret
# and the webhook mounts it at /shared/client-{id,secret}.txt.
#
# The agent container:
# - Runs the A2A GitHub Issue Agent on port 8000
# - Calls the GitHub MCP tool via HTTP
# - Token exchange to the tool is handled transparently by the AuthBridge sidecar
#
# Labels (on Pod template):
# rossoctl.io/inject: enabled - Enables AuthBridge sidecar injection
# rossoctl.io/spire: enabled - Enables SPIRE-based identity (set to "disabled" if no SPIRE)
#
# rossoctl.io/type is applied automatically by the operator when the
# AgentRuntime CR (at the end of this file) is created.
#
# Usage:
# kubectl apply -f git-issue-agent-deployment.yaml
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: git-issue-agent
namespace: team1
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: git-issue-agent
namespace: team1
labels:
app.kubernetes.io/name: git-issue-agent
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: git-issue-agent
template:
metadata:
labels:
app.kubernetes.io/name: git-issue-agent
rossoctl.io/inject: enabled
rossoctl.io/spire: enabled
spec:
serviceAccountName: git-issue-agent
containers:
- name: agent
image: ghcr.io/rossoctl/examples/git-issue-agent:latest
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8000
name: http
env:
# LLM configuration - Ollama (local LLM)
# Matches upstream .env.ollama from agent-examples repo
- name: TASK_MODEL_ID
value: "ollama/ibm/granite4:latest"
# Ollama API base URL. Required by litellm (used by crewai >=1.10).
# For Docker Desktop / Kind: http://host.docker.internal:11434
# For in-cluster Ollama: http://ollama.ollama.svc:11434
- name: LLM_API_BASE
value: "http://host.docker.internal:11434"
- name: OLLAMA_API_BASE
value: "http://host.docker.internal:11434"
- name: LLM_API_KEY
value: "ollama"
- name: MODEL_TEMPERATURE
value: "0"
# For OpenAI (uncomment and set your key):
# - name: TASK_MODEL_ID
# value: "gpt-4.1-nano"
# - name: LLM_API_KEY
# valueFrom:
# secretKeyRef:
# name: openai-secret
# key: apikey
# - name: OPENAI_API_KEY
# valueFrom:
# secretKeyRef:
# name: openai-secret
# key: apikey
# Agent service settings
# PORT tells the agent where to listen for A2A traffic.
# The rossoctl operator may override this via proxy-sidecar
# port-stealing to relocate the agent to a free port.
- name: PORT
value: "8000"
- name: LOG_LEVEL
value: "DEBUG"
# MCP Tool endpoint - the GitHub tool service
# AuthBridge will exchange the token when the agent calls this URL
- name: MCP_URL
value: "http://github-tool-mcp:9090/mcp"
# JWKS URI for validating incoming tokens from Keycloak
- name: JWKS_URI
value: "http://keycloak-service.keycloak.svc:8080/realms/rossoctl/protocol/openid-connect/certs"
resources:
limits:
cpu: 500m
memory: 512Mi
requests:
cpu: 100m
memory: 128Mi
volumeMounts:
- name: shared-data
mountPath: /shared
volumes:
- name: shared-data
emptyDir: {}
---
apiVersion: v1
kind: Service
metadata:
name: git-issue-agent
namespace: team1
spec:
selector:
app.kubernetes.io/name: git-issue-agent
ports:
- port: 8080
targetPort: 8000
protocol: TCP
type: ClusterIP
---
# AgentRuntime triggers operator-managed Keycloak client registration
# (creates rossoctl-keycloak-client-credentials-<hash> Secret with
# client-id.txt and client-secret.txt that the authbridge sidecar
# mounts at /shared/). The operator also applies rossoctl.io/type=agent
# to the Deployment and Pod template, enabling webhook sidecar injection.
apiVersion: agent.rossoctl.dev/v1alpha1
kind: AgentRuntime
metadata:
name: git-issue-agent
namespace: team1
spec:
type: agent
targetRef:
apiVersion: apps/v1
kind: Deployment
name: git-issue-agent