Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions common/api/generated/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ export type GithubComStacklokToolhiveCoreRegistryTypesRegistry = {
}

/**
* Shared defines a token bucket shared across all users for this specific tool.
* +kubebuilder:validation:Required
* PerUser token bucket configuration for this tool.
* +optional
*/
export type GithubComStacklokToolhiveCmdThvOperatorApiV1Alpha1RateLimitBucket =
{
Expand All @@ -58,6 +58,7 @@ export type GithubComStacklokToolhiveCmdThvOperatorApiV1Alpha1RateLimitBucket =
*/
export type GithubComStacklokToolhiveCmdThvOperatorApiV1Alpha1RateLimitConfig =
{
perUser?: GithubComStacklokToolhiveCmdThvOperatorApiV1Alpha1RateLimitBucket
shared?: GithubComStacklokToolhiveCmdThvOperatorApiV1Alpha1RateLimitBucket
/**
* Tools defines per-tool rate limit overrides.
Expand All @@ -78,6 +79,7 @@ export type GithubComStacklokToolhiveCmdThvOperatorApiV1Alpha1ToolRateLimitConfi
* +kubebuilder:validation:MinLength=1
*/
name?: string
perUser?: GithubComStacklokToolhiveCmdThvOperatorApiV1Alpha1RateLimitBucket
shared?: GithubComStacklokToolhiveCmdThvOperatorApiV1Alpha1RateLimitBucket
}

Expand Down
8 changes: 7 additions & 1 deletion common/api/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"type": "object"
},
"github_com_stacklok_toolhive_cmd_thv-operator_api_v1alpha1.RateLimitBucket": {
"description": "Shared defines a token bucket shared across all users for this specific tool.\n+kubebuilder:validation:Required",
"description": "PerUser token bucket configuration for this tool.\n+optional",
"properties": {
"maxTokens": {
"description": "MaxTokens is the maximum number of tokens (bucket capacity).\nThis is also the burst size: the maximum number of requests that can be served\ninstantaneously before the bucket is depleted.\n+kubebuilder:validation:Required\n+kubebuilder:validation:Minimum=1",
Expand All @@ -53,6 +53,9 @@
"github_com_stacklok_toolhive_cmd_thv-operator_api_v1alpha1.RateLimitConfig": {
"description": "RateLimitConfig contains the CRD rate limiting configuration.\nWhen set, rate limiting middleware is added to the proxy middleware chain.",
"properties": {
"perUser": {
"$ref": "#/components/schemas/github_com_stacklok_toolhive_cmd_thv-operator_api_v1alpha1.RateLimitBucket"
},
"shared": {
"$ref": "#/components/schemas/github_com_stacklok_toolhive_cmd_thv-operator_api_v1alpha1.RateLimitBucket"
},
Expand All @@ -73,6 +76,9 @@
"description": "Name is the MCP tool name this limit applies to.\n+kubebuilder:validation:Required\n+kubebuilder:validation:MinLength=1",
"type": "string"
},
"perUser": {
"$ref": "#/components/schemas/github_com_stacklok_toolhive_cmd_thv-operator_api_v1alpha1.RateLimitBucket"
},
"shared": {
"$ref": "#/components/schemas/github_com_stacklok_toolhive_cmd_thv-operator_api_v1alpha1.RateLimitBucket"
}
Expand Down
2 changes: 1 addition & 1 deletion utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
* This is managed by Renovate and updated automatically when new versions are released.
* renovate: datasource=github-releases depName=stacklok/toolhive versioning=semver
*/
export const TOOLHIVE_VERSION = process.env.THV_VERSION ?? 'v0.17.0'
export const TOOLHIVE_VERSION = process.env.THV_VERSION ?? 'v0.18.0'
Loading