localmodel

package
v0.14.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2024 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=clusterlocalmodels,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=serving.kserve.io,resources=clusterlocalmodels/status,verbs=get;update;patch +kubebuilder:rbac:groups=serving.kserve.io,resources=clusterstoragecontainers,verbs=get;list;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=batch,resources=jobs,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=batch,resources=jobs/status,verbs=get +kubebuilder:rbac:groups=core,resources=persistentvolumes,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=core,resources=persistentvolumeclaims,verbs=get;list;watch;create;update;patch;delete

Index

Constants

This section is empty.

Variables

View Source
var (
	FSGroup *int64 // Could be overwritten by the value in the configmap
)

Functions

This section is empty.

Types

type LocalModelReconciler

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

func (*LocalModelReconciler) DownloadModel

func (c *LocalModelReconciler) DownloadModel(ctx context.Context, localModel *v1alpha1api.ClusterLocalModel, nodeGroup *v1alpha1api.LocalModelNodeGroup, pvc v1.PersistentVolumeClaim, jobNamespace string) error

func (*LocalModelReconciler) Reconcile

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

Step 1 - Checks if the CR is in the deletion process, if so, it creates deletion jobs to delete models on all nodes. Step 2 - Creates PV & PVC for model download Step 3 - Creates Jobs on all nodes to download models Step 4 - Creates PV & PVCs for namespaces with isvcs using this cached model

func (*LocalModelReconciler) ReconcileForIsvcs

func (c *LocalModelReconciler) ReconcileForIsvcs(ctx context.Context, localModel *v1alpha1api.ClusterLocalModel, nodeGroup *v1alpha1api.LocalModelNodeGroup, jobNamespace string) error

Get all isvcs with model cache enabled, create pvs and pvcs, remove pvs and pvcs in namespaces without isvcs.

func (*LocalModelReconciler) SetupWithManager

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

Jump to

Keyboard shortcuts

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