Files
kserve/test/crds/gateway-inference-extension.yaml

1480 lines
68 KiB
YAML

apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
inference.networking.k8s.io/bundle-version: v1.5.0
name: inferencemodelrewrites.inference.networking.x-k8s.io
spec:
group: inference.networking.x-k8s.io
names:
kind: InferenceModelRewrite
listKind: InferenceModelRewriteList
plural: inferencemodelrewrites
singular: inferencemodelrewrite
scope: Namespaced
versions:
- additionalPrinterColumns:
- jsonPath: .spec.poolRef.name
name: Inference Pool
type: string
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
name: v1alpha2
schema:
openAPIV3Schema:
description: InferenceModelRewrite is the Schema for the InferenceModelRewrite
API.
properties:
apiVersion:
description: |-
APIVersion 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
type: string
kind:
description: |-
Kind 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
type: string
metadata:
type: object
spec:
description: InferenceModelRewriteSpec defines the desired state of InferenceModelRewrite.
properties:
poolRef:
description: PoolRef is a reference to the inference pool.
properties:
group:
default: inference.networking.k8s.io
description: Group is the group of the referent.
maxLength: 253
pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
type: string
kind:
default: InferencePool
description: Kind is kind of the referent. For example "InferencePool".
maxLength: 63
minLength: 1
pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$
type: string
name:
description: Name is the name of the referent.
maxLength: 253
minLength: 1
type: string
required:
- name
type: object
rules:
items:
description: |-
InferenceModelRewriteRule defines the match criteria and corresponding action.
For details on how precedence is determined across multiple rules and
InferenceModelRewrite resources, see the "Precedence and Conflict Resolution"
section in InferenceModelRewriteSpec.
properties:
matches:
items:
description: Match defines the criteria for matching the LLM
requests.
properties:
model:
description: |-
Model specifies the criteria for matching the 'model' field
within the JSON request body.
properties:
type:
default: Exact
description: |-
Type specifies the kind of string matching to use.
Supported value is "Exact". Defaults to "Exact".
enum:
- Exact
type: string
value:
description: Value is the model name string to match
against.
minLength: 1
type: string
required:
- value
type: object
required:
- model
type: object
type: array
targets:
items:
description: TargetModel defines a weighted model destination
for traffic distribution.
properties:
modelRewrite:
type: string
weight:
description: |-
(The following comment is copied from the original targetModel)
Weight is used to determine the proportion of traffic that should be
sent to this model when multiple target models are specified.
Weight defines the proportion of requests forwarded to the specified
model. This is computed as weight/(sum of all weights in this
TargetModels list). For non-zero values, there may be some epsilon from
the exact proportion defined here depending on the precision an
implementation supports. Weight is not a percentage and the sum of
weights does not need to equal 100.
If a weight is set for any targetModel, it must be set for all targetModels.
Conversely weights are optional, so long as ALL targetModels do not specify a weight.
format: int32
maximum: 1000000
minimum: 1
type: integer
required:
- modelRewrite
type: object
minItems: 1
type: array
type: object
type: array
required:
- poolRef
- rules
type: object
status:
description: InferenceModelRewriteStatus defines the observed state of
InferenceModelRewrite.
properties:
conditions:
default:
- lastTransitionTime: "1970-01-01T00:00:00Z"
message: Waiting for controller
reason: Pending
status: Unknown
type: Accepted
description: |-
Conditions track the state of the InferenceModelRewrite.
Known condition types are:
* "Accepted"
items:
description: Condition contains details for one aspect of the current
state of this API Resource.
properties:
lastTransitionTime:
description: |-
lastTransitionTime is the last time the condition transitioned from one status to another.
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
format: date-time
type: string
message:
description: |-
message is a human readable message indicating details about the transition.
This may be an empty string.
maxLength: 32768
type: string
observedGeneration:
description: |-
observedGeneration represents the .metadata.generation that the condition was set based upon.
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
with respect to the current state of the instance.
format: int64
minimum: 0
type: integer
reason:
description: |-
reason contains a programmatic identifier indicating the reason for the condition's last transition.
Producers of specific condition types may define expected values and meanings for this field,
and whether the values are considered a guaranteed API.
The value should be a CamelCase string.
This field may not be empty.
maxLength: 1024
minLength: 1
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
type: string
status:
description: status of the condition, one of True, False, Unknown.
enum:
- "True"
- "False"
- Unknown
type: string
type:
description: type of condition in CamelCase or in foo.example.com/CamelCase.
maxLength: 316
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
type: string
required:
- lastTransitionTime
- message
- reason
- status
- type
type: object
maxItems: 8
type: array
x-kubernetes-list-map-keys:
- type
x-kubernetes-list-type: map
type: object
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: null
storedVersions: null
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
inference.networking.k8s.io/bundle-version: v1.5.0
name: inferenceobjectives.inference.networking.x-k8s.io
spec:
group: inference.networking.x-k8s.io
names:
kind: InferenceObjective
listKind: InferenceObjectiveList
plural: inferenceobjectives
singular: inferenceobjective
scope: Namespaced
versions:
- additionalPrinterColumns:
- jsonPath: .spec.poolRef.name
name: Inference Pool
type: string
- jsonPath: .spec.priority
name: Priority
type: string
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
name: v1alpha2
schema:
openAPIV3Schema:
description: InferenceObjective is the Schema for the InferenceObjectives
API.
properties:
apiVersion:
description: |-
APIVersion 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
type: string
kind:
description: |-
Kind 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
type: string
metadata:
type: object
spec:
description: |-
InferenceObjectiveSpec represents the desired state of a specific model use case. This resource is
managed by the "Inference Workload Owner" persona.
The Inference Workload Owner persona is someone that trains, verifies, and
leverages a large language model from a model frontend, drives the lifecycle
and rollout of new versions of those models, and defines the specific
performance and latency goals for the model. These workloads are
expected to operate within an InferencePool sharing compute capacity with other
InferenceObjectives, defined by the Inference Platform Admin.
properties:
poolRef:
description: PoolRef is a reference to the inference pool, the pool
must exist in the same namespace.
properties:
group:
default: inference.networking.k8s.io
description: Group is the group of the referent.
maxLength: 253
pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
type: string
kind:
default: InferencePool
description: Kind is kind of the referent. For example "InferencePool".
maxLength: 63
minLength: 1
pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$
type: string
name:
description: Name is the name of the referent.
maxLength: 253
minLength: 1
type: string
required:
- name
type: object
priority:
description: |-
Priority defines how important it is to serve the request compared to other requests in the same pool.
Priority is an integer value that defines the priority of the request.
The higher the value, the more critical the request is; negative values _are_ allowed.
No default value is set for this field, allowing for future additions of new fields that may 'one of' with this field.
However, implementations that consume this field (such as the Endpoint Picker) will treat an unset value as '0'.
Priority is used in flow control, primarily in the event of resource scarcity(requests need to be queued).
All requests will be queued, and flow control will _always_ allow requests of higher priority to be served first.
Fairness is only enforced and tracked between requests of the same priority.
Example: requests with Priority 10 will always be served before
requests with Priority of 0 (the value used if Priority is unset or no InferenceObjective is specified).
Similarly requests with a Priority of -10 will always be served after requests with Priority of 0.
type: integer
required:
- poolRef
type: object
status:
description: InferenceObjectiveStatus defines the observed state of InferenceObjective
properties:
conditions:
default:
- lastTransitionTime: "1970-01-01T00:00:00Z"
message: Waiting for controller
reason: Pending
status: Unknown
type: Ready
description: |-
Conditions track the state of the InferenceObjective.
Known condition types are:
* "Accepted"
items:
description: Condition contains details for one aspect of the current
state of this API Resource.
properties:
lastTransitionTime:
description: |-
lastTransitionTime is the last time the condition transitioned from one status to another.
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
format: date-time
type: string
message:
description: |-
message is a human readable message indicating details about the transition.
This may be an empty string.
maxLength: 32768
type: string
observedGeneration:
description: |-
observedGeneration represents the .metadata.generation that the condition was set based upon.
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
with respect to the current state of the instance.
format: int64
minimum: 0
type: integer
reason:
description: |-
reason contains a programmatic identifier indicating the reason for the condition's last transition.
Producers of specific condition types may define expected values and meanings for this field,
and whether the values are considered a guaranteed API.
The value should be a CamelCase string.
This field may not be empty.
maxLength: 1024
minLength: 1
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
type: string
status:
description: status of the condition, one of True, False, Unknown.
enum:
- "True"
- "False"
- Unknown
type: string
type:
description: type of condition in CamelCase or in foo.example.com/CamelCase.
maxLength: 316
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
type: string
required:
- lastTransitionTime
- message
- reason
- status
- type
type: object
maxItems: 8
type: array
x-kubernetes-list-map-keys:
- type
x-kubernetes-list-type: map
type: object
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: null
storedVersions: null
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
inference.networking.k8s.io/bundle-version: v1.5.0
name: inferencepoolimports.inference.networking.x-k8s.io
spec:
group: inference.networking.x-k8s.io
names:
kind: InferencePoolImport
listKind: InferencePoolImportList
plural: inferencepoolimports
shortNames:
- infpimp
singular: inferencepoolimport
scope: Namespaced
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: InferencePoolImport is the Schema for the InferencePoolImports
API.
properties:
apiVersion:
description: |-
APIVersion 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
type: string
kind:
description: |-
Kind 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
type: string
metadata:
type: object
status:
description: Status defines the observed state of the InferencePoolImport.
properties:
controllers:
description: Controllers is a list of controllers that are responsible
for managing the InferencePoolImport.
items:
description: ImportController defines a controller that is responsible
for managing the InferencePoolImport.
properties:
conditions:
description: |-
Conditions track the state of the InferencePoolImport.
Known condition types are:
* "Accepted"
items:
description: Condition contains details for one aspect of
the current state of this API Resource.
properties:
lastTransitionTime:
description: |-
lastTransitionTime is the last time the condition transitioned from one status to another.
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
format: date-time
type: string
message:
description: |-
message is a human readable message indicating details about the transition.
This may be an empty string.
maxLength: 32768
type: string
observedGeneration:
description: |-
observedGeneration represents the .metadata.generation that the condition was set based upon.
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
with respect to the current state of the instance.
format: int64
minimum: 0
type: integer
reason:
description: |-
reason contains a programmatic identifier indicating the reason for the condition's last transition.
Producers of specific condition types may define expected values and meanings for this field,
and whether the values are considered a guaranteed API.
The value should be a CamelCase string.
This field may not be empty.
maxLength: 1024
minLength: 1
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
type: string
status:
description: status of the condition, one of True, False,
Unknown.
enum:
- "True"
- "False"
- Unknown
type: string
type:
description: type of condition in CamelCase or in foo.example.com/CamelCase.
maxLength: 316
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
type: string
required:
- lastTransitionTime
- message
- reason
- status
- type
type: object
maxItems: 8
type: array
x-kubernetes-list-map-keys:
- type
x-kubernetes-list-type: map
exportingClusters:
description: |-
ExportingClusters is a list of clusters that exported the InferencePool(s) that back the
InferencePoolImport. Required when the controller is responsible for CRUD'ing the InferencePoolImport
from the exported InferencePool(s).
items:
description: ExportingCluster defines a cluster that exported
the InferencePool that backs this InferencePoolImport.
properties:
name:
description: Name of the exporting cluster (must be unique
within the list).
maxLength: 253
minLength: 1
type: string
required:
- name
type: object
type: array
name:
description: |-
Name is a domain/path string that indicates the name of the controller that manages the
InferencePoolImport. Name corresponds to the GatewayClass controllerName field when the
controller will manage parents of type "Gateway". Otherwise, the name is implementation-specific.
Example: "example.net/import-controller".
The format of this field is DOMAIN "/" PATH, where DOMAIN and PATH are valid Kubernetes
names (https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names).
A controller MUST populate this field when writing status and ensure that entries to status
populated with their controller name are removed when they are no longer necessary.
maxLength: 253
minLength: 1
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/[A-Za-z0-9\/\-._~%!$&'()*+,;=:]+$
type: string
parents:
description: |-
Parents is a list of parent resources, typically Gateways, that are associated with the
InferencePoolImport, and the status of the InferencePoolImport with respect to each parent.
Ancestor would be a more accurate name, but Parent is consistent with InferencePool terminology.
Required when the controller manages the InferencePoolImport as an HTTPRoute backendRef. The controller
must add an entry for each parent it manages and remove the parent entry when the controller no longer
considers the InferencePoolImport to be associated with that parent.
items:
description: ParentStatus defines the observed state of InferencePool
from a Parent, i.e. Gateway.
properties:
conditions:
description: |-
Conditions is a list of status conditions that provide information about the observed
state of the InferencePool. This field is required to be set by the controller that
manages the InferencePool.
Supported condition types are:
* "Accepted"
* "ResolvedRefs"
items:
description: Condition contains details for one aspect
of the current state of this API Resource.
properties:
lastTransitionTime:
description: |-
lastTransitionTime is the last time the condition transitioned from one status to another.
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
format: date-time
type: string
message:
description: |-
message is a human readable message indicating details about the transition.
This may be an empty string.
maxLength: 32768
type: string
observedGeneration:
description: |-
observedGeneration represents the .metadata.generation that the condition was set based upon.
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
with respect to the current state of the instance.
format: int64
minimum: 0
type: integer
reason:
description: |-
reason contains a programmatic identifier indicating the reason for the condition's last transition.
Producers of specific condition types may define expected values and meanings for this field,
and whether the values are considered a guaranteed API.
The value should be a CamelCase string.
This field may not be empty.
maxLength: 1024
minLength: 1
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
type: string
status:
description: status of the condition, one of True,
False, Unknown.
enum:
- "True"
- "False"
- Unknown
type: string
type:
description: type of condition in CamelCase or in
foo.example.com/CamelCase.
maxLength: 316
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
type: string
required:
- lastTransitionTime
- message
- reason
- status
- type
type: object
maxItems: 8
type: array
x-kubernetes-list-map-keys:
- type
x-kubernetes-list-type: map
controllerName:
description: |-
ControllerName is a domain/path string that indicates the name of the controller that
wrote this status. This corresponds with the GatewayClass controllerName field when the
parentRef references a Gateway kind.
Example: "example.net/gateway-controller".
The format of this field is DOMAIN "/" PATH, where DOMAIN and PATH are valid Kubernetes names:
https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
Controllers MAY populate this field when writing status. When populating this field, controllers
should ensure that entries to status populated with their ControllerName are cleaned up when they
are no longer necessary.
maxLength: 253
minLength: 1
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/[A-Za-z0-9\/\-._~%!$&'()*+,;=:]+$
type: string
parentRef:
description: |-
ParentRef is used to identify the parent resource that this status
is associated with. It is used to match the InferencePool with the parent
resource, such as a Gateway.
properties:
group:
default: gateway.networking.k8s.io
description: |-
Group is the group of the referent API object. When unspecified, the referent is assumed
to be in the "gateway.networking.k8s.io" API group.
maxLength: 253
minLength: 0
pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
type: string
kind:
default: Gateway
description: |-
Kind is the kind of the referent API object. When unspecified, the referent is assumed
to be a "Gateway" kind.
maxLength: 63
minLength: 1
pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$
type: string
name:
description: Name is the name of the referent API
object.
maxLength: 253
minLength: 1
type: string
namespace:
description: |-
Namespace is the namespace of the referenced object. When unspecified, the local
namespace is inferred.
Note that when a namespace different than the local namespace is specified,
a ReferenceGrant object is required in the referent namespace to allow that
namespace's owner to accept the reference. See the ReferenceGrant
documentation for details: https://gateway-api.sigs.k8s.io/api-types/referencegrant/
maxLength: 63
minLength: 1
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
type: string
required:
- name
type: object
required:
- parentRef
type: object
type: array
x-kubernetes-list-type: atomic
required:
- name
type: object
maxItems: 8
type: array
x-kubernetes-list-map-keys:
- name
x-kubernetes-list-type: map
required:
- controllers
type: object
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: null
storedVersions: null
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
api-approved.kubernetes.io: https://github.com/kubernetes-sigs/gateway-api-inference-extension/pull/1173
inference.networking.k8s.io/bundle-version: v1.5.0
name: inferencepools.inference.networking.k8s.io
spec:
group: inference.networking.k8s.io
names:
kind: InferencePool
listKind: InferencePoolList
plural: inferencepools
shortNames:
- infpool
singular: inferencepool
scope: Namespaced
versions:
- name: v1
schema:
openAPIV3Schema:
description: |
InferencePool is the Schema for the InferencePools API.
properties:
apiVersion:
description: |-
APIVersion 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
type: string
kind:
description: |-
Kind 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
type: string
metadata:
type: object
spec:
description: Spec defines the desired state of the InferencePool.
properties:
appProtocol:
default: http
description: |-
AppProtocol describes the application protocol for all the target ports.
If unspecified, the protocol defaults to HTTP/1.1.
Supported values include:
* "http": HTTP/1.1. This is the default.
* "kubernetes.io/h2c": HTTP/2 over cleartext.
enum:
- http
- kubernetes.io/h2c
type: string
endpointPickerRef:
description: |-
EndpointPickerRef is a reference to the Endpoint Picker extension and its
associated configuration.
properties:
failureMode:
default: FailClose
description: |-
FailureMode configures how the parent handles the case when the Endpoint Picker extension
is non-responsive. When unspecified, defaults to "FailClose".
enum:
- FailOpen
- FailClose
type: string
group:
default: ""
description: |-
Group is the group of the referent API object. When unspecified, the default value
is "", representing the Core API group.
maxLength: 253
minLength: 0
pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
type: string
kind:
default: Service
description: |-
Kind is the Kubernetes resource kind of the referent.
Required if the referent is ambiguous, e.g. service with multiple ports.
Defaults to "Service" when not specified.
ExternalName services can refer to CNAME DNS records that may live
outside of the cluster and as such are difficult to reason about in
terms of conformance. They also may not be safe to forward to (see
CVE-2021-25740 for more information). Implementations MUST NOT
support ExternalName Services.
maxLength: 63
minLength: 1
pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$
type: string
name:
description: Name is the name of the referent API object.
maxLength: 253
minLength: 1
type: string
port:
description: |-
Port is the port of the Endpoint Picker extension service.
Port is required when the referent is a Kubernetes Service. In this
case, the port number is the service port number, not the target port.
For other resources, destination port might be derived from the referent
resource or this field.
properties:
number:
description: |-
Number defines the port number to access the selected model server Pods.
The number must be in the range 1 to 65535.
format: int32
maximum: 65535
minimum: 1
type: integer
required:
- number
type: object
required:
- name
type: object
x-kubernetes-validations:
- message: port is required when kind is 'Service' or unspecified
(defaults to 'Service')
rule: self.kind != 'Service' || has(self.port)
selector:
description: |-
Selector determines which Pods are members of this inference pool.
It matches Pods by their labels only within the same namespace; cross-namespace
selection is not supported.
The structure of this LabelSelector is intentionally simple to be compatible
with Kubernetes Service selectors, as some implementations may translate
this configuration into a Service resource.
properties:
matchLabels:
additionalProperties:
description: |-
LabelValue is the value of a label. This is used for validation
of maps. This matches the Kubernetes label validation rules:
* must be 63 characters or less (can be empty),
* unless empty, must begin and end with an alphanumeric character ([a-z0-9A-Z]),
* could contain dashes (-), underscores (_), dots (.), and alphanumerics between.
Valid values include:
* MyValue
* my.name
* 123-my-value
maxLength: 63
minLength: 0
pattern: ^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$
type: string
description: |-
MatchLabels contains a set of required {key,value} pairs.
An object must match every label in this map to be selected.
The matching logic is an AND operation on all entries.
maxProperties: 64
minProperties: 1
type: object
required:
- matchLabels
type: object
targetPorts:
description: |-
TargetPorts defines a list of ports that are exposed by this InferencePool.
Every port will be treated as a distinctive endpoint by EPP,
addressable as a 'podIP:portNumber' combination.
items:
description: Port defines the network port that will be exposed
by this InferencePool.
properties:
number:
description: |-
Number defines the port number to access the selected model server Pods.
The number must be in the range 1 to 65535.
format: int32
maximum: 65535
minimum: 1
type: integer
required:
- number
type: object
maxItems: 8
minItems: 1
type: array
x-kubernetes-list-type: atomic
x-kubernetes-validations:
- message: port number must be unique
rule: self.all(p1, self.exists_one(p2, p1.number==p2.number))
required:
- endpointPickerRef
- selector
- targetPorts
type: object
status:
description: Status defines the observed state of the InferencePool.
properties:
parents:
description: |-
Parents is a list of parent resources, typically Gateways, that are associated with
the InferencePool, and the status of the InferencePool with respect to each parent.
A controller that manages the InferencePool, must add an entry for each parent it manages
and remove the parent entry when the controller no longer considers the InferencePool to
be associated with that parent.
A maximum of 32 parents will be represented in this list. When the list is empty,
it indicates that the InferencePool is not associated with any parents.
items:
description: ParentStatus defines the observed state of InferencePool
from a Parent, i.e. Gateway.
properties:
conditions:
description: |-
Conditions is a list of status conditions that provide information about the observed
state of the InferencePool. This field is required to be set by the controller that
manages the InferencePool.
Supported condition types are:
* "Accepted"
* "ResolvedRefs"
items:
description: Condition contains details for one aspect of
the current state of this API Resource.
properties:
lastTransitionTime:
description: |-
lastTransitionTime is the last time the condition transitioned from one status to another.
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
format: date-time
type: string
message:
description: |-
message is a human readable message indicating details about the transition.
This may be an empty string.
maxLength: 32768
type: string
observedGeneration:
description: |-
observedGeneration represents the .metadata.generation that the condition was set based upon.
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
with respect to the current state of the instance.
format: int64
minimum: 0
type: integer
reason:
description: |-
reason contains a programmatic identifier indicating the reason for the condition's last transition.
Producers of specific condition types may define expected values and meanings for this field,
and whether the values are considered a guaranteed API.
The value should be a CamelCase string.
This field may not be empty.
maxLength: 1024
minLength: 1
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
type: string
status:
description: status of the condition, one of True, False,
Unknown.
enum:
- "True"
- "False"
- Unknown
type: string
type:
description: type of condition in CamelCase or in foo.example.com/CamelCase.
maxLength: 316
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
type: string
required:
- lastTransitionTime
- message
- reason
- status
- type
type: object
maxItems: 8
type: array
x-kubernetes-list-map-keys:
- type
x-kubernetes-list-type: map
controllerName:
description: |-
ControllerName is a domain/path string that indicates the name of the controller that
wrote this status. This corresponds with the GatewayClass controllerName field when the
parentRef references a Gateway kind.
Example: "example.net/gateway-controller".
The format of this field is DOMAIN "/" PATH, where DOMAIN and PATH are valid Kubernetes names:
https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
Controllers MAY populate this field when writing status. When populating this field, controllers
should ensure that entries to status populated with their ControllerName are cleaned up when they
are no longer necessary.
maxLength: 253
minLength: 1
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/[A-Za-z0-9\/\-._~%!$&'()*+,;=:]+$
type: string
parentRef:
description: |-
ParentRef is used to identify the parent resource that this status
is associated with. It is used to match the InferencePool with the parent
resource, such as a Gateway.
properties:
group:
default: gateway.networking.k8s.io
description: |-
Group is the group of the referent API object. When unspecified, the referent is assumed
to be in the "gateway.networking.k8s.io" API group.
maxLength: 253
minLength: 0
pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
type: string
kind:
default: Gateway
description: |-
Kind is the kind of the referent API object. When unspecified, the referent is assumed
to be a "Gateway" kind.
maxLength: 63
minLength: 1
pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$
type: string
name:
description: Name is the name of the referent API object.
maxLength: 253
minLength: 1
type: string
namespace:
description: |-
Namespace is the namespace of the referenced object. When unspecified, the local
namespace is inferred.
Note that when a namespace different than the local namespace is specified,
a ReferenceGrant object is required in the referent namespace to allow that
namespace's owner to accept the reference. See the ReferenceGrant
documentation for details: https://gateway-api.sigs.k8s.io/api-types/referencegrant/
maxLength: 63
minLength: 1
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
type: string
required:
- name
type: object
required:
- parentRef
type: object
maxItems: 32
type: array
x-kubernetes-list-type: atomic
type: object
required:
- spec
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: null
storedVersions: null
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
api-approved.kubernetes.io: unapproved, experimental-only
inference.networking.k8s.io/bundle-version: v1.3.1
name: inferencepools.inference.networking.x-k8s.io
spec:
group: inference.networking.x-k8s.io
names:
kind: InferencePool
listKind: InferencePoolList
plural: inferencepools
shortNames:
- xinfpool
singular: inferencepool
scope: Namespaced
versions:
- name: v1alpha2
schema:
openAPIV3Schema:
description: InferencePool is the Schema for the InferencePools API.
properties:
apiVersion:
description: 'APIVersion 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'
type: string
kind:
description: 'Kind 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'
type: string
metadata:
type: object
spec:
description: InferencePoolSpec defines the desired state of InferencePool
properties:
extensionRef:
description: Extension configures an endpoint picker as an extension
service.
properties:
failureMode:
default: FailClose
description: 'Configures how the gateway handles the case when
the extension is not responsive.
Defaults to failClose.'
enum:
- FailOpen
- FailClose
type: string
group:
default: ''
description: 'Group is the group of the referent.
The default value is "", representing the Core API group.'
maxLength: 253
pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
type: string
kind:
default: Service
description: 'Kind is the Kubernetes resource kind of the referent.
Defaults to "Service" when not specified.
ExternalName services can refer to CNAME DNS records that may
live
outside of the cluster and as such are difficult to reason about
in
terms of conformance. They also may not be safe to forward to
(see
CVE-2021-25740 for more information). Implementations MUST NOT
support ExternalName Services.'
maxLength: 63
minLength: 1
pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$
type: string
name:
description: Name is the name of the referent.
maxLength: 253
minLength: 1
type: string
portNumber:
description: 'The port number on the service running the extension.
When unspecified,
implementations SHOULD infer a default value of 9002 when the
Kind is
Service.'
format: int32
maximum: 65535
minimum: 1
type: integer
required:
- name
type: object
selector:
additionalProperties:
description: 'LabelValue is the value of a label. This is used for
validation
of maps. This matches the Kubernetes label validation rules:
* must be 63 characters or less (can be empty),
* unless empty, must begin and end with an alphanumeric character
([a-z0-9A-Z]),
* could contain dashes (-), underscores (_), dots (.), and alphanumerics
between.
Valid values include:
* MyValue
* my.name
* 123-my-value'
maxLength: 63
minLength: 0
pattern: ^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$
type: string
description: 'Selector defines a map of labels to watch model server
Pods
that should be included in the InferencePool.
In some cases, implementations may translate this field to a Service
selector, so this matches the simple
map used for Service selectors instead of the full Kubernetes LabelSelector
type.
If specified, it will be applied to match the model server pods
in the same namespace as the InferencePool.
Cross namesoace selector is not supported.'
type: object
targetPortNumber:
description: 'TargetPortNumber defines the port number to access the
selected model server Pods.
The number must be in the range 1 to 65535.'
format: int32
maximum: 65535
minimum: 1
type: integer
required:
- extensionRef
- selector
- targetPortNumber
type: object
status:
default:
parent:
- conditions:
- lastTransitionTime: '1970-01-01T00:00:00Z'
message: Waiting for controller
reason: Pending
status: Unknown
type: Accepted
parentRef:
kind: Status
name: default
description: Status defines the observed state of InferencePool.
properties:
parent:
description: "Parents is a list of parent resources (usually Gateways)\
\ that are\nassociated with the InferencePool, and the status of\
\ the InferencePool with respect to\neach parent.\n\nA maximum of\
\ 32 Gateways will be represented in this list. When the list contains\n\
`kind: Status, name: default`, it indicates that the InferencePool\
\ is not\nassociated with any Gateway and a controller must perform\
\ the following:\n\n - Remove the parent when setting the \"Accepted\"\
\ condition.\n - Add the parent when the controller will no longer\
\ manage the InferencePool\n and no other parents exist."
items:
description: PoolStatus defines the observed state of InferencePool
from a Gateway.
properties:
conditions:
default:
- lastTransitionTime: '1970-01-01T00:00:00Z'
message: Waiting for controller
reason: Pending
status: Unknown
type: Accepted
description: 'Conditions track the state of the InferencePool.
Known condition types are:
* "Accepted"
* "ResolvedRefs"'
items:
description: Condition contains details for one aspect of
the current state of this API Resource.
properties:
lastTransitionTime:
description: 'lastTransitionTime is the last time the
condition transitioned from one status to another.
This should be when the underlying condition changed. If
that is not known, then using the time when the API
field changed is acceptable.'
format: date-time
type: string
message:
description: 'message is a human readable message indicating
details about the transition.
This may be an empty string.'
maxLength: 32768
type: string
observedGeneration:
description: 'observedGeneration represents the .metadata.generation
that the condition was set based upon.
For instance, if .metadata.generation is currently 12,
but the .status.conditions[x].observedGeneration is
9, the condition is out of date
with respect to the current state of the instance.'
format: int64
minimum: 0
type: integer
reason:
description: 'reason contains a programmatic identifier
indicating the reason for the condition''s last transition.
Producers of specific condition types may define expected
values and meanings for this field,
and whether the values are considered a guaranteed API.
The value should be a CamelCase string.
This field may not be empty.'
maxLength: 1024
minLength: 1
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
type: string
status:
description: status of the condition, one of True, False,
Unknown.
enum:
- 'True'
- 'False'
- Unknown
type: string
type:
description: type of condition in CamelCase or in foo.example.com/CamelCase.
maxLength: 316
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
type: string
required:
- lastTransitionTime
- message
- reason
- status
- type
type: object
maxItems: 8
type: array
x-kubernetes-list-map-keys:
- type
x-kubernetes-list-type: map
parentRef:
description: GatewayRef indicates the gateway that observed
state of InferencePool.
properties:
group:
default: gateway.networking.k8s.io
description: Group is the group of the referent.
maxLength: 253
pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
type: string
kind:
default: Gateway
description: Kind is kind of the referent. For example "Gateway".
maxLength: 63
minLength: 1
pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$
type: string
name:
description: Name is the name of the referent.
maxLength: 253
minLength: 1
type: string
namespace:
description: 'Namespace is the namespace of the referent. If
not present,
the namespace of the referent is assumed to be the same
as
the namespace of the referring object.'
maxLength: 63
minLength: 1
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
type: string
required:
- name
type: object
required:
- parentRef
type: object
maxItems: 32
type: array
type: object
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ''
plural: ''
conditions: null
storedVersions: null