Documentation ¶
Index ¶
- Constants
- func Build(id string, ctx cruntime.ReconcileRequestContext) (base.Engine, error)
- func GetCacheInfoFromConfigmap(client client.Client, name string, namespace string) (cacheinfo map[string]string, err error)
- func ParseSubPathFromMountPoint(mountPoint string) (string, error)
- func Precheck(client client.Client, key types.NamespacedName) (found bool, err error)
- type Configs
- type Fuse
- type JuiceFS
- type JuiceFSEngine
- func (j JuiceFSEngine) AssignNodesToCache(desiredNum int32) (currentScheduleNum int32, err error)
- func (j *JuiceFSEngine) BindToDataset() (err error)
- func (j *JuiceFSEngine) CheckAndUpdateRuntimeStatus() (ready bool, err error)
- func (j *JuiceFSEngine) CheckExistenceOfPath(targetDataload datav1alpha1.DataLoad) (notExist bool, err error)
- func (j JuiceFSEngine) CheckMasterReady() (ready bool, err error)
- func (j *JuiceFSEngine) CheckRuntimeHealthy() (err error)
- func (j *JuiceFSEngine) CheckRuntimeReady() (ready bool)
- func (j JuiceFSEngine) CheckWorkersReady() (ready bool, err error)
- func (j *JuiceFSEngine) CreateDataLoadJob(ctx cruntime.ReconcileRequestContext, targetDataload datav1alpha1.DataLoad) (err error)
- func (j *JuiceFSEngine) CreateVolume() (err error)
- func (j JuiceFSEngine) DeleteVolume() (err error)
- func (j JuiceFSEngine) FreeStorageBytes() (int64, error)
- func (j *JuiceFSEngine) GetEdition() (edition string)
- func (j *JuiceFSEngine) GetPodMetrics(podName, containerName string) (metrics string, err error)
- func (j *JuiceFSEngine) GetRunningPodsOfDaemonset(dsName string, namespace string) (pods []corev1.Pod, err error)
- func (j *JuiceFSEngine) GetRunningPodsOfStatefulSet(stsName string, namespace string) (pods []corev1.Pod, err error)
- func (j *JuiceFSEngine) GetValuesConfigMap() (cm *corev1.ConfigMap, err error)
- func (j *JuiceFSEngine) HasDeprecatedCommonLabelName() (deprecated bool, err error)
- func (j JuiceFSEngine) PrepareUFS() (err error)
- func (j JuiceFSEngine) SetupMaster() (err error)
- func (j JuiceFSEngine) SetupWorkers() (err error)
- func (j JuiceFSEngine) ShouldCheckUFS() (should bool, err error)
- func (j JuiceFSEngine) ShouldSetupMaster() (should bool, err error)
- func (j JuiceFSEngine) ShouldSetupWorkers() (should bool, err error)
- func (j JuiceFSEngine) ShouldUpdateUFS() (ufsToUpdate *utils.UFSToUpdate)
- func (j *JuiceFSEngine) Shutdown() (err error)
- func (j *JuiceFSEngine) SyncMetadata() (err error)
- func (j *JuiceFSEngine) SyncReplicas(ctx cruntime.ReconcileRequestContext) (err error)
- func (j *JuiceFSEngine) SyncRuntime(ctx cruntime.ReconcileRequestContext) (changed bool, err error)
- func (j *JuiceFSEngine) SyncScheduleInfoToCacheNodes() (err error)
- func (j JuiceFSEngine) TotalFileNums() (int64, error)
- func (j JuiceFSEngine) TotalStorageBytes() (int64, error)
- func (j *JuiceFSEngine) UpdateCacheOfDataset() (err error)
- func (j *JuiceFSEngine) UpdateDatasetStatus(phase datav1alpha1.DatasetPhase) (err error)
- func (j JuiceFSEngine) UpdateOnUFSChange(ufsToUpdate *utils.UFSToUpdate) (ready bool, err error)
- func (j JuiceFSEngine) UsedStorageBytes() (int64, error)
- type MetadataSyncResult
- type Worker
Constants ¶
View Source
const ( BlockCacheBytesOfEnterprise = "blockcache.bytes" BlockCacheHitsOfEnterprise = "blockcache.hits" BlockCacheMissOfEnterprise = "blockcache.miss" BlockCacheHitBytesOfEnterprise = "blockcache.hitBytes" BlockCacheMissBytesOfEnterprise = "blockcache.missBytes" BlockCacheBytesOfCommunity = "juicefs_blockcache_bytes" BlockCacheHitsOfCommunity = "juicefs_blockcache_hits" BlockCacheMissOfCommunity = "juicefs_blockcache_miss" BlockCacheHitBytesOfCommunity = "juicefs_blockcache_hit_bytes" BlockCacheMissBytesOfCommunity = "juicefs_blockcache_miss_bytes" PodRoleType = "role" WorkerPodRole = "juicefs-worker" EnterpriseEdition = "enterprise" CommunityEdition = "community" MetadataSyncNotDoneMsg = "[Calculating]" CheckMetadataSyncDoneTimeoutMillisec = 500 DefaultCacheDir = "/var/jfsCache" JuiceStorage = "storage" JuiceBucket = "bucket" JuiceMetaUrl = "metaurl" JuiceAccessKey = "access-key" JuiceSecretKey = "secret-key" JuiceToken = "token" CacheDir = "cachedir" MountPath = "mountpath" Edition = "edition" DefaultDataLoadTimeout = "30m" )
Variables ¶
This section is empty.
Functions ¶
func GetCacheInfoFromConfigmap ¶ added in v0.8.0
func GetCacheInfoFromConfigmap(client client.Client, name string, namespace string) (cacheinfo map[string]string, err error)
GetCacheInfoFromConfigmap get cache info from configmap
Types ¶
type Configs ¶ added in v0.8.0
type Configs struct { Name string `yaml:"name"` AccessKeySecret string `yaml:"accesskeySecret,omitempty"` SecretKeySecret string `yaml:"secretkeySecret,omitempty"` Bucket string `yaml:"bucket,omitempty"` MetaUrlSecret string `yaml:"metaurlSecret,omitempty"` TokenSecret string `yaml:"tokenSecret,omitempty"` Storage string `yaml:"storage,omitempty"` FormatCmd string `yaml:"formatCmd,omitempty"` }
type Fuse ¶
type Fuse struct { Enabled bool `yaml:"enabled,omitempty"` Image string `yaml:"image,omitempty"` NodeSelector map[string]string `yaml:"nodeSelector,omitempty"` Envs []corev1.EnvVar `yaml:"envs,omitempty"` ImageTag string `yaml:"imageTag,omitempty"` ImagePullPolicy string `yaml:"imagePullPolicy,omitempty"` Resources common.Resources `yaml:"resources,omitempty"` CriticalPod bool `yaml:"criticalPod,omitempty"` VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty"` Volumes []corev1.Volume `json:"volumes,omitempty"` SubPath string `yaml:"subPath,omitempty"` MountPath string `yaml:"mountPath,omitempty"` HostMountPath string `yaml:"hostMountPath,omitempty"` Command string `yaml:"command,omitempty"` StatCmd string `yaml:"statCmd,omitempty"` Labels map[string]string `yaml:"labels,omitempty"` Annotations map[string]string `yaml:"annotations,omitempty"` }
type JuiceFS ¶
type JuiceFS struct { FullnameOverride string `yaml:"fullnameOverride"` Edition string `yaml:"edition,omitempty"` Source string `yaml:"source,omitempty"` common.ImageInfo `yaml:",inline"` common.UserInfo `yaml:",inline"` NodeSelector map[string]string `yaml:"nodeSelector,omitempty"` Tolerations []corev1.Toleration `json:"tolerations,omitempty"` Configs Configs `yaml:"configs,omitempty"` Fuse Fuse `yaml:"fuse,omitempty"` Worker Worker `yaml:"worker,omitempty"` CacheDirs map[string]cache `yaml:"cacheDirs,omitempty"` PlacementMode string `yaml:"placement,omitempty"` Owner *common.OwnerReference `yaml:"owner,omitempty"` RuntimeIdentity common.RuntimeIdentity `yaml:"runtimeIdentity,omitempty"` }
JuiceFS The value yaml file
type JuiceFSEngine ¶
type JuiceFSEngine struct { Log logr.Logger client.Client MetadataSyncDoneCh chan MetadataSyncResult UnitTest bool *ctrl.Helper // contains filtered or unexported fields }
func (JuiceFSEngine) AssignNodesToCache ¶
func (j JuiceFSEngine) AssignNodesToCache(desiredNum int32) (currentScheduleNum int32, err error)
func (*JuiceFSEngine) BindToDataset ¶
func (j *JuiceFSEngine) BindToDataset() (err error)
func (*JuiceFSEngine) CheckAndUpdateRuntimeStatus ¶
func (j *JuiceFSEngine) CheckAndUpdateRuntimeStatus() (ready bool, err error)
CheckAndUpdateRuntimeStatus checks the related runtime status and updates it.
func (*JuiceFSEngine) CheckExistenceOfPath ¶
func (j *JuiceFSEngine) CheckExistenceOfPath(targetDataload datav1alpha1.DataLoad) (notExist bool, err error)
func (JuiceFSEngine) CheckMasterReady ¶
func (j JuiceFSEngine) CheckMasterReady() (ready bool, err error)
func (*JuiceFSEngine) CheckRuntimeHealthy ¶
func (j *JuiceFSEngine) CheckRuntimeHealthy() (err error)
func (*JuiceFSEngine) CheckRuntimeReady ¶
func (j *JuiceFSEngine) CheckRuntimeReady() (ready bool)
func (JuiceFSEngine) CheckWorkersReady ¶
func (j JuiceFSEngine) CheckWorkersReady() (ready bool, err error)
func (*JuiceFSEngine) CreateDataLoadJob ¶
func (j *JuiceFSEngine) CreateDataLoadJob(ctx cruntime.ReconcileRequestContext, targetDataload datav1alpha1.DataLoad) (err error)
CreateDataLoadJob creates the job to load data
func (*JuiceFSEngine) CreateVolume ¶
func (j *JuiceFSEngine) CreateVolume() (err error)
func (JuiceFSEngine) DeleteVolume ¶
func (j JuiceFSEngine) DeleteVolume() (err error)
func (JuiceFSEngine) FreeStorageBytes ¶
func (j JuiceFSEngine) FreeStorageBytes() (int64, error)
func (*JuiceFSEngine) GetEdition ¶ added in v0.8.0
func (j *JuiceFSEngine) GetEdition() (edition string)
func (*JuiceFSEngine) GetPodMetrics ¶
func (j *JuiceFSEngine) GetPodMetrics(podName, containerName string) (metrics string, err error)
GetPodMetrics get juicefs pod metrics
func (*JuiceFSEngine) GetRunningPodsOfDaemonset ¶
func (*JuiceFSEngine) GetRunningPodsOfStatefulSet ¶
func (*JuiceFSEngine) GetValuesConfigMap ¶ added in v0.8.0
func (j *JuiceFSEngine) GetValuesConfigMap() (cm *corev1.ConfigMap, err error)
func (*JuiceFSEngine) HasDeprecatedCommonLabelName ¶
func (j *JuiceFSEngine) HasDeprecatedCommonLabelName() (deprecated bool, err error)
func (JuiceFSEngine) PrepareUFS ¶
func (j JuiceFSEngine) PrepareUFS() (err error)
func (JuiceFSEngine) SetupMaster ¶
func (j JuiceFSEngine) SetupMaster() (err error)
func (JuiceFSEngine) SetupWorkers ¶
func (j JuiceFSEngine) SetupWorkers() (err error)
func (JuiceFSEngine) ShouldCheckUFS ¶
func (j JuiceFSEngine) ShouldCheckUFS() (should bool, err error)
func (JuiceFSEngine) ShouldSetupMaster ¶
func (j JuiceFSEngine) ShouldSetupMaster() (should bool, err error)
func (JuiceFSEngine) ShouldSetupWorkers ¶
func (j JuiceFSEngine) ShouldSetupWorkers() (should bool, err error)
func (JuiceFSEngine) ShouldUpdateUFS ¶
func (j JuiceFSEngine) ShouldUpdateUFS() (ufsToUpdate *utils.UFSToUpdate)
ShouldUpdateUFS JuiceFSEngine hasn't support UpdateOnUFSChange
func (*JuiceFSEngine) Shutdown ¶
func (j *JuiceFSEngine) Shutdown() (err error)
func (*JuiceFSEngine) SyncMetadata ¶
func (j *JuiceFSEngine) SyncMetadata() (err error)
SyncMetadata syncs metadata if necessary
func (*JuiceFSEngine) SyncReplicas ¶
func (j *JuiceFSEngine) SyncReplicas(ctx cruntime.ReconcileRequestContext) (err error)
SyncReplicas syncs the replicas
func (*JuiceFSEngine) SyncRuntime ¶ added in v0.8.0
func (j *JuiceFSEngine) SyncRuntime(ctx cruntime.ReconcileRequestContext) (changed bool, err error)
SyncRuntime syncs the runtime spec
func (*JuiceFSEngine) SyncScheduleInfoToCacheNodes ¶
func (j *JuiceFSEngine) SyncScheduleInfoToCacheNodes() (err error)
func (JuiceFSEngine) TotalFileNums ¶
func (j JuiceFSEngine) TotalFileNums() (int64, error)
func (JuiceFSEngine) TotalStorageBytes ¶
func (j JuiceFSEngine) TotalStorageBytes() (int64, error)
func (*JuiceFSEngine) UpdateCacheOfDataset ¶
func (j *JuiceFSEngine) UpdateCacheOfDataset() (err error)
func (*JuiceFSEngine) UpdateDatasetStatus ¶
func (j *JuiceFSEngine) UpdateDatasetStatus(phase datav1alpha1.DatasetPhase) (err error)
UpdateDatasetStatus updates the status of the dataset
func (JuiceFSEngine) UpdateOnUFSChange ¶
func (j JuiceFSEngine) UpdateOnUFSChange(ufsToUpdate *utils.UFSToUpdate) (ready bool, err error)
func (JuiceFSEngine) UsedStorageBytes ¶
func (j JuiceFSEngine) UsedStorageBytes() (int64, error)
type MetadataSyncResult ¶
type MetadataSyncResult struct { Done bool StartTime time.Time UfsTotal string FileNum string Err error }
MetadataSyncResult describes result for asynchronous metadata sync
type Worker ¶
type Worker struct { Image string `yaml:"image,omitempty"` NodeSelector map[string]string `yaml:"nodeSelector,omitempty"` ImageTag string `yaml:"imageTag,omitempty"` ImagePullPolicy string `yaml:"imagePullPolicy,omitempty"` Resources common.Resources `yaml:"resources,omitempty"` Envs []corev1.EnvVar `yaml:"envs,omitempty"` Ports []corev1.ContainerPort `yaml:"ports,omitempty"` VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty"` Volumes []corev1.Volume `json:"volumes,omitempty"` MountPath string `yaml:"mountPath,omitempty"` StatCmd string `yaml:"statCmd,omitempty"` Command string `yaml:"command,omitempty"` Labels map[string]string `yaml:"labels,omitempty"` Annotations map[string]string `yaml:"annotations,omitempty"` }
Source Files ¶
- cache.go
- cacheinfo_parser.go
- const.go
- create_volume.go
- data_load.go
- dataset.go
- delete_volume.go
- deprecated_label.go
- engine.go
- health_check.go
- label.go
- master.go
- master_internal.go
- metadata.go
- node.go
- replicas.go
- report.go
- runtime_info.go
- shutdown.go
- status.go
- sync_runtime.go
- transform.go
- transform_fuse.go
- transform_resources.go
- transform_volume.go
- type.go
- ufs.go
- ufs_internal.go
- utils.go
- worker.go
Click to show internal directories.
Click to hide internal directories.