Documentation ¶
Index ¶
- Constants
- func Build(id string, ctx cruntime.ReconcileRequestContext) (base.Engine, error)
- func GetReservedPorts(client client.Client) (ports []int, err error)
- func Precheck(client client.Client, key types.NamespacedName) (found bool, err error)
- type EFC
- type EFCEngine
- func (e *EFCEngine) BindToDataset() (err error)
- func (e *EFCEngine) CheckAndUpdateRuntimeStatus() (ready bool, err error)
- func (e *EFCEngine) CheckMasterReady() (ready bool, err error)
- func (e *EFCEngine) CheckRuntimeHealthy() (err error)
- func (e *EFCEngine) CheckRuntimeReady() (ready bool)
- func (e *EFCEngine) CheckWorkersReady() (ready bool, err error)
- func (e *EFCEngine) CreateVolume() (err error)
- func (e *EFCEngine) DeleteVolume() (err error)
- func (e *EFCEngine) FreeStorageBytes() (int64, error)
- func (e *EFCEngine) GetDataOperationValueFile(ctx cruntime.ReconcileRequestContext, ...) (valueFileName string, err error)
- func (e *EFCEngine) PrepareUFS() (err error)
- func (e *EFCEngine) SetupMaster() (err error)
- func (e *EFCEngine) SetupWorkers() (err error)
- func (e *EFCEngine) ShouldCheckUFS() (should bool, err error)
- func (e *EFCEngine) ShouldSetupMaster() (should bool, err error)
- func (e *EFCEngine) ShouldSetupWorkers() (should bool, err error)
- func (e *EFCEngine) ShouldUpdateUFS() (ufsToUpdate *utils.UFSToUpdate)
- func (e *EFCEngine) Shutdown() (err error)
- func (e *EFCEngine) SyncMetadata() (err error)
- func (e *EFCEngine) SyncReplicas(ctx cruntime.ReconcileRequestContext) (err error)
- func (e *EFCEngine) SyncRuntime(ctx cruntime.ReconcileRequestContext) (changed bool, err error)
- func (e *EFCEngine) SyncScheduleInfoToCacheNodes() (err error)
- func (e *EFCEngine) TotalFileNums() (int64, error)
- func (e *EFCEngine) TotalStorageBytes() (int64, error)
- func (e *EFCEngine) UpdateCacheOfDataset() (err error)
- func (e *EFCEngine) UpdateDatasetStatus(phase datav1alpha1.DatasetPhase) (err error)
- func (e *EFCEngine) UpdateOnUFSChange(ufsToUpdate *utils.UFSToUpdate) (ready bool, err error)
- func (e *EFCEngine) UsedStorageBytes() (int64, error)
- func (e *EFCEngine) Validate(ctx cruntime.ReconcileRequestContext) (err error)
- type Fuse
- type InitFuse
- type Level
- type Master
- type MountInfo
- type OSAdvise
- type Port
- type SessMgrInitializer
- type TieredStore
- type Worker
- type WorkerEndPoints
Constants ¶
const ( MasterMountPath = "/efc/efc-master" FuseMountDir = "efc-fuse" AccessKeyIDName = "efc.nas.accessKeyId" AccessKeySecretName = "efc.nas.accessKeySecret" WorkerEndpointsDataName = "efc-worker-endpoints.json" NasMountPointPrefix = "nfs://" CpfsMountPointPrefix = "cpfs://" )
Variables ¶
This section is empty.
Functions ¶
func GetReservedPorts ¶
GetReservedPorts defines restoration logic for EFCRuntime
Types ¶
type EFC ¶
type EFC struct { FullnameOverride string `yaml:"fullnameOverride"` PlacementMode string `yaml:"placement,omitempty"` Master Master `yaml:"master"` Worker Worker `yaml:"worker"` Fuse Fuse `yaml:"fuse"` InitFuse InitFuse `yaml:"initFuse"` OSAdvise OSAdvise `yaml:"osAdvise"` Tolerations []v1.Toleration `yaml:"tolerations,omitempty"` Owner *common.OwnerReference `yaml:"owner,omitempty"` RuntimeIdentity common.RuntimeIdentity `yaml:"runtimeIdentity,omitempty"` }
The value yaml file
type EFCEngine ¶
type EFCEngine struct { UnitTest bool Log logr.Logger *ctrl.Helper client.Client // contains filtered or unexported fields }
func (*EFCEngine) BindToDataset ¶
func (*EFCEngine) CheckAndUpdateRuntimeStatus ¶
CheckAndUpdateRuntimeStatus checks the related runtime status and updates it.
func (*EFCEngine) CheckMasterReady ¶
func (*EFCEngine) CheckRuntimeHealthy ¶
CheckRuntimeHealthy checks the healthy of the runtime
func (*EFCEngine) CheckRuntimeReady ¶
CheckRuntimeReady checks if runtime is ready or not
func (*EFCEngine) CheckWorkersReady ¶
are the workers ready
func (*EFCEngine) CreateVolume ¶
func (*EFCEngine) DeleteVolume ¶
func (*EFCEngine) FreeStorageBytes ¶
func (*EFCEngine) GetDataOperationValueFile ¶
func (e *EFCEngine) GetDataOperationValueFile(ctx cruntime.ReconcileRequestContext, operation dataoperation.OperationInterface) (valueFileName string, err error)
func (*EFCEngine) PrepareUFS ¶
func (*EFCEngine) SetupMaster ¶
SetupMaster setups the master and updates the status It will print the information in the Debug window according to the Master status It return any cache error encountered
func (*EFCEngine) SetupWorkers ¶
SetupWorkers checks the desired and current replicas of workers and makes an update over the status by setting phases and conditions. The function calls for a status update and finally returns error if anything unexpected happens.
func (*EFCEngine) ShouldCheckUFS ¶
func (*EFCEngine) ShouldSetupMaster ¶
func (*EFCEngine) ShouldSetupWorkers ¶
ShouldSetupWorkers checks if we need setup the workers
func (*EFCEngine) ShouldUpdateUFS ¶
func (e *EFCEngine) ShouldUpdateUFS() (ufsToUpdate *utils.UFSToUpdate)
ShouldUpdateUFS EFCEngine hasn't support UpdateOnUFSChange
func (*EFCEngine) SyncMetadata ¶
func (*EFCEngine) SyncReplicas ¶
func (e *EFCEngine) SyncReplicas(ctx cruntime.ReconcileRequestContext) (err error)
SyncReplicas syncs the replicas
func (*EFCEngine) SyncRuntime ¶
func (e *EFCEngine) SyncRuntime(ctx cruntime.ReconcileRequestContext) (changed bool, err error)
SyncRuntime syncs the runtime spec
func (*EFCEngine) SyncScheduleInfoToCacheNodes ¶
SyncScheduleInfoToCacheNodes syncs schedule info to nodes
func (*EFCEngine) TotalFileNums ¶
func (*EFCEngine) TotalStorageBytes ¶
func (*EFCEngine) UpdateCacheOfDataset ¶
UpdateCacheOfDataset updates the CacheStates and Runtimes of the dataset.
func (*EFCEngine) UpdateDatasetStatus ¶
func (e *EFCEngine) UpdateDatasetStatus(phase datav1alpha1.DatasetPhase) (err error)
UpdateDatasetStatus updates the status of the dataset
func (*EFCEngine) UpdateOnUFSChange ¶
func (e *EFCEngine) UpdateOnUFSChange(ufsToUpdate *utils.UFSToUpdate) (ready bool, err error)
func (*EFCEngine) UsedStorageBytes ¶
type Fuse ¶
type Fuse struct { common.ImageInfo `yaml:",inline"` MountPoint string `yaml:"mountPoint,omitempty"` HostMountPath string `yaml:"hostMountPath,omitempty"` Port Port `yaml:"port,omitempty"` Options string `yaml:"option,omitempty"` Resources common.Resources `yaml:"resources,omitempty"` NodeSelector map[string]string `yaml:"nodeSelector,omitempty"` HostNetwork bool `yaml:"hostNetwork"` TieredStore TieredStore `yaml:"tieredstore,omitempty"` CriticalPod bool `yaml:"criticalPod"` Labels map[string]string `yaml:"labels,omitempty"` Annotations map[string]string `yaml:"annotations,omitempty"` }
type Level ¶
type Level struct { Alias string `yaml:"alias,omitempty"` Level int `yaml:"level"` MediumType string `yaml:"mediumtype,omitempty"` Type string `yaml:"type,omitempty"` Path string `yaml:"path,omitempty"` Quota string `yaml:"quota,omitempty"` High string `yaml:"high,omitempty"` Low string `yaml:"low,omitempty"` }
type Master ¶
type Master struct { common.ImageInfo `yaml:",inline"` MountPoint string `yaml:"mountPoint,omitempty"` Replicas int32 `yaml:"count,omitempty"` Enabled bool `yaml:"enabled"` Options string `yaml:"option,omitempty"` Resources common.Resources `yaml:"resources,omitempty"` NodeSelector map[string]string `yaml:"nodeSelector,omitempty"` HostNetwork bool `yaml:"hostNetwork"` TieredStore TieredStore `yaml:"tieredstore,omitempty"` Labels map[string]string `yaml:"labels,omitempty"` Annotations map[string]string `yaml:"annotations,omitempty"` }
type SessMgrInitializer ¶
type SessMgrInitializer struct {
// contains filtered or unexported fields
}
func NewSessMgrInitializer ¶
func NewSessMgrInitializer(client client.Client) *SessMgrInitializer
func (*SessMgrInitializer) NeedLeaderElection ¶
func (s *SessMgrInitializer) NeedLeaderElection() bool
type TieredStore ¶
type TieredStore struct {
Levels []Level `yaml:"levels,omitempty"`
}
type Worker ¶
type Worker struct { common.ImageInfo `yaml:",inline"` Port Port `yaml:"port,omitempty"` Enabled bool `yaml:"enabled"` Options string `yaml:"option,omitempty"` Resources common.Resources `yaml:"resources,omitempty"` NodeSelector map[string]string `yaml:"nodeSelector,omitempty"` HostNetwork bool `yaml:"hostNetwork"` TieredStore TieredStore `yaml:"tieredstore,omitempty"` Labels map[string]string `yaml:"labels,omitempty"` Annotations map[string]string `yaml:"annotations,omitempty"` }
type WorkerEndPoints ¶
type WorkerEndPoints struct {
ContainerEndPoints []string `json:"containerendpoints,omitempty"`
}
Source Files ¶
- cache.go
- const.go
- create_volume.go
- data_load.go
- data_process.go
- dataset.go
- delete_volume.go
- dir_quota.go
- engine.go
- health_check.go
- label.go
- master.go
- master_internal.go
- metadata.go
- node.go
- operate.go
- port_parser.go
- replicas.go
- runtime_info.go
- sessmgr.go
- shutdown.go
- status.go
- sync_runtime.go
- transform.go
- transform_image.go
- transform_option.go
- transform_port.go
- transform_resources.go
- transform_tieredstore.go
- types.go
- ufs.go
- utils.go
- validate.go
- worker.go