v1beta1

package
v1.23.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 4, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

+kubebuilder:object:generate=true +groupName=models.kubegems.io

Index

Constants

View Source
const PrepackOpenMMLabName = "OPENMMLAB_SERVER"
View Source
const ServerKindModelx = "MODELX_SERVER"

Variables

View Source
var (
	GroupVersion = SchemeGroupVersion
	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: models.GroupName, Version: "v1beta1"}

SchemeGroupVersion is group version used to register these objects.

Functions

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type IngressSpec

type IngressSpec struct {
	// +kubebuilder:validation:Optional
	Host string `json:"host"`
	// +kubebuilder:validation:Optional
	ClassName string `json:"className"`
	// +kubebuilder:validation:Optional
	GatewayName string `json:"gatewayName"`
}

func (*IngressSpec) DeepCopy

func (in *IngressSpec) DeepCopy() *IngressSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressSpec.

func (*IngressSpec) DeepCopyInto

func (in *IngressSpec) DeepCopyInto(out *IngressSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ModelDeployment

type ModelDeployment struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              ModelDeploymentSpec   `json:"spec,omitempty"`
	Status            ModelDeploymentStatus `json:"status,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:printcolumn:JSONPath=".spec.model.name",name="MODEL",description="Status of the resource",type=string +kubebuilder:printcolumn:JSONPath=".status.phase",name="PHASE",description="Status of the resource",type=string

func (*ModelDeployment) DeepCopy

func (in *ModelDeployment) DeepCopy() *ModelDeployment

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelDeployment.

func (*ModelDeployment) DeepCopyInto

func (in *ModelDeployment) DeepCopyInto(out *ModelDeployment)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ModelDeployment) DeepCopyObject

func (in *ModelDeployment) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ModelDeploymentList

type ModelDeploymentList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []ModelDeployment `json:"items"`
}

+kubebuilder:object:root=true

func (*ModelDeploymentList) DeepCopy

func (in *ModelDeploymentList) DeepCopy() *ModelDeploymentList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelDeploymentList.

func (*ModelDeploymentList) DeepCopyInto

func (in *ModelDeploymentList) DeepCopyInto(out *ModelDeploymentList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ModelDeploymentList) DeepCopyObject

func (in *ModelDeploymentList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ModelDeploymentSpec

type ModelDeploymentSpec struct {
	Model    ModelSpec   `json:"model,omitempty"`
	Server   ServerSpec  `json:"server,omitempty"`
	Ingress  IngressSpec `json:"ingress,omitempty"`
	Backend  string      `json:"backend,omitempty"`
	Replicas *int32      `json:"replicas,omitempty"`
}

ModelDeploymentSpec is the spec for a ModelDeployment

func (*ModelDeploymentSpec) DeepCopy

func (in *ModelDeploymentSpec) DeepCopy() *ModelDeploymentSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelDeploymentSpec.

func (*ModelDeploymentSpec) DeepCopyInto

func (in *ModelDeploymentSpec) DeepCopyInto(out *ModelDeploymentSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ModelDeploymentStatus

type ModelDeploymentStatus struct {
	URL     string `json:"url,omitempty"` // url of the model deployment serving endpoint
	Phase   Phase  `json:"phase,omitempty"`
	Message string `json:"message,omitempty"`
	// +kubebuilder:pruning:PreserveUnknownFields
	RawStatus *runtime.RawExtension `json:"rawStatus,omitempty"`
}

func (*ModelDeploymentStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelDeploymentStatus.

func (*ModelDeploymentStatus) DeepCopyInto

func (in *ModelDeploymentStatus) DeepCopyInto(out *ModelDeploymentStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ModelSpec

type ModelSpec struct {
	// +kubebuilder:validation:Required
	Source string `json:"source"`
	// +kubebuilder:validation:Required
	Name    string `json:"name"`
	Version string `json:"version"`
	// +kubebuilder:validation:Optional
	URL string `json:"url"`
	// +kubebuilder:validation:Optional
	Token string `json:"token"`
	// +kubebuilder:validation:Optional
	Task string `json:"task"`
}

func (*ModelSpec) DeepCopy

func (in *ModelSpec) DeepCopy() *ModelSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelSpec.

func (*ModelSpec) DeepCopyInto

func (in *ModelSpec) DeepCopyInto(out *ModelSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Parameter

type Parameter struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

func (*Parameter) DeepCopy

func (in *Parameter) DeepCopy() *Parameter

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Parameter.

func (*Parameter) DeepCopyInto

func (in *Parameter) DeepCopyInto(out *Parameter)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Phase

type Phase string
const (
	// PodPending means the pod has been accepted by the system, but one or more of the containers
	// has not been started. This includes time before being bound to a node, as well as time spent
	// pulling images onto the host.
	Pending Phase = "Pending"
	// PodRunning means the pod has been bound to a node and all of the containers have been started.
	// At least one container is still running or is in the process of being restarted.
	Running Phase = "Running"
	// PodFailed means that all containers in the pod have terminated, and at least one container has
	// terminated in a failure (exited with a non-zero exit code or was stopped by the system).
	Failed Phase = "Failed"
)

These are the valid statuses of pods.

type ServerSpec

type ServerSpec struct {
	// +kubebuilder:validation:Optional
	Protocol string `json:"protocol"`

	// +kubebuilder:validation:Optional
	Image string `json:"image"`

	// +kubebuilder:validation:Optional
	Kind string `json:"kind"`

	// +kubebuilder:validation:Optional
	StorageInitializerImage string `json:"storageInitializerImage"`

	// +kubebuilder:validation:Optional
	Mounts []SimpleVolumeMount `json:"mounts"`

	// +kubebuilder:validation:Optional
	Parameters []Parameter `json:"parameters,omitempty"`

	// +kubebuilder:validation:Optional
	Privileged bool `json:"privileged"`

	// +kubebuilder:validation:Optional
	Ports []corev1.ContainerPort `json:"ports"`

	// +kubebuilder:validation:Optional
	Command []string `json:"command,omitempty"`

	// +kubebuilder:validation:Optional
	Args []string `json:"args,omitempty"`

	// +kubebuilder:validation:Optional
	Env []corev1.EnvVar `json:"env,omitempty"`

	// +kubebuilder:validation:Optional
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`

	// +kubebuilder:validation:Optional
	UpgradeStrategy string `json:"upgradeStrategy,omitempty"`

	// +kubebuilder:validation:Optional
	PodSpec *corev1.PodSpec `json:"podSpec,omitempty"`
}

