Documentation ¶
Overview ¶
Package v1 contains API Schema definitions for the ollama v1 API group +kubebuilder:object:generate=true +groupName=ollama.ayaka.io
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "ollama.ayaka.io", Version: "v1"} // 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 ConditionType ¶
type ConditionType string
const ( ModelUnknown ConditionType = "Unknown" // Available means the deployment is available, ie. at least the minimum available // replicas required are up and running for at least minReadySeconds. ModelAvailable ConditionType = "Available" // Progressing means the deployment is progressing. Progress for a deployment is // considered when a new replica set is created or adopted, and when new pods scale // up or old pods scale down. Progress is not estimated for paused deployments or // when progressDeadlineSeconds is not specified. ModelProgressing ConditionType = "Progressing" // ReplicaFailure is added in a deployment when one of its pods fails to be created // or deleted. ModelReplicaFailure ConditionType = "ReplicaFailure" )
These are valid condition statuses. "ConditionTrue" means a resource is in the condition. "ConditionFalse" means a resource is not in the condition. "ConditionUnknown" means kubernetes can't decide if a resource is in the condition or not. In the future, we could add other intermediate conditions, e.g. ConditionDegraded.
type Model ¶
type Model struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ModelSpec `json:"spec,omitempty"` Status ModelStatus `json:"status,omitempty"` }
Model is the Schema for the models API +genclient +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:printcolumn:name="Model",type=string,JSONPath=`.spec.image` +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.conditions[0].type`
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.
func (*Model) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ModelList ¶
type ModelList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Model `json:"items"` }
ModelList contains a list of Model
func (*ModelList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelList.
func (*ModelList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ModelList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ModelPersistentVolumeSpec ¶
type ModelPersistentVolumeSpec struct { // accessModes contains all ways the volume can be mounted. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes // +optional AccessMode *corev1.PersistentVolumeAccessMode `json:"accessMode,omitempty" protobuf:"bytes,1,opt,name=accessMode,casttype=PersistentVolumeAccessMode"` }
func (*ModelPersistentVolumeSpec) DeepCopy ¶
func (in *ModelPersistentVolumeSpec) DeepCopy() *ModelPersistentVolumeSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelPersistentVolumeSpec.
func (*ModelPersistentVolumeSpec) DeepCopyInto ¶
func (in *ModelPersistentVolumeSpec) DeepCopyInto(out *ModelPersistentVolumeSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ModelSpec ¶
type ModelSpec struct { // Number of desired pods. This is a pointer to distinguish between explicit // zero and not specified. Defaults to 1. // +optional Replicas *int32 `json:"replicas,omitempty" protobuf:"varint,1,opt,name=replicas"` // Container image name. // More info: https://kubernetes.io/docs/concepts/containers/images // This field is optional to allow higher level config management to default or override // container images in workload controllers like Deployments and StatefulSets. Image string `json:"image" protobuf:"bytes,2,name=image"` // Image pull policy. // One of Always, Never, IfNotPresent. // Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. // Cannot be updated. // More info: https://kubernetes.io/docs/concepts/containers/images#updating-images // +optional ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty" protobuf:"bytes,3,opt,name=imagePullPolicy,casttype=PullPolicy"` // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. // If specified, these secrets will be passed to individual puller implementations for them to use. // More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod // +optional // +patchMergeKey=name // +patchStrategy=merge ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,4,rep,name=imagePullSecrets"` // Compute Resources required by this container. // Cannot be updated. // More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ // +optional Resources corev1.ResourceRequirements `json:"resources,omitempty" protobuf:"bytes,5,opt,name=resources"` // storageClassName is the name of StorageClass to which this persistent volume belongs. Empty value // means that this volume does not belong to any StorageClass. // +optional StorageClassName *string `json:"storageClassName,omitempty" protobuf:"bytes,6,opt,name=storageClassName"` // persistentVolumeClaimVolumeSource represents a reference to a // PersistentVolumeClaim in the same namespace. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims // +optional PersistentVolumeClaim *corev1.PersistentVolumeClaimVolumeSource `json:"persistentVolumeClaim,omitempty" protobuf:"bytes,7,opt,name=persistentVolumeClaim"` // spec defines a specification of a persistent volume owned by the cluster. // Provisioned by an administrator. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes // +optional PersistentVolume *ModelPersistentVolumeSpec `json:"persistentVolume,omitempty" protobuf:"bytes,8,opt,name=persistentVolume"` // RuntimeClassName refers to a RuntimeClass object in the node.k8s.io group, which should be used // to run this pod. If no RuntimeClass resource matches the named class, the pod will not be run. // If unset or empty, the "legacy" RuntimeClass will be used, which is an implicit class with an // empty definition that uses the default runtime handler. // More info: https://git.k8s.io/enhancements/keps/sig-node/585-runtime-class // +optional RuntimeClassName *string `json:"runtimeClassName,omitempty" protobuf:"bytes,9,opt,name=runtimeClassName"` // List of sources to populate environment variables in the container. // The keys defined within a source must be a C_IDENTIFIER. All invalid keys // will be reported as an event when the container is starting. When a key exists in multiple // sources, the value associated with the last source will take precedence. // Values defined by an Env with a duplicate key will take precedence. // Cannot be updated. // +optional ExtraEnvFrom []corev1.EnvFromSource `json:"extraEnvFrom,omitempty" protobuf:"bytes,10,rep,name=extraEnvFrom"` // List of environment variables to set in the container. // Cannot be updated. // +optional // +patchMergeKey=name // +patchStrategy=merge Env []corev1.EnvVar `json:"extraEnv,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,11,rep,name=extraEnv"` // PodTemplateSpec describes the data a pod should have when created from a template // +optional PodTemplate *corev1.PodTemplateSpec `json:"podTemplate" protobuf:"bytes,12,opt,name=podTemplate"` }
ModelSpec defines the desired state of Model
func (*ModelSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelSpec.
func (*ModelSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ModelStatus ¶
type ModelStatus struct { // Total number of non-terminated pods targeted by this deployment (their labels match the selector). // +optional Replicas int32 `json:"replicas,omitempty" protobuf:"varint,2,opt,name=replicas"` // readyReplicas is the number of pods targeted by this Deployment with a Ready Condition. // +optional ReadyReplicas int32 `json:"readyReplicas,omitempty" protobuf:"varint,7,opt,name=readyReplicas"` // Total number of available pods (ready for at least minReadySeconds) targeted by this deployment. // +optional AvailableReplicas int32 `json:"availableReplicas,omitempty" protobuf:"varint,4,opt,name=availableReplicas"` // pods that are still required for the deployment to have 100% available capacity. They may // either be pods that are running but not yet available or pods that still have not been created. // +optional UnavailableReplicas int32 `json:"unavailableReplicas,omitempty" protobuf:"varint,5,opt,name=unavailableReplicas"` // +kubebuilder:validation:Optional Conditions []ModelStatusCondition `json:"conditions,omitempty"` }
ModelStatus defines the observed state of Model
func (*ModelStatus) DeepCopy ¶
func (in *ModelStatus) DeepCopy() *ModelStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelStatus.
func (*ModelStatus) DeepCopyInto ¶
func (in *ModelStatus) DeepCopyInto(out *ModelStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ModelStatusCondition ¶
type ModelStatusCondition struct { // Type of deployment condition. Type ConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=ConditionType"` // Status of the condition, one of True, False, Unknown. Status corev1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/api/core/v1.ConditionStatus"` // The last time this condition was updated. LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty" protobuf:"bytes,6,opt,name=lastUpdateTime"` // Last time the condition transitioned from one status to another. LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,7,opt,name=lastTransitionTime"` // The reason for the condition's last transition. Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"` // A human readable message indicating details about the transition. Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"` }
func (*ModelStatusCondition) DeepCopy ¶
func (in *ModelStatusCondition) DeepCopy() *ModelStatusCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelStatusCondition.
func (*ModelStatusCondition) DeepCopyInto ¶
func (in *ModelStatusCondition) DeepCopyInto(out *ModelStatusCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.