Documentation ¶
Index ¶
- Constants
- func Add(mgr manager.Manager) error
- func GetProgressPercent(message string) string
- func GetTransferRate(message string) string
- func IsPodTerminal(phase kapi.PodPhase) bool
- func MaxProgressString(p1 string, p2 string) string
- func MergeProgressStats(p1, p2 *migapi.RsyncPodStatus)
- func ProgressStringToValue(progressPercentage string) int64
- func ProgressValueToString(progressPercentage int64) string
- type GetPodLogger
- type ReconcileDirectVolumeMigrationProgress
- type RsyncPodProgressTask
Constants ¶
const ( DefaultReconcileConcurrency = 5 RsyncContainerName = rsync_transfer.RsyncContainer DiskRsyncContainerName = diskrsync_transfer.BlockRsyncContainer )
const ( NotFound = "NotFound" NotSet = "NotSet" NotDistinct = "NotDistinct" NotReady = "NotReady" )
Condition reasons
const ( InvalidClusterRef = "InvalidClusterRef" ClusterNotReady = "ClusterNotReady" InvalidPodRef = "InvalidPodRef" InvalidPod = "InvalidPod" PodNotReady = "PodNotReady" InvalidSpec = "InvalidSpec" InvalidPodSelector = "InvalidPodSelector" )
Condition types
const (
// CreatingContainer initial container state
ContainerCreating = "ContainerCreating"
)
Variables ¶
This section is empty.
Functions ¶
func Add ¶
Add creates a new DirectVolumeMigrationProgress Controller and adds it to the Manager with default RBAC. The Manager will set fields on the Controller and Start it when the Manager is Started.
func GetProgressPercent ¶
GetProgressPercent given logs from Rsync Pod, returns logged progress percentage
func GetTransferRate ¶
GetTransferRate given logs from Rsync Pod, returns logged transfer rate
func IsPodTerminal ¶
func MaxProgressString ¶
func MergeProgressStats ¶
func MergeProgressStats(p1, p2 *migapi.RsyncPodStatus)
MergeProgressStats merges progress stats of p2 into p1 : p1 <- p2, only if p1 & p2 are for same pods
func ProgressStringToValue ¶
ProgressStringToValue parses string and returns percentage as a value
func ProgressValueToString ¶
ProgressValueToString parses quantity and returns percentage as a string
Types ¶
type GetPodLogger ¶
type GetPodLogger interface {
// contains filtered or unexported methods
}
type ReconcileDirectVolumeMigrationProgress ¶
type ReconcileDirectVolumeMigrationProgress struct { client.Client // contains filtered or unexported fields }
ReconcileDirectVolumeMigrationProgress reconciles a DirectVolumeMigrationProgress object
func (*ReconcileDirectVolumeMigrationProgress) Reconcile ¶
func (r *ReconcileDirectVolumeMigrationProgress) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error)
Automatically generate RBAC rules to allow the Controller to read and write Deployments +kubebuilder:rbac:groups=migration.openshift.io,resources=directvolumemigrationprogresses,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=migration.openshift.io,resources=directvolumemigrationprogresses/status,verbs=get;update;patch
type RsyncPodProgressTask ¶
type RsyncPodProgressTask struct { Cluster *migapi.MigCluster Client client.Client SrcClient compat.Client Owner *migapi.DirectVolumeMigrationProgress }
func (*RsyncPodProgressTask) Run ¶
func (r *RsyncPodProgressTask) Run() error