-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathkagenti-agent.yaml
More file actions
165 lines (165 loc) · 5.11 KB
/
Copy pathkagenti-agent.yaml
File metadata and controls
165 lines (165 loc) · 5.11 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
162
163
164
165
# OpenCode A2A Agent - Kagenti-compatible OpenShift Template
#
# Deploy with:
# oc process -f kagenti-agent.yaml \
# -p NAMESPACE=my-namespace \
# -p LLM_API_BASE=https://api.openai.com/v1 \
# -p LLM_MODEL=gpt-4o | oc apply -f -
#
# Or create a parameters file and use:
# oc process -f kagenti-agent.yaml --param-file=params.env | oc apply -f -
#
apiVersion: template.openshift.io/v1
kind: Template
metadata:
name: opencode-a2a-agent
annotations:
description: "OpenCode A2A Agent for Kagenti discovery"
tags: "agent,a2a,opencode,kagenti"
parameters:
- name: NAMESPACE
description: "Target namespace for deployment"
required: true
- name: IMAGE
description: "Container image for OpenCode A2A (build locally via BuildConfig)"
# TODO: Pin to specific version tag once container image versioning is established
value: "image-registry.openshift-image-registry.svc:5000/${NAMESPACE}/opencode-a2a:latest"
- name: LLM_PROVIDER
description: "Provider name (vllm, ogx, openai, etc.) - defaults to vllm"
value: "vllm"
- name: LLM_API_BASE
description: "LLM API endpoint (e.g., https://api.openai.com/v1) - Kagenti standard"
value: ""
- name: LLM_MODEL
description: "Model identifier (e.g., gpt-4o) - Kagenti standard"
value: ""
- name: LLM_API_KEY_SECRET
description: "Secret name containing LLM API key (key: api-key)"
value: "opencode-model-credentials"
- name: PROVIDER_ORG
description: "Organization name shown in agent card"
value: "Red Hat"
objects:
- apiVersion: v1
kind: ServiceAccount
metadata:
name: opencode-a2a
namespace: ${NAMESPACE}
- apiVersion: agent.kagenti.dev/v1alpha1
kind: AgentRuntime
metadata:
name: opencode-a2a-runtime
namespace: ${NAMESPACE}
labels:
app.kubernetes.io/name: opencode-a2a
spec:
type: agent
protocol: a2a
targetRef:
apiVersion: apps/v1
kind: Deployment
name: opencode-a2a
- apiVersion: v1
kind: Service
metadata:
name: opencode-a2a
namespace: ${NAMESPACE}
labels:
app.kubernetes.io/name: opencode-a2a
protocol.kagenti.io/a2a: "true"
spec:
type: ClusterIP
selector:
app.kubernetes.io/name: opencode-a2a
ports:
- name: a2a
port: 8000
targetPort: 8000
protocol: TCP
- apiVersion: apps/v1
kind: Deployment
metadata:
name: opencode-a2a
namespace: ${NAMESPACE}
labels:
app.kubernetes.io/name: opencode-a2a
protocol.kagenti.io/a2a: "true"
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: opencode-a2a
template:
metadata:
labels:
app.kubernetes.io/name: opencode-a2a
protocol.kagenti.io/a2a: "true"
annotations:
sidecar.istio.io/inject: "false"
spec:
serviceAccountName: opencode-a2a
securityContext:
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
containers:
- name: opencode-a2a
image: ${IMAGE}
imagePullPolicy: Always
ports:
- name: a2a
containerPort: 8000
protocol: TCP
env:
- name: A2A_HOST
value: "0.0.0.0"
- name: A2A_PORT
value: "8000"
- name: AGENT_ENDPOINT
value: "http://opencode-a2a.${NAMESPACE}.svc.cluster.local:8000/"
- name: A2A_PROVIDER_ORG
value: ${PROVIDER_ORG}
- name: LLM_PROVIDER
value: ${LLM_PROVIDER}
- name: LLM_API_BASE
value: ${LLM_API_BASE}
- name: LLM_API_KEY
valueFrom:
secretKeyRef:
name: ${LLM_API_KEY_SECRET}
key: api-key
optional: true
- name: LLM_MODEL
value: ${LLM_MODEL}
readinessProbe:
httpGet:
path: /.well-known/agent-card.json
port: 8000
initialDelaySeconds: 10
periodSeconds: 5
failureThreshold: 12
livenessProbe:
httpGet:
path: /.well-known/agent-card.json
port: 8000
initialDelaySeconds: 30
periodSeconds: 10
failureThreshold: 3
timeoutSeconds: 5
resources:
requests:
cpu: 100m
memory: 256Mi
limits:
cpu: "1"
memory: 1Gi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
terminationGracePeriodSeconds: 30
restartPolicy: Always