Skip to content

Commit 19d9ebf

Browse files
authored
docs: add initial README (#2)
Signed-off-by: Calum Murray <cmurray@redhat.com>
1 parent ef62195 commit 19d9ebf

1 file changed

Lines changed: 140 additions & 0 deletions

File tree

README.md

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
# gevals-kubernetes-extension
2+
3+
A [gevals](https://github.com/genmcp/gevals) extension that provides Kubernetes resource operations for task setup, verification, and cleanup.
4+
5+
This extension enables declarative Kubernetes interactions within gevals tasks. It also provides verification-specific operations that don't belong in MCP server tools but are essential for evaluating them. For example, waiting for a pod to reach a specific condition isn't useful as an MCP tool, but is exactly what you need to verify that an MCP server correctly modified a pod.
6+
7+
## Operations
8+
9+
| Operation | Description |
10+
|-----------|-------------|
11+
| `kubernetes.create` | Create a Kubernetes resource |
12+
| `kubernetes.delete` | Delete a Kubernetes resource |
13+
| `kubernetes.wait` | Wait for a condition on a resource (e.g., `Ready`, `Available`) |
14+
15+
## Configuration
16+
17+
Add the extension to your `eval.yaml`:
18+
19+
```yaml
20+
kind: Eval
21+
metadata:
22+
name: "kubernetes-basic-operations"
23+
config:
24+
agent:
25+
type: "file"
26+
path: agent.yaml
27+
mcpConfigFile: mcp-config.yaml
28+
extensions:
29+
kubernetes:
30+
package: https://github.com/genmcp/gevals-kubernetes-extension@v0.0.1
31+
config:
32+
kubeconfig: ~/.kube/config # optional, defaults to ~/.kube/config
33+
taskSets:
34+
- glob: tasks/*/*.yaml
35+
```
36+
37+
## Task Usage
38+
39+
Declare the extension requirement and use operations in `setup`, `verify`, and `cleanup` phases:
40+
41+
```yaml
42+
kind: Task
43+
apiVersion: gevals/v1alpha2
44+
metadata:
45+
name: "create-nginx-pod"
46+
difficulty: easy
47+
spec:
48+
requires:
49+
- extension: kubernetes
50+
51+
setup:
52+
- kubernetes.delete:
53+
apiVersion: v1
54+
kind: Namespace
55+
metadata:
56+
name: test-namespace
57+
ignoreNotFound: true
58+
- kubernetes.create:
59+
apiVersion: v1
60+
kind: Namespace
61+
metadata:
62+
name: test-namespace
63+
64+
verify:
65+
- kubernetes.wait:
66+
apiVersion: v1
67+
kind: Pod
68+
metadata:
69+
name: web-server
70+
namespace: test-namespace
71+
condition: Ready
72+
timeout: 120s
73+
74+
cleanup:
75+
- kubernetes.delete:
76+
apiVersion: v1
77+
kind: Namespace
78+
metadata:
79+
name: test-namespace
80+
ignoreNotFound: true
81+
82+
prompt:
83+
inline: Create an nginx pod named web-server in the test-namespace namespace
84+
```
85+
86+
## Operation Reference
87+
88+
### kubernetes.create
89+
90+
Creates a Kubernetes resource using standard manifest fields.
91+
92+
```yaml
93+
- kubernetes.create:
94+
apiVersion: v1
95+
kind: Pod
96+
metadata:
97+
name: my-pod
98+
namespace: default
99+
spec:
100+
containers:
101+
- name: nginx
102+
image: nginx:latest
103+
```
104+
105+
### kubernetes.delete
106+
107+
Deletes a Kubernetes resource. Use `ignoreNotFound: true` to skip errors when the resource doesn't exist.
108+
109+
```yaml
110+
- kubernetes.delete:
111+
apiVersion: v1
112+
kind: Namespace
113+
metadata:
114+
name: my-namespace
115+
ignoreNotFound: true
116+
```
117+
118+
### kubernetes.wait
119+
120+
Waits for a condition on a resource. Supports configurable timeout and expected status.
121+
122+
```yaml
123+
- kubernetes.wait:
124+
apiVersion: apps/v1
125+
kind: Deployment
126+
metadata:
127+
name: my-deployment
128+
namespace: default
129+
condition: Available
130+
status: "True" # optional, defaults to "True"
131+
timeout: 5m # optional, defaults to 60s
132+
```
133+
134+
## Contributing
135+
136+
Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for development setup, project structure, and guidelines for adding new operations.
137+
138+
## License
139+
140+
Apache-2.0

0 commit comments

Comments
 (0)