跳到主要内容
版本:Next
暂无中文翻译
此页面尚未翻译,以下显示英文原文。

API Reference

Packages​

networking.serving.volcano.sh/v1alpha1​

Resource Types​

BodyMatch​

BodyMatch defines the predicate used to match request body content

Appears in:

FieldDescriptionDefaultValidation
model stringModel is the name of the model or lora adapter to match.
If this field is not specified, any model or lora adapter will be matched.

ConnectionPool​

ConnectionPool configures the HTTP connection pool for a ModelServer.

Appears in:

FieldDescriptionDefaultValidation
maxIdleConnections integerMaxIdleConnections is the total idle connections across all endpoints.
Defaults to 100 when omitted.
Minimum: 0
maxIdleConnectionsPerHost integerMaxIdleConnectionsPerHost is the idle connections per pod/endpoint.
Defaults to 64 when omitted.
Minimum: 0
maxConnectionsPerHost integerMaxConnectionsPerHost limits dialing, active and idle connections per host.
0 means unlimited. Defaults to 0 when omitted.
Minimum: 0

Endpoint​

Endpoint describes a single statically configured model serving instance.

Appears in:

FieldDescriptionDefaultValidation
name stringName uniquely identifies the endpoint within the ModelServer. Together with
the ModelServer name it forms the instance identity in the router, for
example in metrics and debug output.
MaxLength: 253
Pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
Required: {}
address stringAddress is the IP address or DNS name of the model serving instance.MaxLength: 253
Required: {}
port integerPort is the port the model serving instance listens on. It defaults to
spec.workloadPort.port when unset.
Maximum: 65535
Minimum: 1
labels object (keys:string, values:string)Labels are attached to the endpoint. They do not select serving instances;
they are only matched against workloadSelector.pdGroup to assign the
endpoint a prefill or decode role, pdGroup being the sole
workloadSelector field that may be combined with endpoints.

ExternalModelProvider​

ExternalModelProvider is the Schema for the externalmodelproviders API.

Appears in:

FieldDescriptionDefaultValidation
apiVersion stringnetworking.serving.volcano.sh/v1alpha1
kind stringExternalModelProvider
spec ExternalModelProviderSpec
status ExternalModelProviderStatus

ExternalModelProviderList​

ExternalModelProviderList contains a list of ExternalModelProvider.

FieldDescriptionDefaultValidation
apiVersion stringnetworking.serving.volcano.sh/v1alpha1
kind stringExternalModelProviderList
items ExternalModelProvider array

ExternalModelProviderSpec​

ExternalModelProviderSpec defines the desired state of ExternalModelProvider.

Appears in:

FieldDescriptionDefaultValidation
providerType ExternalProviderTypeProviderType selects the protocol adapter used for this provider.OpenAIEnum: [OpenAI Anthropic]
model stringModel is the actual upstream model name. When set, it overwrites the
model in the request, matching ModelServer.Spec.Model behavior.
MaxLength: 256
baseURL stringBaseURL is the provider endpoint root. External providers must use HTTPS.
Example: https://api.deepseek.com
MinLength: 1
Pattern: ^https://.+
Required: {}
insecureSkipVerify booleanInsecureSkipVerify disables server certificate-chain and hostname
verification for HTTPS. It does not enable plain HTTP.
false
auth ProviderAuthAuth references a credential Secret in the same namespace.
headers object (keys:string, values:string)Non-sensitive static headers added to upstream requests.

ExternalModelProviderStatus​

ExternalModelProviderStatus defines the observed state of ExternalModelProvider.

Appears in:

FieldDescriptionDefaultValidation
observedGeneration integer

ExternalProviderType​

Underlying type: string

ExternalProviderType defines the protocol adapter used for an external provider.

Validation:

  • Enum: [OpenAI Anthropic]

Appears in:

FieldDescription
OpenAIOpenAI selects the OpenAI-compatible API adapter.
AnthropicAnthropic selects the Anthropic-compatible Messages API adapter.

GlobalRateLimit​

GlobalRateLimit contains configuration for global rate limiting

Appears in:

FieldDescriptionDefaultValidation
redis RedisConfigRedis contains configuration for Redis-based global rate limiting.

InferenceEngine​

Underlying type: string

InferenceEngine defines the inference framework used by the modelServer to serve LLM requests.

Validation:

  • Enum: [vLLM SGLang]

Appears in:

FieldDescription
vLLMhttps://github.com/vllm-project/vllm
SGLanghttps://github.com/sgl-project/sglang

KVConnectorSpec​

KVConnectorSpec defines KV connector configuration for PD disaggregated routing

Appears in:

FieldDescriptionDefaultValidation
type KVConnectorTypeType specifies the connector type.
If you do not know which type to use, please use "http" as default.
httpEnum: [http lmcache nixl mooncake]

KVConnectorType​

Underlying type: string

Appears in:

FieldDescription
http
nixl
lmcache
mooncake

ModelMatch​

ModelMatch defines the predicate used to match LLM inference requests to a given TargetModels. Multiple match conditions are ANDed together, i.e. the match will evaluate to true only if all conditions are satisfied.

