Skip to content

Commit b9dc6b8

Browse files
Update ToolHive reference docs for toolhive-operator-crds-0.0.21 (#173)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 654798f commit b9dc6b8

File tree

1 file changed

+268
-1
lines changed

1 file changed

+268
-1
lines changed

static/api-specs/toolhive-crd-api.md

Lines changed: 268 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,29 @@
88
Package v1alpha1 contains API Schema definitions for the toolhive v1alpha1 API group
99

1010
### Resource Types
11+
- [MCPRegistry](#mcpregistry)
12+
- [MCPRegistryList](#mcpregistrylist)
1113
- [MCPServer](#mcpserver)
1214
- [MCPServerList](#mcpserverlist)
1315

1416

1517

18+
#### AuditConfig
19+
20+
21+
22+
AuditConfig defines audit logging configuration for the MCP server
23+
24+
25+
26+
_Appears in:_
27+
- [MCPServerSpec](#mcpserverspec)
28+
29+
| Field | Description | Default | Validation |
30+
| --- | --- | --- | --- |
31+
| `enabled` _boolean_ | Enabled controls whether audit logging is enabled<br />When true, enables audit logging with default configuration | false | |
32+
33+
1634
#### AuthzConfigRef
1735

1836

@@ -65,6 +83,23 @@ _Appears in:_
6583
| `key` _string_ | Key is the key in the ConfigMap that contains the OIDC configuration | oidc.json | |
6684

6785

86+
#### ConfigMapSource
87+
88+
89+
90+
ConfigMapSource defines ConfigMap source configuration
91+
92+
93+
94+
_Appears in:_
95+
- [MCPRegistrySource](#mcpregistrysource)
96+
97+
| Field | Description | Default | Validation |
98+
| --- | --- | --- | --- |
99+
| `name` _string_ | Name is the name of the ConfigMap | | MinLength: 1 <br />Required: \{\} <br /> |
100+
| `key` _string_ | Key is the key in the ConfigMap that contains the registry data | registry.json | MinLength: 1 <br /> |
101+
102+
68103
#### EnvVar
69104

70105

@@ -146,6 +181,132 @@ _Appears in:_
146181
| `useClusterAuth` _boolean_ | UseClusterAuth enables using the Kubernetes cluster's CA bundle and service account token<br />When true, uses /var/run/secrets/kubernetes.io/serviceaccount/ca.crt for TLS verification<br />and /var/run/secrets/kubernetes.io/serviceaccount/token for bearer token authentication<br />Defaults to true if not specified | | |
147182

148183

184+
#### MCPRegistry
185+
186+
187+
188+
MCPRegistry is the Schema for the mcpregistries API
189+
⚠️ Experimental API (v1alpha1) — subject to change.
190+
191+
192+
193+
_Appears in:_
194+
- [MCPRegistryList](#mcpregistrylist)
195+
196+
| Field | Description | Default | Validation |
197+
| --- | --- | --- | --- |
198+
| `apiVersion` _string_ | `toolhive.stacklok.dev/v1alpha1` | | |
199+
| `kind` _string_ | `MCPRegistry` | | |
200+
| `kind` _string_ | Kind is a string value representing the REST resource this object represents.<br />Servers may infer this from the endpoint the client submits requests to.<br />Cannot be updated.<br />In CamelCase.<br />More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | | |
201+
| `apiVersion` _string_ | APIVersion defines the versioned schema of this representation of an object.<br />Servers should convert recognized schemas to the latest internal value, and<br />may reject unrecognized values.<br />More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | | |
202+
| `metadata` _[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#objectmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. | | |
203+
| `spec` _[MCPRegistrySpec](#mcpregistryspec)_ | | | |
204+
| `status` _[MCPRegistryStatus](#mcpregistrystatus)_ | | | |
205+
206+
207+
#### MCPRegistryList
208+
209+
210+
211+
MCPRegistryList contains a list of MCPRegistry
212+
213+
214+
215+
216+
217+
| Field | Description | Default | Validation |
218+
| --- | --- | --- | --- |
219+
| `apiVersion` _string_ | `toolhive.stacklok.dev/v1alpha1` | | |
220+
| `kind` _string_ | `MCPRegistryList` | | |
221+
| `kind` _string_ | Kind is a string value representing the REST resource this object represents.<br />Servers may infer this from the endpoint the client submits requests to.<br />Cannot be updated.<br />In CamelCase.<br />More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | | |
222+
| `apiVersion` _string_ | APIVersion defines the versioned schema of this representation of an object.<br />Servers should convert recognized schemas to the latest internal value, and<br />may reject unrecognized values.<br />More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | | |
223+
| `metadata` _[ListMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#listmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. | | |
224+
| `items` _[MCPRegistry](#mcpregistry) array_ | | | |
225+
226+
227+
#### MCPRegistryPhase
228+
229+
_Underlying type:_ _string_
230+
231+
MCPRegistryPhase represents the phase of the MCPRegistry
232+
233+
_Validation:_
234+
- Enum: [Pending Ready Failed Syncing Terminating]
235+
236+
_Appears in:_
237+
- [MCPRegistryStatus](#mcpregistrystatus)
238+
239+
| Field | Description |
240+
| --- | --- |
241+
| `Pending` | MCPRegistryPhasePending means the MCPRegistry is being initialized<br /> |
242+
| `Ready` | MCPRegistryPhaseReady means the MCPRegistry is ready and operational<br /> |
243+
| `Failed` | MCPRegistryPhaseFailed means the MCPRegistry has failed<br /> |
244+
| `Syncing` | MCPRegistryPhaseSyncing means the MCPRegistry is currently syncing data<br /> |
245+
| `Terminating` | MCPRegistryPhaseTerminating means the MCPRegistry is being deleted<br /> |
246+
247+
248+
#### MCPRegistrySource
249+
250+
251+
252+
MCPRegistrySource defines the source configuration for registry data
253+
254+
255+
256+
_Appears in:_
257+
- [MCPRegistrySpec](#mcpregistryspec)
258+
259+
| Field | Description | Default | Validation |
260+
| --- | --- | --- | --- |
261+
| `type` _string_ | Type is the type of source (configmap) | configmap | Enum: [configmap] <br /> |
262+
| `format` _string_ | Format is the data format (toolhive, upstream) | toolhive | Enum: [toolhive upstream] <br /> |
263+
| `configmap` _[ConfigMapSource](#configmapsource)_ | ConfigMap defines the ConfigMap source configuration<br />Only used when Type is "configmap" | | |
264+
265+
266+
#### MCPRegistrySpec
267+
268+
269+
270+
MCPRegistrySpec defines the desired state of MCPRegistry
271+
272+
273+
274+
_Appears in:_
275+
- [MCPRegistry](#mcpregistry)
276+
277+
| Field | Description | Default | Validation |
278+
| --- | --- | --- | --- |
279+
| `displayName` _string_ | DisplayName is a human-readable name for the registry | | |
280+
| `source` _[MCPRegistrySource](#mcpregistrysource)_ | Source defines the configuration for the registry data source | | Required: \{\} <br /> |
281+
| `syncPolicy` _[SyncPolicy](#syncpolicy)_ | SyncPolicy defines the automatic synchronization behavior for the registry.<br />If specified, enables automatic synchronization at the given interval.<br />Manual synchronization is always supported via annotation-based triggers<br />regardless of this setting. | | |
282+
| `filter` _[RegistryFilter](#registryfilter)_ | Filter defines include/exclude patterns for registry content | | |
283+
284+
285+
#### MCPRegistryStatus
286+
287+
288+
289+
MCPRegistryStatus defines the observed state of MCPRegistry
290+
291+
292+
293+
_Appears in:_
294+
- [MCPRegistry](#mcpregistry)
295+
296+
| Field | Description | Default | Validation |
297+
| --- | --- | --- | --- |
298+
| `phase` _[MCPRegistryPhase](#mcpregistryphase)_ | Phase represents the current phase of the MCPRegistry | | Enum: [Pending Ready Failed Syncing Terminating] <br /> |
299+
| `message` _string_ | Message provides additional information about the current phase | | |
300+
| `lastSyncTime` _[Time](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#time-v1-meta)_ | LastSyncTime is the timestamp of the last successful sync | | |
301+
| `lastSyncHash` _string_ | LastSyncHash is the hash of the last successfully synced data<br />Used to detect changes in source data | | |
302+
| `serverCount` _integer_ | ServerCount is the total number of servers in the registry | | Minimum: 0 <br /> |
303+
| `deployedServerCount` _integer_ | DeployedServerCount is the number of deployed servers with matching labels | | Minimum: 0 <br /> |
304+
| `syncAttempts` _integer_ | SyncAttempts is the number of sync attempts since last success | | Minimum: 0 <br /> |
305+
| `apiEndpoint` _string_ | APIEndpoint is the URL of the registry API service | | |
306+
| `storageRef` _[StorageReference](#storagereference)_ | StorageRef is a reference to the internal storage location | | |
307+
| `conditions` _[Condition](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#condition-v1-meta) array_ | Conditions represent the latest available observations of the MCPRegistry's state | | |
308+
309+
149310
#### MCPServer
150311

151312

@@ -236,6 +397,7 @@ _Appears in:_
236397
| `resourceOverrides` _[ResourceOverrides](#resourceoverrides)_ | ResourceOverrides allows overriding annotations and labels for resources created by the operator | | |
237398
| `oidcConfig` _[OIDCConfigRef](#oidcconfigref)_ | OIDCConfig defines OIDC authentication configuration for the MCP server | | |
238399
| `authzConfig` _[AuthzConfigRef](#authzconfigref)_ | AuthzConfig defines authorization policy configuration for the MCP server | | |
400+
| `audit` _[AuditConfig](#auditconfig)_ | Audit defines audit logging configuration for the MCP server | | |
239401
| `tools` _string array_ | ToolsFilter is the filter on tools applied to the MCP server | | |
240402
| `telemetry` _[TelemetryConfig](#telemetryconfig)_ | Telemetry defines observability configuration for the MCP server | | |
241403

@@ -259,6 +421,23 @@ _Appears in:_
259421
| `message` _string_ | Message provides additional information about the current phase | | |
260422

261423

424+
#### NameFilter
425+
426+
427+
428+
NameFilter defines name-based filtering
429+
430+
431+
432+
_Appears in:_
433+
- [RegistryFilter](#registryfilter)
434+
435+
| Field | Description | Default | Validation |
436+
| --- | --- | --- | --- |
437+
| `include` _string array_ | Include is a list of glob patterns to include | | |
438+
| `exclude` _string array_ | Exclude is a list of glob patterns to exclude | | |
439+
440+
262441
#### NetworkPermissions
263442

264443

@@ -314,6 +493,7 @@ _Appears in:_
314493
| `headers` _string array_ | Headers contains authentication headers for the OTLP endpoint<br />Specified as key=value pairs | | |
315494
| `insecure` _boolean_ | Insecure indicates whether to use HTTP instead of HTTPS for the OTLP endpoint | false | |
316495
| `metrics` _[OpenTelemetryMetricsConfig](#opentelemetrymetricsconfig)_ | Metrics defines OpenTelemetry metrics-specific configuration | | |
496+
| `tracing` _[OpenTelemetryTracingConfig](#opentelemetrytracingconfig)_ | Tracing defines OpenTelemetry tracing configuration | | |
317497

318498

319499
#### OpenTelemetryMetricsConfig
@@ -329,7 +509,24 @@ _Appears in:_
329509

330510
| Field | Description | Default | Validation |
331511
| --- | --- | --- | --- |
332-
| `enabled` _boolean_ | Enabled controls whether OTLP metrics are sent | true | |
512+
| `enabled` _boolean_ | Enabled controls whether OTLP metrics are sent | false | |
513+
514+
515+
#### OpenTelemetryTracingConfig
516+
517+
518+
519+
OpenTelemetryTracingConfig defines OpenTelemetry tracing configuration
520+
521+
522+
523+
_Appears in:_
524+
- [OpenTelemetryConfig](#opentelemetryconfig)
525+
526+
| Field | Description | Default | Validation |
527+
| --- | --- | --- | --- |
528+
| `enabled` _boolean_ | Enabled controls whether OTLP tracing is sent | false | |
529+
| `samplingRate` _string_ | SamplingRate is the trace sampling rate (0.0-1.0) | 0.05 | |
333530

334531

335532
#### OutboundNetworkPermissions
@@ -405,6 +602,23 @@ _Appears in:_
405602
| `env` _[EnvVar](#envvar) array_ | Env are environment variables to set in the proxy container (thv run process)<br />These affect the toolhive proxy itself, not the MCP server it manages | | |
406603

407604

605+
#### RegistryFilter
606+
607+
608+
609+
RegistryFilter defines include/exclude patterns for registry content
610+
611+
612+
613+
_Appears in:_
614+
- [MCPRegistrySpec](#mcpregistryspec)
615+
616+
| Field | Description | Default | Validation |
617+
| --- | --- | --- | --- |
618+
| `names` _[NameFilter](#namefilter)_ | NameFilters defines name-based filtering | | |
619+
| `tags` _[TagFilter](#tagfilter)_ | Tags defines tag-based filtering | | |
620+
621+
408622
#### ResourceList
409623

410624

@@ -492,6 +706,59 @@ _Appears in:_
492706
| `targetEnvName` _string_ | TargetEnvName is the environment variable to be used when setting up the secret in the MCP server<br />If left unspecified, it defaults to the key | | |
493707

494708

709+
#### StorageReference
710+
711+
712+
713+
StorageReference defines a reference to internal storage
714+
715+
716+
717+
_Appears in:_
718+
- [MCPRegistryStatus](#mcpregistrystatus)
719+
720+
| Field | Description | Default | Validation |
721+
| --- | --- | --- | --- |
722+
| `type` _string_ | Type is the storage type (configmap) | | Enum: [configmap] <br /> |
723+
| `configMapRef` _[LocalObjectReference](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#localobjectreference-v1-core)_ | ConfigMapRef is a reference to a ConfigMap storage<br />Only used when Type is "configmap" | | |
724+
725+
726+
#### SyncPolicy
727+
728+
729+
730+
SyncPolicy defines automatic synchronization behavior.
731+
When specified, enables automatic synchronization at the given interval.
732+
Manual synchronization via annotation-based triggers is always available
733+
regardless of this policy setting.
734+
735+
736+
737+
_Appears in:_
738+
- [MCPRegistrySpec](#mcpregistryspec)
739+
740+
| Field | Description | Default | Validation |
741+
| --- | --- | --- | --- |
742+
| `interval` _string_ | Interval is the sync interval for automatic synchronization (Go duration format)<br />Examples: "1h", "30m", "24h" | | Pattern: `^([0-9]+(\.[0-9]+)?(ns\|us\|µs\|ms\|s\|m\|h))+$` <br />Required: \{\} <br /> |
743+
744+
745+
#### TagFilter
746+
747+
748+
749+
TagFilter defines tag-based filtering
750+
751+
752+
753+
_Appears in:_
754+
- [RegistryFilter](#registryfilter)
755+
756+
| Field | Description | Default | Validation |
757+
| --- | --- | --- | --- |
758+
| `include` _string array_ | Include is a list of tags to include | | |
759+
| `exclude` _string array_ | Exclude is a list of tags to exclude | | |
760+
761+
495762
#### TelemetryConfig
496763

497764

0 commit comments

Comments
 (0)