localmodel

package
v0.15.2 Latest Latest
Warning

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

Go to latest
Published: May 27, 2025 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Overview

+kubebuilder:rbac:groups=serving.kserve.io,resources=inferenceservices,verbs=get;list;watch +kubebuilder:rbac:groups=serving.kserve.io,resources=localmodelnodegroups,verbs=get;list;watch +kubebuilder:rbac:groups=serving.kserve.io,resources=localmodelcaches,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=serving.kserve.io,resources=localmodelcaches/status,verbs=get;update;patch +kubebuilder:rbac:groups=serving.kserve.io,resources=localmodelnodes,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=serving.kserve.io,resources=localmodelnodes/status,verbs=get;watch +kubebuilder:rbac:groups=core,resources=configmaps,verbs=get +kubebuilder:rbac:groups=core,resources=nodes,verbs=get;list;watch +kubebuilder:rbac:groups=core,resources=nodes/status,verbs=get;watch +kubebuilder:rbac:groups=core,resources=persistentvolumes,verbs=get;list;watch;create;update;patch +kubebuilder:rbac:groups=core,resources=persistentvolumeclaims,verbs=get;list;watch;create;update;patch

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LocalModelReconciler

type LocalModelReconciler struct {
	client.Client
	Clientset *kubernetes.Clientset
	Log       logr.Logger
	Scheme    *runtime.Scheme
}

func (*LocalModelReconciler) DeleteModelFromNode added in v0.14.1

func (c *LocalModelReconciler) DeleteModelFromNode(ctx context.Context, localmodelNode *v1alpha1.LocalModelNode, localModel *v1alpha1.LocalModelCache) error

DeleteModelFromNode deletes the source model from the localmodelnode

func (*LocalModelReconciler) Reconcile

func (c *LocalModelReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile Step 1 - Checks if the CR is in the deletion process. Deletion completes when all LocalModelNodes have been updated Step 2 - Adds this model to LocalModelNode resources in the node group Step 3 - Creates PV & PVC for model download Step 4 - Creates PV & PVCs for namespaces with isvcs using this cached model

func (*LocalModelReconciler) ReconcileForIsvcs

func (c *LocalModelReconciler) ReconcileForIsvcs(ctx context.Context, localModel *v1alpha1.LocalModelCache,
	localModelNodeGroups map[string]*v1alpha1.LocalModelNodeGroup, defaultNodeGroup *v1alpha1.LocalModelNodeGroup, jobNamespace string,
) error

ReconcileForIsvcs Get all isvcs with model cache enabled, create pvs and pvcs.

func (*LocalModelReconciler) ReconcileLocalModelNode added in v0.14.1

func (c *LocalModelReconciler) ReconcileLocalModelNode(ctx context.Context, localModel *v1alpha1.LocalModelCache, nodeGroups map[string]*v1alpha1.LocalModelNodeGroup) error

ReconcileLocalModelNode creates updates localmodelnode for each node in the node group. It adds and removes localmodels from the localmodelnode and updates the status on the localmodel from the localmodelnode.

func (*LocalModelReconciler) SetupWithManager

func (c *LocalModelReconciler) SetupWithManager(mgr ctrl.Manager) error

func (*LocalModelReconciler) UpdateLocalModelNode added in v0.14.1

func (c *LocalModelReconciler) UpdateLocalModelNode(ctx context.Context, localmodelNode *v1alpha1.LocalModelNode, localModel *v1alpha1.LocalModelCache) error

UpdateLocalModelNode updates the source model uri of the localmodelnode from the localmodel

Jump to

Keyboard shortcuts

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