Documentation
¶
Index ¶
- Constants
- func Build(id string, ctx cruntime.ReconcileRequestContext) (base.Engine, error)
- func CheckReferenceDatasetRuntime(ctx cruntime.ReconcileRequestContext, runtime *datav1alpha1.ThinRuntime) (bool, error)
- func Precheck(client client.Client, key types.NamespacedName) (found bool, err error)
- type Config
- type Fuse
- type ThinEngine
- func (t *ThinEngine) BindToDataset() (err error)
- func (t *ThinEngine) CheckAndUpdateRuntimeStatus() (bool, error)
- func (t ThinEngine) CheckMasterReady() (bool, error)
- func (t ThinEngine) CheckRuntimeHealthy() (err error)
- func (t *ThinEngine) CheckRuntimeReady() (ready bool)
- func (t ThinEngine) CheckWorkersReady() (ready bool, err error)
- func (t ThinEngine) CreateVolume() (err error)
- func (t ThinEngine) DeleteVolume() (err error)
- func (t *ThinEngine) FreeStorageBytes() (int64, error)
- func (t *ThinEngine) GetDataOperationValueFile(ctx cruntime.ReconcileRequestContext, ...) (valueFileName string, err error)
- func (t *ThinEngine) GetRunningPodsOfDaemonset(dsName string, namespace string) (pods []corev1.Pod, err error)
- func (t ThinEngine) PrepareUFS() (err error)
- func (t ThinEngine) SetupMaster() (err error)
- func (t ThinEngine) SetupWorkers() (err error)
- func (t ThinEngine) ShouldCheckUFS() (should bool, err error)
- func (t ThinEngine) ShouldSetupMaster() (should bool, err error)
- func (t ThinEngine) ShouldSetupWorkers() (should bool, err error)
- func (t ThinEngine) ShouldUpdateUFS() (ufsToUpdate *utils.UFSToUpdate)
- func (t ThinEngine) Shutdown() (err error)
- func (t *ThinEngine) SyncMetadata() (err error)
- func (t ThinEngine) SyncReplicas(ctx cruntime.ReconcileRequestContext) (err error)
- func (t ThinEngine) SyncRuntime(ctx cruntime.ReconcileRequestContext) (changed bool, err error)
- func (t ThinEngine) SyncScheduleInfoToCacheNodes() (err error)
- func (t *ThinEngine) TotalFileNums() (int64, error)
- func (t *ThinEngine) TotalStorageBytes() (int64, error)
- func (t *ThinEngine) UpdateCacheOfDataset() (err error)
- func (t *ThinEngine) UpdateDatasetStatus(phase datav1alpha1.DatasetPhase) (err error)
- func (t ThinEngine) UpdateOnUFSChange(ufsToUpdate *utils.UFSToUpdate) (ready bool, err error)
- func (t *ThinEngine) UsedStorageBytes() (int64, error)
- func (t *ThinEngine) Validate(ctx cruntime.ReconcileRequestContext) (err error)
- type ThinValue
- type Worker
Constants ¶
View Source
const ( MetadataSyncNotDoneMsg = "[Calculating]" CheckMetadataSyncDoneTimeoutMillisec = 500 )
View Source
const (
EnvFuseConfigStorage = "THIN_FUSE_CONFIG_STORAGE"
)
Variables ¶
This section is empty.
Functions ¶
func CheckReferenceDatasetRuntime ¶
func CheckReferenceDatasetRuntime(ctx cruntime.ReconcileRequestContext, runtime *datav1alpha1.ThinRuntime) (bool, error)
CheckReferenceDatasetRuntime judge if this runtime is used for handling dataset mounting another dataset.
Types ¶
type Config ¶
type Config struct {
Mounts []datav1alpha1.Mount `json:"mounts"`
TargetPath string `json:"targetPath,omitempty"`
RuntimeOptions map[string]string `json:"runtimeOptions,omitempty"`
PersistentVolumeAttrs map[string]*corev1.CSIPersistentVolumeSource `json:"persistentVolumeAttrs,omitempty"`
PersistentVolumeMountOptions map[string][]string `json:"persistentVolumeMountOptions,omitempty"`
AccessModes []corev1.PersistentVolumeAccessMode `json:"accessModes,omitempty"`
}
type Fuse ¶
type Fuse struct {
Enabled bool `json:"enabled,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
Annotations map[string]string `json:"annotations,omitempty"`
Image string `json:"image,omitempty"`
ImageTag string `json:"imageTag,omitempty"`
ImagePullPolicy string `json:"imagePullPolicy,omitempty"`
Resources common.Resources `json:"resources,omitempty"`
Ports []corev1.ContainerPort `json:"ports,omitempty"`
CriticalPod bool `json:"criticalPod,omitempty"`
HostNetwork bool `json:"hostNetwork"`
HostPID bool `json:"hostPID,omitempty"`
TargetPath string `json:"targetPath,omitempty"`
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
Envs []corev1.EnvVar `json:"envs,omitempty"`
Command []string `json:"command,omitempty"`
Args []string `json:"args,omitempty"`
Volumes []corev1.Volume `json:"volumes,omitempty"`
VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty"`
LivenessProbe *corev1.Probe `json:"livenessProbe,omitempty"`
ReadinessProbe *corev1.Probe `json:"readinessProbe,omitempty"`
CacheDir string `json:"cacheDir,omitempty"`
ConfigValue string `json:"configValue"`
ConfigStorage string `json:"configStorage"`
ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
Lifecycle *corev1.Lifecycle `json:"lifecycle,omitempty"`
}
type ThinEngine ¶
type ThinEngine struct {
Log logr.Logger
client.Client
Recorder record.EventRecorder
MetadataSyncDoneCh chan base.MetadataSyncResult
UnitTest bool
*ctrl.Helper
// contains filtered or unexported fields
}
func (*ThinEngine) BindToDataset ¶
func (t *ThinEngine) BindToDataset() (err error)
func (*ThinEngine) CheckAndUpdateRuntimeStatus ¶
func (t *ThinEngine) CheckAndUpdateRuntimeStatus() (bool, error)
func (ThinEngine) CheckMasterReady ¶
func (t ThinEngine) CheckMasterReady() (bool, error)
func (ThinEngine) CheckRuntimeHealthy ¶
func (t ThinEngine) CheckRuntimeHealthy() (err error)
func (*ThinEngine) CheckRuntimeReady ¶
func (t *ThinEngine) CheckRuntimeReady() (ready bool)
func (ThinEngine) CheckWorkersReady ¶
func (t ThinEngine) CheckWorkersReady() (ready bool, err error)
func (ThinEngine) CreateVolume ¶
func (t ThinEngine) CreateVolume() (err error)
func (ThinEngine) DeleteVolume ¶
func (t ThinEngine) DeleteVolume() (err error)
func (*ThinEngine) FreeStorageBytes ¶
func (t *ThinEngine) FreeStorageBytes() (int64, error)
func (*ThinEngine) GetDataOperationValueFile ¶
func (t *ThinEngine) GetDataOperationValueFile(ctx cruntime.ReconcileRequestContext, operation dataoperation.OperationInterface) (valueFileName string, err error)
func (*ThinEngine) GetRunningPodsOfDaemonset ¶
func (ThinEngine) PrepareUFS ¶
func (t ThinEngine) PrepareUFS() (err error)
func (ThinEngine) SetupMaster ¶
func (t ThinEngine) SetupMaster() (err error)
func (ThinEngine) SetupWorkers ¶
func (t ThinEngine) SetupWorkers() (err error)
func (ThinEngine) ShouldCheckUFS ¶
func (t ThinEngine) ShouldCheckUFS() (should bool, err error)
func (ThinEngine) ShouldSetupMaster ¶
func (t ThinEngine) ShouldSetupMaster() (should bool, err error)
func (ThinEngine) ShouldSetupWorkers ¶
func (t ThinEngine) ShouldSetupWorkers() (should bool, err error)
func (ThinEngine) ShouldUpdateUFS ¶
func (t ThinEngine) ShouldUpdateUFS() (ufsToUpdate *utils.UFSToUpdate)
func (ThinEngine) Shutdown ¶
func (t ThinEngine) Shutdown() (err error)
func (*ThinEngine) SyncMetadata ¶
func (t *ThinEngine) SyncMetadata() (err error)
func (ThinEngine) SyncReplicas ¶
func (t ThinEngine) SyncReplicas(ctx cruntime.ReconcileRequestContext) (err error)
func (ThinEngine) SyncRuntime ¶
func (t ThinEngine) SyncRuntime(ctx cruntime.ReconcileRequestContext) (changed bool, err error)
func (ThinEngine) SyncScheduleInfoToCacheNodes ¶
func (t ThinEngine) SyncScheduleInfoToCacheNodes() (err error)
func (*ThinEngine) TotalFileNums ¶
func (t *ThinEngine) TotalFileNums() (int64, error)
func (*ThinEngine) TotalStorageBytes ¶
func (t *ThinEngine) TotalStorageBytes() (int64, error)
func (*ThinEngine) UpdateCacheOfDataset ¶
func (t *ThinEngine) UpdateCacheOfDataset() (err error)
func (*ThinEngine) UpdateDatasetStatus ¶
func (t *ThinEngine) UpdateDatasetStatus(phase datav1alpha1.DatasetPhase) (err error)
func (ThinEngine) UpdateOnUFSChange ¶
func (t ThinEngine) UpdateOnUFSChange(ufsToUpdate *utils.UFSToUpdate) (ready bool, err error)
func (*ThinEngine) UsedStorageBytes ¶
func (t *ThinEngine) UsedStorageBytes() (int64, error)
func (*ThinEngine) Validate ¶ added in v1.0.2
func (t *ThinEngine) Validate(ctx cruntime.ReconcileRequestContext) (err error)
type ThinValue ¶
type ThinValue struct {
FullnameOverride string `json:"fullnameOverride"`
OwnerDatasetId string `json:"ownerDatasetId"`
common.ImageInfo `json:",inline"`
common.UserInfo `json:",inline"`
Fuse Fuse `json:"fuse,omitempty"`
Worker Worker `json:"worker,omitempty"`
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
PlacementMode string `json:"placement,omitempty"`
Owner *common.OwnerReference `json:"owner,omitempty"`
RuntimeIdentity common.RuntimeIdentity `json:"runtimeIdentity"`
ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
}
type Worker ¶
type Worker struct {
Enabled bool `json:"enabled,omitempty"`
Image string `json:"image,omitempty"`
ImageTag string `json:"imageTag,omitempty"`
ImagePullPolicy string `json:"imagePullPolicy,omitempty"`
Resources common.Resources `json:"resources,omitempty"`
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
HostNetwork bool `json:"hostNetwork,omitempty"`
Envs []corev1.EnvVar `json:"envs,omitempty"`
Ports []corev1.ContainerPort `json:"ports,omitempty"`
Volumes []corev1.Volume `json:"volumes,omitempty"`
VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty"`
LivenessProbe *corev1.Probe `json:"livenessProbe,omitempty"`
ReadinessProbe *corev1.Probe `json:"readinessProbe,omitempty"`
CacheDir string `json:"cacheDir,omitempty"`
ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
}
Source Files
¶
- const.go
- create_volume.go
- data_process.go
- dataset.go
- delete_volume.go
- engine.go
- health_check.go
- master.go
- master_internal.go
- metadata.go
- mock_utils.go
- node.go
- operate.go
- replicas.go
- runtime_info.go
- shutdown.go
- status.go
- sync_runtime.go
- transform.go
- transform_config.go
- transform_fuse.go
- transform_pvc_mounts.go
- transform_resources.go
- transform_volumes.go
- type.go
- ufs.go
- ufs_internal.go
- util.go
- validate.go
- worker.go
- wrap_pvc.go
Click to show internal directories.
Click to hide internal directories.