Skip to main content

Kubernetes CRD reference

Packages

toolhive.stacklok.dev/v1alpha1

Package v1alpha1 contains API Schema definitions for the toolhive v1alpha1 API group

Resource Types

AuthzConfigRef

AuthzConfigRef defines a reference to authorization configuration

Appears in:

FieldDescriptionDefaultValidation
type stringType is the type of authorization configurationconfigMapEnum: [configMap inline]
configMap ConfigMapAuthzRefConfigMap references a ConfigMap containing authorization configuration
Only used when Type is "configMap"
inline InlineAuthzConfigInline contains direct authorization configuration
Only used when Type is "inline"

ConfigMapAuthzRef

ConfigMapAuthzRef references a ConfigMap containing authorization configuration

Appears in:

FieldDescriptionDefaultValidation
name stringName is the name of the ConfigMapRequired: {}
key stringKey is the key in the ConfigMap that contains the authorization configurationauthz.json

ConfigMapOIDCRef

ConfigMapOIDCRef references a ConfigMap containing OIDC configuration

Appears in:

FieldDescriptionDefaultValidation
name stringName is the name of the ConfigMapRequired: {}
key stringKey is the key in the ConfigMap that contains the OIDC configurationoidc.json

EnvVar

EnvVar represents an environment variable in a container

Appears in:

FieldDescriptionDefaultValidation
name stringName of the environment variableRequired: {}
value stringValue of the environment variableRequired: {}

InlineAuthzConfig

InlineAuthzConfig contains direct authorization configuration

Appears in:

FieldDescriptionDefaultValidation
policies string arrayPolicies is a list of Cedar policy stringsMinItems: 1
Required: {}
entitiesJson stringEntitiesJSON is a JSON string representing Cedar entities[]

InlineOIDCConfig

InlineOIDCConfig contains direct OIDC configuration

Appears in:

FieldDescriptionDefaultValidation
issuer stringIssuer is the OIDC issuer URLRequired: {}
audience stringAudience is the expected audience for the token
jwksUrl stringJWKSURL is the URL to fetch the JWKS from
clientId stringClientID is deprecated and will be removed in a future release.
thvCABundlePath stringThvCABundlePath is the path to CA certificate bundle file for HTTPS requests
The file must be mounted into the pod (e.g., via ConfigMap or Secret volume)
jwksAuthTokenPath stringJWKSAuthTokenPath is the path to file containing bearer token for JWKS/OIDC requests
The file must be mounted into the pod (e.g., via Secret volume)
jwksAllowPrivateIP booleanJWKSAllowPrivateIP allows JWKS/OIDC endpoints on private IP addresses
Use with caution - only enable for trusted internal IDPs
false

KubernetesOIDCConfig

KubernetesOIDCConfig configures OIDC for Kubernetes service account token validation

Appears in:

FieldDescriptionDefaultValidation
serviceAccount stringServiceAccount is deprecated and will be removed in a future release.
namespace stringNamespace is the namespace of the service account
If empty, uses the MCPServer's namespace
audience stringAudience is the expected audience for the tokentoolhive
issuer stringIssuer is the OIDC issuer URLhttps://kubernetes.default.svc
jwksUrl stringJWKSURL is the URL to fetch the JWKS from
If empty, OIDC discovery will be used to automatically determine the JWKS URL
useClusterAuth booleanUseClusterAuth enables using the Kubernetes cluster's CA bundle and service account token
When true, uses /var/run/secrets/kubernetes.io/serviceaccount/ca.crt for TLS verification
and /var/run/secrets/kubernetes.io/serviceaccount/token for bearer token authentication
Defaults to true if not specified

MCPServer

MCPServer is the Schema for the mcpservers API

Appears in:

FieldDescriptionDefaultValidation
apiVersion stringtoolhive.stacklok.dev/v1alpha1
kind stringMCPServer
kind stringKind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
apiVersion stringAPIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
metadata ObjectMetaRefer to Kubernetes API documentation for fields of metadata.
spec MCPServerSpec
status MCPServerStatus

MCPServerList

MCPServerList contains a list of MCPServer

FieldDescriptionDefaultValidation
apiVersion stringtoolhive.stacklok.dev/v1alpha1
kind stringMCPServerList
kind stringKind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
apiVersion stringAPIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
metadata ListMetaRefer to Kubernetes API documentation for fields of metadata.
items MCPServer array

MCPServerPhase

Underlying type: string

MCPServerPhase is the phase of the MCPServer

Validation:

  • Enum: [Pending Running Failed Terminating]

Appears in:

FieldDescription
PendingMCPServerPhasePending means the MCPServer is being created
RunningMCPServerPhaseRunning means the MCPServer is running
FailedMCPServerPhaseFailed means the MCPServer failed to start
TerminatingMCPServerPhaseTerminating means the MCPServer is being deleted

MCPServerSpec

MCPServerSpec defines the desired state of MCPServer

Appears in:

