Documentation
¶
Overview ¶
Package migration provides functionality for data migration operations in Kubernetes. This package includes components for creating, running, and monitoring Kubernetes jobs that perform data import and migration tasks.
Index ¶
- func IsFinalMigration(ctx context.Context) bool
- func SetFinalMigration(ctx context.Context) context.Context
- func SetTriggerFQDNChange(ctx context.Context) context.Context
- func SetTriggerFQDNChangeFromEnv(ctx context.Context) context.Context
- func TriggerFQDNChange(ctx context.Context) bool
- type DoguStarter
- type DoguStopper
- type ExportModeValidator
- type ExportModeValidatorApiClient
- type JobProviderDependencies
- type JobRunner
- type JobService
- type JobServiceDependencies
- type LogInitializer
- type LogWriter
- type MailSender
- type MaintenanceModeHandler
- type Migrator
- type MigratorDependencies
- type PVCGetter
- type SystemInfoValidator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsFinalMigration ¶
func TriggerFQDNChange ¶
Types ¶
type DoguStarter ¶
type DoguStopper ¶
type ExportModeValidator ¶
type ExportModeValidatorApiClient ¶
type ExportModeValidatorApiClient struct {
// contains filtered or unexported fields
}
func NewExportModeValidatorApiClient ¶
func NewExportModeValidatorApiClient(apiClient exportModeClient) *ExportModeValidatorApiClient
type JobProviderDependencies ¶
type JobProviderDependencies struct {
JobContainerConfig configuration.JobContainer
SSHConfig configuration.SSH
APIKey string
DoguVolumeBasePath string
PVCClient pvcClient
}
type JobService ¶
type JobService struct {
// contains filtered or unexported fields
}
JobService orchestrates the creation, execution, and monitoring of Kubernetes jobs It provides functionality to run jobs, watch their status, and retrieve their logs
func NewJobService ¶
func NewJobService(deps JobServiceDependencies) (*JobService, error)
NewJobService creates a new JobService with the provided dependencies It initializes the job provider and sets up the necessary functions for watching jobs and streaming logs Returns an error if the job provider cannot be created
func (JobService) Run ¶
func (j JobService) Run(ctx context.Context) (jobLogs io.ReadCloser, err error)
Run creates and executes a Kubernetes job, watches for its completion, and returns its logs It performs the following steps: 1. Creates a job specification using the job creator 2. Submits the job to the Kubernetes API 3. Sets up a watcher to monitor the job's status 4. Waits for the job to complete or fail 5. Retrieves and returns the job's logs
The method returns an io.ReadCloser containing the job logs if successful, or an error if any step in the process fails
type JobServiceDependencies ¶
type JobServiceDependencies struct {
JobProviderDependencies
JobClient jobClient
PodClient podClient
}
JobServiceDependencies contains all the dependencies required to create a JobService It includes dependencies for job creation, job client for interacting with Kubernetes jobs, and pod client for accessing pod information and logs
type LogInitializer ¶
type LogInitializer interface {
InitializeWithLogFile() error
}
type LogWriter ¶
type LogWriter interface {
Write(io.ReadCloser) error
}
type MailSender ¶
type MaintenanceModeHandler ¶
type Migrator ¶
type Migrator struct {
// contains filtered or unexported fields
}
func NewMigrator ¶
func NewMigrator(dependencies MigratorDependencies) *Migrator
type MigratorDependencies ¶
type MigratorDependencies struct {
ExportModeValidator
SystemInfoValidator
MaintenanceModeHandler
MailSender
LogWriter
LogInitializer
JobRunner
DoguStopper
DoguStarter
}
type PVCGetter ¶
type PVCGetter struct {
// contains filtered or unexported fields
}
func NewPVCGetter ¶
func NewPVCGetter(client v1.PersistentVolumeClaimInterface) *PVCGetter
type SystemInfoValidator ¶
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package sync provides functions to copy data from the exporter system to the importer system (where this application is running).
|
Package sync provides functions to copy data from the exporter system to the importer system (where this application is running). |