v1alpha1

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: 5 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the cache v1alpha1 API group +kubebuilder:object:generate=true +groupName=cache.kubedl.io

Index

Constants

View Source
const (
	KUBEDL_CACHE_NAME = "KUBEDL_CACHE_NAME"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "cache.kubedl.io", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

func RegisterDefaults

func RegisterDefaults(scheme *runtime.Scheme) error

RegisterDefaults adds defaulters functions to the given scheme. Public to allow building arbitrary schemes. All generated defaulters are covering - they call all nested defaulters.

func SetDefaults_CacheBackend

func SetDefaults_CacheBackend(cacheBackend *CacheBackend)

Types

type AlluxioRuntime

type AlluxioRuntime struct {
	// Replicas is the min replicas of dataset in the cluster
	Replicas int32 `json:"replicas,omitempty"`

	// Fluid supports multi-tier configuration
	TieredStorage []Level `json:"tieredStorage,omitempty"`
}

func (*AlluxioRuntime) DeepCopy

func (in *AlluxioRuntime) DeepCopy() *AlluxioRuntime

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlluxioRuntime.

func (*AlluxioRuntime) DeepCopyInto

func (in *AlluxioRuntime) DeepCopyInto(out *AlluxioRuntime)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CacheBackend

type CacheBackend struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   CacheBackendSpec   `json:"spec,omitempty"`
	Status CacheBackendStatus `json:"status,omitempty"`
}

CacheBackend is the Schema for the cache backends API

func (*CacheBackend) DeepCopy

func (in *CacheBackend) DeepCopy() *CacheBackend

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CacheBackend.

func (*CacheBackend) DeepCopyInto

func (in *CacheBackend) DeepCopyInto(out *CacheBackend)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CacheBackend) DeepCopyObject

func (in *CacheBackend) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type CacheBackendList

type CacheBackendList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []CacheBackend `json:"items"`
}

CacheBackendList contains a list of CacheBackend

func (*CacheBackendList) DeepCopy

func (in *CacheBackendList) DeepCopy() *CacheBackendList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CacheBackendList.

func (*CacheBackendList) DeepCopyInto

func (in *CacheBackendList) DeepCopyInto(out *CacheBackendList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CacheBackendList) DeepCopyObject

func (in *CacheBackendList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type CacheBackendSpec

type CacheBackendSpec struct {
	// CacheBackendName is equal to ObjectMeta.Name for now
	CacheBackendName string `json:"name,omitempty"`

	// The location in the container where the dataset should be mounted
	MountPath string `json:"mountPath,omitempty"`

	// Dataset describes the parameters related to the dataset file
	Dataset *Dataset `json:"dataset,omitempty"`

	// CacheEngine is different kinds of cache engine
	CacheEngine *CacheEngine `json:"cacheEngine,omitempty"`

	// Options is used to set additional configuration
	Options Options `json:"options,omitempty"`
}

CacheBackendSpec defines the desired state of CacheBackend

func (*CacheBackendSpec) DeepCopy

func (in *CacheBackendSpec) DeepCopy() *CacheBackendSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CacheBackendSpec.

func (*CacheBackendSpec) DeepCopyInto

func (in *CacheBackendSpec) DeepCopyInto(out *CacheBackendSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CacheBackendStatus

type CacheBackendStatus struct {
	// CacheEngine is the current cache engine used by CacheBackend
	CacheEngine string `json:"cacheEngine,omitempty"`

	// CacheStatus is used to help understand the status of a caching process
	CacheStatus CacheStatus `json:"cacheStatus,omitempty"`

	// UsedBy array contains the jobs currently using this cacheBackends
	UsedBy []string `json:"usedBy,omitempty"`

	// UsedNum equals to the size of UsedBy array
	UsedNum int `json:"usedNum,omitempty"`

	// LastUsedTime is equal to the completion time of the last job that used CacheBackend
	LastUsedTime *metav1.Time `json:"lastUsedTime,omitempty"`
}

CacheBackendStatus defines the observed state of CacheBackend

func (*CacheBackendStatus) DeepCopy

func (in *CacheBackendStatus) DeepCopy() *CacheBackendStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CacheBackendStatus.

func (*CacheBackendStatus) DeepCopyInto

func (in *CacheBackendStatus) DeepCopyInto(out *CacheBackendStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CacheEngine

type CacheEngine struct {
	// Fluid may be the only caching engine for the time being
	Fluid *Fluid `json:"fluid,omitempty"`
}

func (*CacheEngine) DeepCopy

func (in *CacheEngine) DeepCopy() *CacheEngine

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CacheEngine.

func (*CacheEngine) DeepCopyInto

func (in *CacheEngine) DeepCopyInto(out *CacheEngine)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CacheStatus

type CacheStatus string
const (
	PVCCreated    CacheStatus = "PVCCreated"
	PVCCreating   CacheStatus = "PVCCreating"
	CacheFailed   CacheStatus = "CacheFailed"
	CacheCreating CacheStatus = "CacheCreating"
)

The four CacheStatus vary as follows: CacheCreating -> PVCCreating ( CacheSucceed ) -> PVCCreated

or -> CacheFailed

type DataSource

type DataSource struct {
	// Location is the dataset path in variety file system
	Location string `json:"location,omitempty"`

	// SubdirectoryName is used as the file name of the data source in mountPath.
	// The directory structure in container is as follows:
	// - MountPath
	//   - SubDirName1
	//   - SubDirName2
	//   - ...
	SubDirName string `json:"subDirName,omitempty"`
}

func (*DataSource) DeepCopy

func (in *DataSource) DeepCopy() *DataSource

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DataSource.

func (*DataSource) DeepCopyInto

func (in *DataSource) DeepCopyInto(out *DataSource)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Dataset

type Dataset struct {
	// DataSources is a list of dataset path
	DataSources []DataSource `json:"dataSources,omitempty"`
}

Dataset is used to define where specific data sources are stored and mounted A job may have multiple mount points, so it is a list

func (*Dataset) DeepCopy

func (in *Dataset) DeepCopy() *Dataset

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Dataset.

func (*Dataset) DeepCopyInto

func (in *Dataset) DeepCopyInto(out *Dataset)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Fluid

type Fluid struct {
	// AlluxioRuntime is used to configure the cache runtime
	// If this parameter is not specified, the cache will not take effect and the data set will be directly mounted
	AlluxioRuntime *AlluxioRuntime `json:"alluxioRuntime,omitempty"`
}

func (*Fluid) DeepCopy

func (in *Fluid) DeepCopy() *Fluid

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Fluid.

func (*Fluid) DeepCopyInto

func (in *Fluid) DeepCopyInto(out *Fluid)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Level

type Level struct {
	// For Alluxio, it will use the cache path directory as its cache store
	CachePath string `json:"cachePath,omitempty"`

	// Quota defines a cache capacity of the directory
	Quota string `json:"quota,omitempty"`

	// Fluid sorts levels according to mediumType
	MediumType string `json:"mediumType,omitempty"`
}

func (*Level) DeepCopy

func (in *Level) DeepCopy() *Level

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Level.

func (*Level) DeepCopyInto

func (in *Level) DeepCopyInto(out *Level)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Options added in v0.5.0

type Options struct {
	// IdleTime means how long cacheBackend is not currently in use
	IdleTime time.Duration `json:"idleTime,omitempty"`
}

func (*Options) DeepCopy added in v0.5.0

func (in *Options) DeepCopy() *Options

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Options.

func (*Options) DeepCopyInto added in v0.5.0

func (in *Options) DeepCopyInto(out *Options)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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