Documentation
¶
Index ¶
- Constants
- func EnsureDeploymentCreated(ctx context.Context, c client.Client, namespace string, name string, ...) (*appsv1.Deployment, error)
- func EnsureImageStorePVCCreated(ctx context.Context, client client.Client, namespace string, ...) (*corev1.PersistentVolumeClaim, error)
- func EnsureImageStoreServiceCreated(ctx context.Context, client client.Client, namespace string, ...) (*corev1.Service, error)
- func EnsureImageStoreStatefulSetCreated(ctx context.Context, client client.Client, namespace string, ...) (*appsv1.StatefulSet, error)
- func EnsureServiceCreated(ctx context.Context, c client.Client, namespace string, name string, ...) (*corev1.Service, error)
- func GetImageStorePVByPVC(ctx context.Context, c client.Client, pvc *corev1.PersistentVolumeClaim) (*corev1.PersistentVolume, error)
- func IsAvailable(ctx context.Context, ollamaModelResource ollamav1.Model) bool
- func IsDeploymentReady(ctx context.Context, c client.Client, namespace string, name string, ...) (bool, error)
- func IsImageStoreServiceReady(ctx context.Context, client client.Client, namespace string, ...) (bool, error)
- func IsImageStoreStatefulSetReady(ctx context.Context, client client.Client, namespace string, ...) (bool, error)
- func IsProgressing(ctx context.Context, ollamaModelResource ollamav1.Model) bool
- func IsServiceReady(ctx context.Context, c client.Client, namespace string, name string, ...) (bool, error)
- func ModelAppName(name string) string
- func NewOllamaPullerContainer(image string, serverLocatedNamespace string) corev1.Container
- func NewOllamaServerContainer(readOnly bool) corev1.Container
- func SetAvailable(ctx context.Context, c client.Client, ollamaModelResource ollamav1.Model) (bool, error)
- func SetProgressing(ctx context.Context, c client.Client, ollamaModelResource ollamav1.Model) (bool, error)
- func SetReplicas(ctx context.Context, c client.Client, ollamaModelResource ollamav1.Model, ...) (bool, error)
- func ShouldSetReplicas(ctx context.Context, ollamaModelResource ollamav1.Model, replicas int32, ...) bool
- func UpdateDeployment(ctx context.Context, c client.Client, model *ollamav1.Model, ...) (bool, error)
- type WrappedRecorder
Constants ¶
View Source
const (
OllamaBaseImage = "ollama/ollama"
)
Variables ¶
This section is empty.
Functions ¶
func EnsureDeploymentCreated ¶
func EnsureImageStorePVCCreated ¶
func EnsureImageStorePVCCreated( ctx context.Context, client client.Client, namespace string, storageClassName *string, pvcSource *corev1.PersistentVolumeClaimVolumeSource, pvSpec *ollamav1.ModelPersistentVolumeSpec, modelRecorder *WrappedRecorder[*ollamav1.Model], ) (*corev1.PersistentVolumeClaim, error)
func EnsureServiceCreated ¶
func GetImageStorePVByPVC ¶
func GetImageStorePVByPVC(ctx context.Context, c client.Client, pvc *corev1.PersistentVolumeClaim) (*corev1.PersistentVolume, error)
func IsAvailable ¶ added in v0.2.0
func IsDeploymentReady ¶
func IsProgressing ¶ added in v0.2.0
func IsServiceReady ¶
func ModelAppName ¶
func SetAvailable ¶ added in v0.2.0
func SetProgressing ¶ added in v0.2.0
func SetReplicas ¶ added in v0.2.0
func ShouldSetReplicas ¶ added in v0.2.0
Types ¶
type WrappedRecorder ¶
func NewWrappedRecorder ¶
func NewWrappedRecorder[T runtime.Object](recorder record.EventRecorder, object T) *WrappedRecorder[T]
func (*WrappedRecorder[T]) AnnotatedEventf ¶
func (r *WrappedRecorder[T]) AnnotatedEventf(annotations map[string]string, eventType, reason, messageFmt string, args ...any)
AnnotatedEventf is just like eventf, but with annotations attached
func (*WrappedRecorder[T]) Event ¶
func (r *WrappedRecorder[T]) Event(eventType, reason, message string)
func (*WrappedRecorder[T]) Eventf ¶
func (r *WrappedRecorder[T]) Eventf(eventType, reason, messageFmt string, args ...any)
Eventf is just like Event, but with Sprintf for the message field.
Click to show internal directories.
Click to hide internal directories.