Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the serving v1alpha1 API group +kubebuilder:object:generate=true +groupName=serving.kserve.io
Copyright 2021 IBM Corporation ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2021 IBM Corporation ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "serving.kserve.io", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
This section is empty.
Types ¶
type FailureInfo ¶
type FailureInfo struct { // Name of component to which the failure relates (usually Pod name) //+optional Location string `json:"location,omitempty"` // High level class of failure //+optional Reason FailureReason `json:"reason,omitempty"` // Detailed error message //+optional Message string `json:"message,omitempty"` // Internal ID of model, tied to specific Spec contents //+optional ModelId string `json:"modelId,omitempty"` // Time failure occurred or was discovered //+optional Time *metav1.Time `json:"time,omitempty"` }
+k8s:openapi-gen=true
func (*FailureInfo) DeepCopy ¶
func (in *FailureInfo) DeepCopy() *FailureInfo
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FailureInfo.
func (*FailureInfo) DeepCopyInto ¶
func (in *FailureInfo) DeepCopyInto(out *FailureInfo)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FailureReason ¶
type FailureReason string
FailureReason enum +kubebuilder:validation:Enum=ModelLoadFailed;RuntimeUnhealthy;NoSupportingRuntime;RuntimeNotRecognized;InvalidPredictorSpec +k8s:openapi-gen=true
const ( // The model failed to load within a ServingRuntime container ModelLoadFailed FailureReason = "ModelLoadFailed" // Corresponding ServingRuntime containers failed to start or are unhealthy RuntimeUnhealthy FailureReason = "RuntimeUnhealthy" // There are no ServingRuntime which support the specified model type NoSupportingRuntime FailureReason = "NoSupportingRuntime" // There is no ServingRuntime defined with the specified runtime name RuntimeNotRecognized FailureReason = "RuntimeNotRecognized" // The current Predictor Spec is invalid or unsupported InvalidPredictorSpec FailureReason = "InvalidPredictorSpec" )
FailureReason enum values
type GpuRequest ¶
type GpuRequest string
GpuRequest constant for specifying GPU requirement or preference +kubebuilder:validation:Enum=required;preferred +k8s:openapi-gen=true
const ( // Predictor requires GPU Required GpuRequest = "required" // Predictor prefers GPU Preferred GpuRequest = "preferred" )
GpuRequest Enum
type Model ¶
type Model struct { // +required Type ModelType `json:"modelType"` // (DEPRECATED) The path to the model files within the storage // +optional Path string `json:"path"` // (DEPRECATED) The path to the schema file within the storage // +optional SchemaPath *string `json:"schemaPath,omitempty"` // +optional Storage *Storage `json:"storage,omitempty"` }
+k8s:openapi-gen=true
func (*Model) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Model.
func (*Model) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ModelState ¶
type ModelState string
ModelState enum +kubebuilder:validation:Enum="";Pending;Standby;Loading;Loaded;FailedToLoad +k8s:openapi-gen=true
const ( // Model is not yet registered Pending ModelState = "Pending" // Model is available but not loaded (will load when used) Standby ModelState = "Standby" // Model is loading Loading ModelState = "Loading" // At least one copy of the model is loaded Loaded ModelState = "Loaded" // All copies of the model failed to load FailedToLoad ModelState = "FailedToLoad" )
ModelState Enum values
type ModelType ¶
type ModelType struct { // +required Name string `json:"name"` // +optional Version *string `json:"version,omitempty"` }
+k8s:openapi-gen=true
func (*ModelType) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelType.
func (*ModelType) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Predictor ¶
type Predictor struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec PredictorSpec `json:"spec,omitempty"` // +kubebuilder:default={transitionStatus:UpToDate, activeModelState:Pending, targetModelState:"", available:false, failedCopies:0, totalCopies:0} Status PredictorStatus `json:"status,omitempty"` }
Predictor is the Schema for the predictors API +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:printcolumn:name="Type",type="string",JSONPath=".spec.modelType.name" +kubebuilder:printcolumn:name="Available",type="boolean",JSONPath=".status.available" +kubebuilder:printcolumn:name="ActiveModel",type="string",JSONPath=".status.activeModelState" +kubebuilder:printcolumn:name="TargetModel",type="string",JSONPath=".status.targetModelState" +kubebuilder:printcolumn:name="Transition",type="string",JSONPath=".status.transitionStatus" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" +k8s:openapi-gen=true
func (*Predictor) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Predictor.
func (*Predictor) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Predictor) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type PredictorList ¶
type PredictorList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Predictor `json:"items"` }
PredictorList contains a list of Predictor +k8s:openapi-gen=true
func (*PredictorList) DeepCopy ¶
func (in *PredictorList) DeepCopy() *PredictorList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PredictorList.
func (*PredictorList) DeepCopyInto ¶
func (in *PredictorList) DeepCopyInto(out *PredictorList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PredictorList) DeepCopyObject ¶
func (in *PredictorList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type PredictorRuntime ¶
type PredictorRuntime struct { // one-of these must be present *RuntimeRef `json:",inline"` }
see if this is possible +k8s:openapi-gen=true
func (*PredictorRuntime) DeepCopy ¶
func (in *PredictorRuntime) DeepCopy() *PredictorRuntime
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PredictorRuntime.
func (*PredictorRuntime) DeepCopyInto ¶
func (in *PredictorRuntime) DeepCopyInto(out *PredictorRuntime)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PredictorSpec ¶
type PredictorSpec struct { // NOT YET SUPPORTED // +optional ServiceAccountName *string `json:"serviceAccountName,omitempty"` // +required Model `json:",inline"` // May be absent, "preferred" or "required" // +optional Gpu *GpuRequest `json:"gpu,omitempty"` // If omitted a compatible runtime is selected based on the model type (if available) // +optional Runtime *PredictorRuntime `json:"runtime,omitempty"` // Protocol version to be exposed by the predictor (i.e. v1 or v2 or grpc-v1 or grpc-v2) // +optional ProtocolVersion *constants.InferenceServiceProtocol `json:"protocolVersion,omitempty"` }
PredictorSpec defines the desired state of Predictor +k8s:openapi-gen=true
func (*PredictorSpec) DeepCopy ¶
func (in *PredictorSpec) DeepCopy() *PredictorSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PredictorSpec.
func (*PredictorSpec) DeepCopyInto ¶
func (in *PredictorSpec) DeepCopyInto(out *PredictorSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PredictorStatus ¶
type PredictorStatus struct { // Whether the predictor endpoint is available Available bool `json:"available"` // Whether the available predictor endpoint reflects the current Spec or is in transition // +kubebuilder:default=UpToDate TransitionStatus TransitionStatus `json:"transitionStatus"` // High level state string: Pending, Standby, Loading, Loaded, FailedToLoad // +kubebuilder:default=Pending ActiveModelState ModelState `json:"activeModelState"` // +kubebuilder:default="" TargetModelState ModelState `json:"targetModelState"` // Details of last failure, when load of target model is failed or blocked //+optional LastFailureInfo *FailureInfo `json:"lastFailureInfo,omitempty"` // Addressable endpoint for the deployed trained model // This will be "static" and will not change when the model is mutated // +optional HTTPEndpoint string `json:"httpEndpoint"` // +optional GrpcEndpoint string `json:"grpcEndpoint"` // Total number of copies of this predictor's models // +kubebuilder:default=0 TotalCopies int `json:"totalCopies"` // How many copies of this predictor's models failed to load recently // +kubebuilder:default=0 FailedCopies int `json:"failedCopies"` }
PredictorStatus defines the observed state of Predictor +k8s:openapi-gen=true
func (*PredictorStatus) DeepCopy ¶
func (in *PredictorStatus) DeepCopy() *PredictorStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PredictorStatus.
func (*PredictorStatus) DeepCopyInto ¶
func (in *PredictorStatus) DeepCopyInto(out *PredictorStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PredictorStatus) WaitingForRuntime ¶
func (s *PredictorStatus) WaitingForRuntime() bool
type RuntimeRef ¶
type RuntimeRef struct {
Name string `json:"name"`
}
+k8s:openapi-gen=true
func (*RuntimeRef) DeepCopy ¶
func (in *RuntimeRef) DeepCopy() *RuntimeRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuntimeRef.
func (*RuntimeRef) DeepCopyInto ¶
func (in *RuntimeRef) DeepCopyInto(out *RuntimeRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type S3StorageSource ¶
type S3StorageSource struct { // +required SecretKey string `json:"secretKey" validation:"required"` // +optional Bucket *string `json:"bucket,omitempty" validation:"required"` }
+k8s:openapi-gen=true
func (*S3StorageSource) DeepCopy ¶
func (in *S3StorageSource) DeepCopy() *S3StorageSource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S3StorageSource.
func (*S3StorageSource) DeepCopyInto ¶
func (in *S3StorageSource) DeepCopyInto(out *S3StorageSource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Storage ¶
type Storage struct { // new way to specify the storage configuration StorageSpec `json:",inline"` // (DEPRECATED) PersistentVolmueClaim was never supported this way and will be removed PersistentVolumeClaim *corev1.PersistentVolumeClaimVolumeSource `json:"persistentVolumeClaim,omitempty"` // (DEPRECATED) S3 has configuration to connect to an S3 instance. It is now deprecated, use fields from Spec.Storage instead. S3 *S3StorageSource `json:"s3,omitempty"` }
+k8s:openapi-gen=true
func (*Storage) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Storage.
func (*Storage) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StorageSpec ¶ added in v0.9.0
type StorageSpec struct { // The path to the model object in the storage. It cannot co-exist // with the storageURI. // +optional Path *string `json:"path,omitempty"` // The path to the model schema file in the storage. // +optional SchemaPath *string `json:"schemaPath,omitempty"` // Parameters to override the default storage credentials and config. // +optional Parameters *map[string]string `json:"parameters,omitempty"` // The Storage Key in the secret for this model. // +optional StorageKey *string `json:"key,omitempty"` }
+k8s:openapi-gen=true
func (*StorageSpec) DeepCopy ¶ added in v0.9.0
func (in *StorageSpec) DeepCopy() *StorageSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageSpec.
func (*StorageSpec) DeepCopyInto ¶ added in v0.9.0
func (in *StorageSpec) DeepCopyInto(out *StorageSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TransitionStatus ¶
type TransitionStatus string
TransitionStatus enum +kubebuilder:validation:Enum=UpToDate;InProgress;BlockedByFailedLoad;InvalidSpec +k8s:openapi-gen=true
const ( // Predictor is up-to-date (reflects current spec) UpToDate TransitionStatus = "UpToDate" // Waiting for target model to reach state of active model InProgress TransitionStatus = "InProgress" // Target model failed to load BlockedByFailedLoad TransitionStatus = "BlockedByFailedLoad" // TBD InvalidSpec TransitionStatus = "InvalidSpec" )
TransitionStatus Enum values