storage

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var StorageProviders = make(map[string]StorageProvider)

Functions

This section is empty.

Types

type AWSEfsProvider

type AWSEfsProvider struct {
}

func (*AWSEfsProvider) AddModelVolumeToPodSpec

func (a *AWSEfsProvider) AddModelVolumeToPodSpec(mv *modelv1alpha1.Storage, pod *corev1.PodTemplateSpec)

func (*AWSEfsProvider) CreatePersistentVolume

func (a *AWSEfsProvider) CreatePersistentVolume(storage *modelv1alpha1.Storage, pvName string) *corev1.PersistentVolume

func (*AWSEfsProvider) GetModelMountPath added in v0.4.1

func (a *AWSEfsProvider) GetModelMountPath(mv *modelv1alpha1.Storage) string

type LocalStorageProvider

type LocalStorageProvider struct {
}

func (*LocalStorageProvider) AddModelVolumeToPodSpec

func (a *LocalStorageProvider) AddModelVolumeToPodSpec(mv *modelv1alpha1.Storage, pod *corev1.PodTemplateSpec)

add the hostpath volume and mountPath in each container

func (*LocalStorageProvider) CreatePersistentVolume

func (ls *LocalStorageProvider) CreatePersistentVolume(storage *modelv1alpha1.Storage, pvName string) *corev1.PersistentVolume

func (*LocalStorageProvider) GetModelMountPath added in v0.4.1

func (a *LocalStorageProvider) GetModelMountPath(mv *modelv1alpha1.Storage) string

type NFSProvider

type NFSProvider struct {
}

func (*NFSProvider) AddModelVolumeToPodSpec

func (a *NFSProvider) AddModelVolumeToPodSpec(mv *modelv1alpha1.Storage, pod *corev1.PodTemplateSpec)

func (*NFSProvider) CreatePersistentVolume

func (a *NFSProvider) CreatePersistentVolume(storage *modelv1alpha1.Storage, pvName string) *corev1.PersistentVolume

func (*NFSProvider) GetModelMountPath added in v0.4.1

func (a *NFSProvider) GetModelMountPath(mv *modelv1alpha1.Storage) string

type StorageProvider

type StorageProvider interface {
	// CreatePersistentVolume creates the PV for the model
	CreatePersistentVolume(mv *modelv1alpha1.Storage, pvName string) *v1.PersistentVolume

	// Add the model volume and mountpath to the pod spec
	AddModelVolumeToPodSpec(mv *modelv1alpha1.Storage, pod *v1.PodTemplateSpec)

	// Get the model mount path inside the container
	GetModelMountPath(mv *modelv1alpha1.Storage) string
}

func GetStorageProvider

func GetStorageProvider(storage *modelv1alpha1.Storage) StorageProvider

func NewAWSEfsProvider

func NewAWSEfsProvider() StorageProvider

func NewLocalStorageProvider

func NewLocalStorageProvider() StorageProvider

func NewNFSProvider

func NewNFSProvider() StorageProvider

Jump to

Keyboard shortcuts

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