Skip to content

Commit bccafe6

Browse files
committed
Add the CRD reference page
1 parent 66ab7d8 commit bccafe6

File tree

5 files changed

+407
-79
lines changed

5 files changed

+407
-79
lines changed

.markdownlint-cli2.jsonc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"gitignore": true,
33
"globs": ["**/*.md"],
4-
"ignores": ["docs/toolhive/reference/cli/"],
4+
"ignores": ["docs/toolhive/reference/cli/", "static/api-specs/*.md"],
55
}

.vscode/settings.json

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,7 @@
99
"prettier.requireConfig": true,
1010
"yaml.format.proseWrap": "always",
1111
"css.lint.emptyRules": "ignore",
12-
13-
"[markdown]": {
14-
"editor.defaultFormatter": "esbenp.prettier-vscode"
15-
},
16-
"[mdx]": {
17-
"editor.defaultFormatter": "esbenp.prettier-vscode"
18-
},
19-
"[css]": {
20-
"editor.defaultFormatter": "esbenp.prettier-vscode"
21-
},
22-
"[json]": {
23-
"editor.defaultFormatter": "esbenp.prettier-vscode"
24-
},
25-
"[yaml]": {
12+
"[markdown][mdx][css][json][jsonc][yaml]": {
2613
"editor.defaultFormatter": "esbenp.prettier-vscode"
2714
}
2815
}

docs/toolhive/guides-k8s/run-mcp-k8s.md

Lines changed: 18 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,10 @@ When you apply an `MCPServer` resource, here's what happens:
163163

164164
:::
165165

166+
For more examples of `MCPServer` resources, see the
167+
[example MCP server manifests](https://github.com/stacklok/toolhive/tree/main/examples/operator/mcp-servers)
168+
in the ToolHive repo.
169+
166170
## Automatic RBAC management
167171

168172
The ToolHive operator automatically handles RBAC (Role-Based Access Control) for
@@ -185,14 +189,13 @@ This approach provides:
185189
- Better security isolation between different MCPServer instances
186190
- Support for multi-tenant deployments across different namespaces
187191

188-
For more examples of `MCPServer` resources, see the
189-
[example MCP server manifests](https://github.com/stacklok/toolhive/tree/main/examples/operator/mcp-servers)
190-
in the ToolHive repo.
191-
192192
## Customize server settings
193193

194194
You can customize the MCP server by adding additional fields to the `MCPServer`
195-
resource. Here are some common configurations.
195+
resource. The full specification is available in the
196+
[Kubernetes CRD reference](../reference/crd-spec.mdx).
197+
198+
Below are some common configurations.
196199

197200
### Customize the MCP server pod
198201

@@ -363,56 +366,19 @@ For more details about a specific MCP server:
363366
kubectl -n <NAMESPACE> describe mcpserver <NAME>
364367
```
365368

366-
## Configuration reference
367-
368-
### MCPServer spec
369-
370-
| Field | Description | Required | Default |
371-
| ------------------- | ----------------------------------------------- | -------- | ------- |
372-
| `image` | Container image for the MCP server | Yes | - |
373-
| `transport` | Transport method (stdio or sse) | No | stdio |
374-
| `port` | Port to expose the MCP server on | No | 8080 |
375-
| `targetPort` | Port to use for the MCP server (for SSE) | No | |
376-
| `args` | Additional arguments to pass to the MCP server | No | - |
377-
| `env` | Environment variables to set in the container | No | - |
378-
| `resources` | Resource requirements for the container | No | - |
379-
| `secrets` | References to secrets to mount in the container | No | - |
380-
| `permissionProfile` | Permission profile configuration | No | - |
381-
| `podTemplateSpec` | Custom pod specification for the MCP server | No | - |
382-
383-
### Secrets
384-
385-
The `secrets` field has the following parameters:
386-
387-
- `name`: The name of the Kubernetes secret (required)
388-
- `key`: The key in the secret (required)
389-
- `targetEnvName`: The environment variable to be used when setting up the
390-
secret in the MCP server (optional). If left unspecified, it defaults to the
391-
key.
392-
393-
### Permission Profiles
394-
395-
Permission profiles can be configured in two ways:
396-
397-
1. Using a built-in profile:
398-
399-
```yaml
400-
permissionProfile:
401-
type: builtin
402-
name: network # or "none"
403-
```
369+
## Next steps
404370

405-
2. Using a ConfigMap:
371+
See the [Client compatibility](../reference/client-compatibility.mdx) reference
372+
to learn how to connect to MCP servers using different clients.
406373

407-
```yaml
408-
permissionProfile:
409-
type: configmap
410-
name: my-permission-profile
411-
key: profile.json
412-
```
374+
## Related information
413375

414-
The ConfigMap should contain a JSON
415-
[permission profile](../guides-cli/custom-permissions.mdx#create-a-custom-permission-profile).
376+
- [Kubernetes CRD reference](../reference/crd-spec.mdx) - Reference for the
377+
`MCPServer` Custom Resource Definition (CRD)
378+
- [Deploy the operator using Helm](./deploy-operator-helm.md) - Install the
379+
ToolHive operator
380+
- [Custom permissions](../guides-cli/custom-permissions.mdx) - Configure
381+
permission profiles
416382

417383
:::important
418384

@@ -425,18 +391,6 @@ visiting our [GitHub repository](https://github.com/stacklok/toolhive).
425391

426392
:::
427393

428-
## Next steps
429-
430-
See the [Client compatibility](../reference/client-compatibility.mdx) reference
431-
to learn how to connect to MCP servers using different clients.
432-
433-
## Related information
434-
435-
- [Deploy the operator using Helm](./deploy-operator-helm.md) - Install the
436-
ToolHive operator
437-
- [Custom permissions](../guides-cli/custom-permissions.mdx) - Configure
438-
permission profiles
439-
440394
## Troubleshooting
441395

442396
### MCPServer resource not creating pods
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
title: Kubernetes CRD reference
3+
description:
4+
ToolHive Kubernetes Operator Custom Resource Definitions (CRDs) reference.
5+
sidebar_position: 30
6+
toc_max_heading_level: 4
7+
---
8+
9+
import CRDRef from '@site/static/api-specs/crd-api.md';
10+
11+
<CRDRef />

0 commit comments

Comments
 (0)