FieldDescriptionDefaultValidation
image stringImage is the container image for the MCP serverRequired: {}
transport stringTransport is the transport method for the MCP server (stdio, streamable-http or sse)stdioEnum: [stdio streamable-http sse]
port integerPort is the port to expose the MCP server on8080Maximum: 65535
Minimum: 1
targetPort integerTargetPort is the port that MCP server listens toMaximum: 65535
Minimum: 1
args string arrayArgs are additional arguments to pass to the MCP server
env EnvVar arrayEnv are environment variables to set in the MCP server container
volumes Volume arrayVolumes are volumes to mount in the MCP server container
resources ResourceRequirementsResources defines the resource requirements for the MCP server container
secrets SecretRef arraySecrets are references to secrets to mount in the MCP server container
permissionProfile PermissionProfileRefPermissionProfile defines the permission profile to use
podTemplateSpec PodTemplateSpecPodTemplateSpec defines the pod template to use for the MCP server
This allows for customizing the pod configuration beyond what is provided by the other fields.
Note that to modify the specific container the MCP server runs in, you must specify
the mcp container name in the PodTemplateSpec.
resourceOverrides ResourceOverridesResourceOverrides allows overriding annotations and labels for resources created by the operator
oidcConfig OIDCConfigRefOIDCConfig defines OIDC authentication configuration for the MCP server
authzConfig AuthzConfigRefAuthzConfig defines authorization policy configuration for the MCP server

MCPServerStatus

MCPServerStatus defines the observed state of MCPServer

Appears in:

FieldDescriptionDefaultValidation
conditions Condition arrayConditions represent the latest available observations of the MCPServer's state
url stringURL is the URL where the MCP server can be accessed
phase MCPServerPhasePhase is the current phase of the MCPServerEnum: [Pending Running Failed Terminating]
message stringMessage provides additional information about the current phase

NetworkPermissions

NetworkPermissions defines the network permissions for an MCP server

Appears in:

FieldDescriptionDefaultValidation
outbound OutboundNetworkPermissionsOutbound defines the outbound network permissions

OIDCConfigRef

OIDCConfigRef defines a reference to OIDC configuration

Appears in:

FieldDescriptionDefaultValidation
type stringType is the type of OIDC configurationkubernetesEnum: [kubernetes configMap inline]
kubernetes KubernetesOIDCConfigKubernetes configures OIDC for Kubernetes service account token validation
Only used when Type is "kubernetes"
configMap ConfigMapOIDCRefConfigMap references a ConfigMap containing OIDC configuration
Only used when Type is "configmap"
inline InlineOIDCConfigInline contains direct OIDC configuration
Only used when Type is "inline"

OutboundNetworkPermissions

OutboundNetworkPermissions defines the outbound network permissions

Appears in:

FieldDescriptionDefaultValidation
insecureAllowAll booleanInsecureAllowAll allows all outbound network connections (not recommended)false
allowTransport string arrayAllowTransport is a list of transport protocols to allow (e.g., "tcp", "udp")
allowHost string arrayAllowHost is a list of hosts to allow connections to
allowPort integer arrayAllowPort is a list of ports to allow connections to

PermissionProfileRef

PermissionProfileRef defines a reference to a permission profile

Appears in:

FieldDescriptionDefaultValidation
type stringType is the type of permission profile referencebuiltinEnum: [builtin configmap]
name stringName is the name of the permission profile
If Type is "builtin", Name must be one of: "none", "network"
If Type is "configmap", Name is the name of the ConfigMap
Required: {}
key stringKey is the key in the ConfigMap that contains the permission profile
Only used when Type is "configmap"

ProxyDeploymentOverrides

ProxyDeploymentOverrides defines overrides specific to the proxy deployment

Appears in:

FieldDescriptionDefaultValidation
annotations object (keys:string, values:string)Annotations to add or override on the resource
labels object (keys:string, values:string)Labels to add or override on the resource
env EnvVar arrayEnv are environment variables to set in the proxy container (thv run process)
These affect the toolhive proxy itself, not the MCP server it manages

ResourceList

ResourceList is a set of (resource name, quantity) pairs

Appears in:

FieldDescriptionDefaultValidation
cpu stringCPU is the CPU limit in cores (e.g., "500m" for 0.5 cores)
memory stringMemory is the memory limit in bytes (e.g., "64Mi" for 64 megabytes)

ResourceMetadataOverrides

ResourceMetadataOverrides defines metadata overrides for a resource

Appears in:

FieldDescriptionDefaultValidation
annotations object (keys:string, values:string)Annotations to add or override on the resource
labels object (keys:string, values:string)Labels to add or override on the resource

ResourceOverrides

ResourceOverrides defines overrides for annotations and labels on created resources

Appears in:

FieldDescriptionDefaultValidation
proxyDeployment ProxyDeploymentOverridesProxyDeployment defines overrides for the Proxy Deployment resource (toolhive proxy)
proxyService ResourceMetadataOverridesProxyService defines overrides for the Proxy Service resource (points to the proxy deployment)

ResourceRequirements

ResourceRequirements describes the compute resource requirements

Appears in:

FieldDescriptionDefaultValidation
limits ResourceListLimits describes the maximum amount of compute resources allowed
requests ResourceListRequests describes the minimum amount of compute resources required

SecretRef

SecretRef is a reference to a secret

Appears in:

FieldDescriptionDefaultValidation
name stringName is the name of the secretRequired: {}
key stringKey is the key in the secret itselfRequired: {}
targetEnvName stringTargetEnvName is the environment variable to be used when setting up the secret in the MCP server
If left unspecified, it defaults to the key

Volume

Volume represents a volume to mount in a container

Appears in:

FieldDescriptionDefaultValidation
name stringName is the name of the volumeRequired: {}
hostPath stringHostPath is the path on the host to mountRequired: {}
mountPath stringMountPath is the path in the container to mount toRequired: {}
readOnly booleanReadOnly specifies whether the volume should be mounted read-onlyfalse