Appears in:

FieldDescriptionDefaultValidation
headers object (keys:string, values:StringMatch)Header to match: prefix, exact, regex
If unset, any header will be matched.
uri StringMatchURI to match: prefix, exact, regex
If this field is not specified, a default prefix match on the "/" path is provided.
body BodyMatchBody contains conditions to match request body content

ModelRoute​

ModelRoute is the Schema for the Modelroutes API.

Appears in:

FieldDescriptionDefaultValidation
apiVersion stringnetworking.serving.volcano.sh/v1alpha1
kind stringModelRoute
spec ModelRouteSpec
status ModelRouteStatus

ModelRouteList​

ModelRouteList contains a list of ModelRoute.

FieldDescriptionDefaultValidation
apiVersion stringnetworking.serving.volcano.sh/v1alpha1
kind stringModelRouteList
items ModelRoute array

ModelRouteSpec​

ModelRouteSpec defines the desired state of ModelRoute.

Appears in:

FieldDescriptionDefaultValidation
modelName stringmodel in the LLM request, it could be a base model name, lora adapter name or even
a virtual model name. This field is used to match scenarios other than model adapter name and
this field could be empty, but it and ModelAdapters can't both be empty.
loraAdapters string arraymodel in the LLM request could be lora adapter name,
here is a list of Lora Adapter Names to match.
MaxItems: 10
parentRefs ParentReference arrayParentRefs references the Gateways that this ModelRoute should be attached to.
If empty, the ModelRoute will be attached to all Gateways in the same namespace.
rules Rule arrayAn ordered list of route rules for LLM traffic. The first rule
matching an incoming request will be used.
If no rule is matched, an HTTP 404 status code MUST be returned.
MaxItems: 16
rateLimit RateLimitRate limit for the LLM request based on prompt tokens or output tokens.
There is no limitation if this field is not set.

ModelRouteStatus​

ModelRouteStatus defines the observed state of ModelRoute.

Appears in:

ModelServer​

ModelServer is the Schema for the modelservers API.

Appears in:

FieldDescriptionDefaultValidation
apiVersion stringnetworking.serving.volcano.sh/v1alpha1
kind stringModelServer
spec ModelServerSpec
status ModelServerStatus

ModelServerList​

ModelServerList contains a list of ModelServer.

FieldDescriptionDefaultValidation
apiVersion stringnetworking.serving.volcano.sh/v1alpha1
kind stringModelServerList
items ModelServer array

ModelServerSpec​

ModelServerSpec defines the desired state of ModelServer.

Appears in:

FieldDescriptionDefaultValidation
model stringThe real model that the modelServers are running.
If the model in LLM inference request is different from this field, it should be overwritten by this field.
Otherwise, the model in LLM inference request will not be mutated.
MaxLength: 256
inferenceEngine InferenceEngineThe inference engine used to serve the model.Enum: [vLLM SGLang]
Required: {}
workloadSelector WorkloadSelectorWorkloadSelector is used to match the model serving instances.
Currently, they must be pods within the same namespace as modelServer object.
workloadSelector.matchLabels and endpoints are mutually exclusive ways of
declaring the serving instances, so exactly one of them must be used.
workloadSelector.pdGroup does not select instances; it only assigns them
prefill and decode roles, and therefore is the sole workloadSelector field
that may also be combined with endpoints.
endpoints Endpoint arrayEndpoints is a static list of model serving instances. It is intended for
deployments where the serving instances are not discoverable as pods of the
cluster the router runs in, for example when the router reads its
configuration from local files instead of the Kubernetes API server.
endpoints and workloadSelector.matchLabels are mutually exclusive;
exactly one of them must be specified.
MaxItems: 1024
workloadPort WorkloadPortWorkloadPort defines the port and protocol configuration for the model server.
It may be omitted only when every entry in endpoints declares its own
port; endpoints without an explicit port fall back to workloadPort.port.
trafficPolicy TrafficPolicyTraffic Policy for accessing the model server instance.
kvConnector KVConnectorSpecKVConnector specifies the KV connector configuration for PD disaggregated routing

ModelServerStatus​

ModelServerStatus defines the observed state of ModelServer.

Appears in:

PDGroup​

PDGroup is used to specify the group key of PD instances. Also, the labels to match the model serving instances for prefill and decode.

Appears in:

FieldDescriptionDefaultValidation
groupKey stringGroupKey is the key to distinguish different PD groups.
Only PD instances with the same group key and value could be paired.
prefillLabels object (keys:string, values:string)The labels to match the model serving instances for prefill.
decodeLabels object (keys:string, values:string)The labels to match the model serving instances for decode.

ProviderAuth​

ProviderAuth defines how a provider credential is loaded and sent upstream.

Appears in:

FieldDescriptionDefaultValidation
scheme ProviderAuthSchemeScheme overrides the protocol adapter's default authentication scheme.
OpenAI defaults to Bearer and Anthropic defaults to APIKey.
Enum: [Bearer APIKey]
secretRef SecretKeySelectorSecretRef references a credential Secret in the same namespace.Required: {}

ProviderAuthScheme​