func (*ServerSpec) DeepCopy

func (in *ServerSpec) DeepCopy() *ServerSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerSpec.

func (*ServerSpec) DeepCopyInto

func (in *ServerSpec) DeepCopyInto(out *ServerSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SimpleVolumeMount

type SimpleVolumeMount struct {
	// +kubebuilder:validation:Enum=HostPath;EmptyDir;Secret;ConfigMap;PVC;Model
	Kind SimpleVolumeMountKind `json:"kind"`

	// +kubebuilder:validation:Optional
	Source string `json:"source"`

	// +kubebuilder:validation:Required
	MountPath string `json:"mountPath"`
}

func (*SimpleVolumeMount) DeepCopy

func (in *SimpleVolumeMount) DeepCopy() *SimpleVolumeMount

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SimpleVolumeMount.

func (*SimpleVolumeMount) DeepCopyInto

func (in *SimpleVolumeMount) DeepCopyInto(out *SimpleVolumeMount)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SimpleVolumeMountKind

type SimpleVolumeMountKind string
const (
	SimpleVolumeMountKindEmptyDir  SimpleVolumeMountKind = "EmptyDir"
	SimpleVolumeMountKindHostPath  SimpleVolumeMountKind = "HostPath"
	SimpleVolumeMountKindPVC       SimpleVolumeMountKind = "PVC"
	SimpleVolumeMountKindSecret    SimpleVolumeMountKind = "Secret"
	SimpleVolumeMountKindConfigMap SimpleVolumeMountKind = "ConfigMap"
	SimpleVolumeMountKindModel     SimpleVolumeMountKind = "Model"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL