storage

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2021 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

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

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

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)
}

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