Underlying type: string

ProviderAuthScheme defines how a provider credential is sent upstream.

Validation:

  • Enum: [Bearer APIKey]

Appears in:

FieldDescription
BearerProviderAuthSchemeBearer sends the credential in the Authorization header.
APIKeyProviderAuthSchemeAPIKey sends the credential in the x-api-key header.

RateLimit​

Appears in:

FieldDescriptionDefaultValidation
inputTokensPerUnit integerInputTokensPerUnit is the maximum number of input tokens allowed per unit of time.
If this field is not set, there is no limit on input tokens.
Minimum: 1
outputTokensPerUnit integerOutputTokensPerUnit is the maximum number of output tokens allowed per unit of time.
If this field is not set, there is no limit on output tokens.
Minimum: 1
unit RateLimitUnitUnit is the time unit for the rate limit.secondEnum: [second minute hour day month]
global GlobalRateLimitGlobal contains configuration for global rate limiting using distributed storage.
If this field is set, global rate limiting will be used; otherwise, local rate limiting will be used.

RateLimitUnit​

Underlying type: string

Validation:

  • Enum: [second minute hour day month]

Appears in:

FieldDescription
second
minute
hour
day
month

RedisConfig​

RedisConfig contains Redis connection configuration

Appears in:

FieldDescriptionDefaultValidation
address stringAddress is the Redis server address in the format "host:port".Required: {}

Retry​

Appears in:

FieldDescriptionDefaultValidation
attempts integerThe maximum number of times an individual inference request to a model server should be retried.
If the maximum number of retries has been done without a successgful response, the request will be considered failed.

Rule​

Appears in:

FieldDescriptionDefaultValidation
name stringName is the name of the rule.
modelMatch ModelMatchMatch conditions to be satisfied for the rule to be activated.
Empty modelMatch means matching all requests.
targetModels TargetModel arrayMaxItems: 16
MinItems: 1

SessionKeySource​

SessionKeySource defines one session key extraction rule.

Appears in:

FieldDescriptionDefaultValidation
type SessionKeySourceTypeEnum: [Header Query Cookie JWTClaim]
Required: {}
name stringName is the header name, query key, cookie name, or JWT claim name.MinLength: 1
Required: {}

SessionKeySourceType​

Underlying type: string

SessionKeySourceType identifies how a session key fragment is read.

Validation:

  • Enum: [Header Query Cookie JWTClaim]

Appears in:

FieldDescription
Header
Query
Cookie
JWTClaim

SessionSticky​

SessionSticky configures per-ModelServer session key extraction and binding TTL. The backing store (memory vs Redis) is configured in the router process, not here.

Appears in:

FieldDescriptionDefaultValidation
sessionAffinitySeconds integerSessionAffinitySeconds is binding TTL in seconds.
Once the session has been idle for more than the specified duration, the session becomes invalid.
When unset, the default is 300 (5 minutes).
Minimum: 1
sources SessionKeySource arraySources are evaluated in order; the first non-empty extracted value is the session key.MaxItems: 16

StringMatch​

StringMatch defines the matching conditions for string fields. Only one of the fields may be set.

Appears in:

FieldDescriptionDefaultValidation
exact string
prefix string
regex string

TargetModel​

LLM inference traffic target model.

Appears in:

FieldDescriptionDefaultValidation
modelServerName stringModelServerName is used to specify the correlated modelServer within the same namespace.
It is mutually exclusive with ExternalModelProviderName.
externalModelProviderName stringExternalModelProviderName is used to specify the correlated ExternalModelProvider within the same namespace.
It is mutually exclusive with ModelServerName.
weight integerWeight is used to specify the percentage of traffic should be sent to the target model.
The value should be in the range of [0, 100].
100Maximum: 100
Minimum: 0

TrafficPolicy​

Appears in:

FieldDescriptionDefaultValidation
retry RetryThe retry policy for the inference request.
connectionPool ConnectionPoolConnectionPool configures the upstream HTTP connection pool used when
forwarding to this ModelServer's pods. When omitted, a shared default
pool is used. Each ModelServer that sets this gets its own isolated pool.
sessionSticky SessionStickySessionSticky pins requests with the same extracted session key to the same
backend Pod of this ModelServer for a TTL. Nil or omitted disables session
affinity for this ModelServer. It does not override ModelRoute weighted
selection among ModelServers.

WorkloadPort​

WorkloadPort defines the port and protocol configuration for the model server.

Appears in:

FieldDescriptionDefaultValidation
port integerThe port of the model server. The number must be between 1 and 65535.Maximum: 65535
Minimum: 1
Required: {}
protocol stringThe protocol of the model server. Supported values are "http" and "https".httpEnum: [http https]

WorkloadSelector​

WorkloadSelector is used to match the model serving instances. Currently, they must be pods within the same namespace as modelServer object.

Appears in:

FieldDescriptionDefaultValidation
matchLabels object (keys:string, values:string)The base labels to match the model serving instances.
All serving instances must match these labels.
pdGroup PDGroupPDGroup is used to further match different roles of the model serving instances,
mainly used in case like PD disaggregation.