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 GetFSInfoFromConfigMap(client client.Client, name string, namespace string) (info map[string]string, err error)
- func GetMetricsPort(options map[string]string) (int, error)
- func GetReservedPorts(client client.Client) (ports []int, err error)
- func ParseImageTag(imageTag string) (*ClientVersion, *ClientVersion, error)
- func ParseSubPathFromMountPoint(mountPoint string) (string, error)
- func Precheck(client client.Client, key types.NamespacedName) (found bool, err error)
- type ClientVersion
- 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) CreateDataMigrateJob(ctx cruntime.ReconcileRequestContext, ...) (err error)
- func (j *JuiceFSEngine) CreateVolume() (err error)
- func (j JuiceFSEngine) DeleteVolume() (err error)
- func (j JuiceFSEngine) FreeStorageBytes() (int64, error)
- func (j *JuiceFSEngine) GetDataOperationValueFile(ctx cruntime.ReconcileRequestContext, object client.Object, ...) (valueFileName string, err 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 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" EnterpriseEdition = "enterprise" CommunityEdition = "community" DefaultMetricsPort = 9567 MetadataSyncNotDoneMsg = "[Calculating]" CheckMetadataSyncDoneTimeoutMillisec = 500 DefaultCacheDir = "/var/jfsCache" JuiceStorage = "storage" JuiceBucket = "bucket" JuiceMetaUrl = "metaurl" JuiceAccessKey = "access-key" JuiceSecretKey = "secret-key" JuiceToken = "token" MountPath = "mountpath" Edition = "edition" MetaurlSecret = "metaurlSecret" MetaurlSecretKey = "metaurlSecretKey" TokenSecret = "tokenSecret" TokenSecretKey = "tokenSecretKey" AccessKeySecret = "accesskeySecret" AccessKeySecretKey = "accesskeySecretKey" SecretKeySecret = "secretkeySecret" SecretKeySecretKey = "secretkeySecretKey" FormatCmd = "formatCmd" Name = "name" DefaultDataLoadTimeout = "30m" DefaultDataMigrateTimeout = "30m" NativeVolumeMigratePath = "/mnt/fluid-native/" )
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
func GetFSInfoFromConfigMap ¶ added in v0.9.0
func GetReservedPorts ¶ added in v0.9.0
GetReservedPorts defines restoration logic for JuiceFSRuntime
func ParseImageTag ¶ added in v0.9.0
func ParseImageTag(imageTag string) (*ClientVersion, *ClientVersion, error)
Types ¶
type ClientVersion ¶ added in v0.9.0
func (*ClientVersion) LessThan ¶ added in v0.9.0
func (v *ClientVersion) LessThan(other *ClientVersion) bool
type Configs ¶ added in v0.8.0
type Configs struct {
Name string `json:"name"`
AccessKeySecret string `json:"accesskeySecret,omitempty"`
AccessKeySecretKey string `json:"accesskeySecretKey,omitempty"`
SecretKeySecret string `json:"secretkeySecret,omitempty"`
SecretKeySecretKey string `json:"secretkeySecretKey,omitempty"`
Bucket string `json:"bucket,omitempty"`
MetaUrlSecret string `json:"metaurlSecret,omitempty"`
MetaUrlSecretKey string `json:"metaurlSecretKey,omitempty"`
TokenSecret string `json:"tokenSecret,omitempty"`
TokenSecretKey string `json:"tokenSecretKey,omitempty"`
Storage string `json:"storage,omitempty"`
FormatCmd string `json:"formatCmd,omitempty"`
QuotaCmd string `json:"quotaCmd,omitempty"`
}
type Fuse ¶
type Fuse struct {
Privileged bool `json:"privileged"`
Enabled bool `json:"enabled,omitempty"`
Image string `json:"image,omitempty"`
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
Envs []corev1.EnvVar `json:"envs,omitempty"`
ImageTag string `json:"imageTag,omitempty"`
ImagePullPolicy string `json:"imagePullPolicy,omitempty"`
Resources common.Resources `json:"resources,omitempty"`
CriticalPod bool `json:"criticalPod,omitempty"`
VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty"`
Volumes []corev1.Volume `json:"volumes,omitempty"`
HostNetwork bool `json:"hostNetwork,omitempty"`
MetricsPort *int `json:"metricsPort,omitempty"`
SubPath string `json:"subPath,omitempty"`
MountPath string `json:"mountPath,omitempty"`
HostMountPath string `json:"hostMountPath,omitempty"`
Command string `json:"command,omitempty"`
StatCmd string `json:"statCmd,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
Annotations map[string]string `json:"annotations,omitempty"`
}
type JuiceFS ¶
type JuiceFS struct {
FullnameOverride string `json:"fullnameOverride"`
Edition string `json:"edition,omitempty"`
Source string `json:"source,omitempty"`
common.ImageInfo `json:",inline"`
common.UserInfo `json:",inline"`
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
Configs Configs `json:"configs,omitempty"`
Fuse Fuse `json:"fuse,omitempty"`
Worker Worker `json:"worker,omitempty"`
CacheDirs map[string]cache `json:"cacheDirs,omitempty"`
PlacementMode string `json:"placement,omitempty"`
Owner *common.OwnerReference `json:"owner,omitempty"`
RuntimeIdentity common.RuntimeIdentity `json:"runtimeIdentity,omitempty"`
}
JuiceFS The value json file
type JuiceFSEngine ¶
type JuiceFSEngine struct {
Log logr.Logger
client.Client
MetadataSyncDoneCh chan base.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) CreateDataMigrateJob ¶ added in v0.9.0
func (j *JuiceFSEngine) CreateDataMigrateJob(ctx cruntime.ReconcileRequestContext, targetDataMigrate datav1alpha1.DataMigrate) (err error)
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) GetDataOperationValueFile ¶ added in v0.9.0
func (j *JuiceFSEngine) GetDataOperationValueFile(ctx cruntime.ReconcileRequestContext, object client.Object, operation dataoperation.OperationInterface) (valueFileName string, err 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 Worker ¶
type Worker struct {
Privileged bool `json:"privileged"`
Image string `json:"image,omitempty"`
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
ImageTag string `json:"imageTag,omitempty"`
ImagePullPolicy string `json:"imagePullPolicy,omitempty"`
Resources common.Resources `json:"resources,omitempty"`
Envs []corev1.EnvVar `json:"envs,omitempty"`
VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty"`
Volumes []corev1.Volume `json:"volumes,omitempty"`
HostNetwork bool `json:"hostNetwork,omitempty"`
MetricsPort *int `json:"metricsPort,omitempty"`
MountPath string `json:"mountPath,omitempty"`
StatCmd string `json:"statCmd,omitempty"`
Command string `json:"command,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
Annotations map[string]string `json:"annotations,omitempty"`
}
Source Files
¶
- cache.go
- const.go
- create_volume.go
- data_load.go
- data_migrate.go
- dataset.go
- datasetinfo_parser.go
- delete_volume.go
- deprecated_label.go
- engine.go
- health_check.go
- label.go
- master.go
- master_internal.go
- metadata.go
- node.go
- operate.go
- port_parser.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.