Documentation ¶
Overview ¶
Design for copy data from source PVC to destination PVC, continuously push statue into status channel for notifications
Index ¶
Constants ¶
View Source
const ( RcloneSrcName = "source" RcloneRemoteName = "remote" RCloneKeyDir = "/root/.ssh" RCloneKeyComment = "RClonePubKey" RCloneSrcMountPoint = "/mnt/hwameistor/src/" RCloneDstMountPoint = "/mnt/hwameistor/dst/" RClonePubKeyFileName = "rclone.pub" RClonePrivateKeyFileName = "rclone" RCloneKeyConfigMapName = "rclone-key-config" RCloneConfigMapName = "rclone-config" RCloneConfigMapKey = "rclone.conf" RCloneCertKey = "rclone-ssh-keys" RcloneJobLabelApp = "hwameistor-datasync-rclone" RCloneConfigSrcNodeNameKey = "sourceNode" RCloneConfigDstNodeNameKey = "targetNode" RCloneConfigVolumeNameKey = "localVolume" RCloneConfigSourceNodeReadyKey = "sourceReady" RCloneConfigRemoteNodeReadyKey = "targetReady" RCloneConfigSyncDoneKey = "completed" RCloneTrue string = "yes" RCloneFalse string = "no" RCloneJobFinalizer = "hwameistor.io/rclone-job-protect" )
View Source
const ( DataCopyStatusPending = "pending" DataCopyStatusSuccess = "success" DataCopyStatusRunning = "running" DataCopyStatusFailed = "failed" )
View Source
const (
DefaultCopyTimeout = time.Hour * 48
)
Variables ¶
This section is empty.
Functions ¶
func GetConfigMapName ¶ added in v0.4.0
Types ¶
type DataCopyManager ¶
type DataCopyManager struct {
// contains filtered or unexported fields
}
func NewDataCopyManager ¶
func NewDataCopyManager(ctx context.Context, dataCopyJobStatusAnnotationName string, client k8sclient.Client, statusCh chan *DataCopyStatus, namespace string) (*DataCopyManager, error)
NewDataCopyManager return DataCopyManager instance
It will feedback copy process status continuously through statusCh, so it dose not need ResourceReady to poll resource status
func (*DataCopyManager) DeregisterRelatedJob ¶
func (dcm *DataCopyManager) DeregisterRelatedJob(jobName string)
func (*DataCopyManager) RegisterRelatedJob ¶
func (dcm *DataCopyManager) RegisterRelatedJob(jobName string, resultCh chan *DataCopyStatus)
func (*DataCopyManager) Run ¶
func (dcm *DataCopyManager) Run()
type DataCopyStatus ¶
type Rclone ¶
type Rclone struct {
// contains filtered or unexported fields
}
func (*Rclone) GenerateRcloneKeyConfigMap ¶ added in v0.4.0
Click to show internal directories.
Click to hide internal directories.