Documentation ¶
Index ¶
- Constants
- func AgentContainer(cr *api.PerconaServerMongoDB, replsetName string) corev1.Container
- func BackupCronJob(cr *api.PerconaServerMongoDB, task *api.BackupTaskSpec) (batchv1beta1.CronJob, error)
- func BackupFromTask(cr *api.PerconaServerMongoDB, task *api.BackupTaskSpec) (*api.PerconaServerMongoDBBackup, error)
- func GetPBMConfig(ctx context.Context, k8sclient client.Client, ...) (pbm.Config, error)
- func GetPriorities(ctx context.Context, k8sclient client.Client, ...) (map[string]float64, error)
- func HasActiveJobs(ctx context.Context, cl client.Client, cluster *api.PerconaServerMongoDB, ...) (bool, error)
- func IsPITRLock(l pbm.LockHeader) bool
- func NewBackupCronJobLabels(crName string, labels map[string]string) map[string]string
- func NotPITRLock(l pbm.LockHeader) bool
- type Job
- type JobType
- type LockHeaderPredicate
- type PBM
- func (b *PBM) Close(ctx context.Context) error
- func (b *PBM) GetLastPITRChunk() (*pbm.OplogChunk, error)
- func (b *PBM) GetLatestTimelinePITR() (pbm.Timeline, error)
- func (b *PBM) GetPITRChunkContains(ctx context.Context, unixTS int64) (*pbm.OplogChunk, error)
- func (b *PBM) GetTimelinesPITR() ([]pbm.Timeline, error)
- func (b *PBM) HasLocks(predicates ...LockHeaderPredicate) (bool, error)
- func (b *PBM) SetConfig(ctx context.Context, k8sclient client.Client, ...) error
Constants ¶
View Source
const ( AWSAccessKeySecretKey = "AWS_ACCESS_KEY_ID" AWSSecretAccessKeySecretKey = "AWS_SECRET_ACCESS_KEY" AzureStorageAccountNameSecretKey = "AZURE_STORAGE_ACCOUNT_NAME" AzureStorageAccountKeySecretKey = "AZURE_STORAGE_ACCOUNT_KEY" )
Variables ¶
This section is empty.
Functions ¶
func AgentContainer ¶
func AgentContainer(cr *api.PerconaServerMongoDB, replsetName string) corev1.Container
AgentContainer creates the container object for a backup agent
func BackupCronJob ¶
func BackupCronJob(cr *api.PerconaServerMongoDB, task *api.BackupTaskSpec) (batchv1beta1.CronJob, error)
func BackupFromTask ¶ added in v1.13.0
func BackupFromTask(cr *api.PerconaServerMongoDB, task *api.BackupTaskSpec) (*api.PerconaServerMongoDBBackup, error)
func GetPBMConfig ¶ added in v1.14.0
func GetPriorities ¶ added in v1.14.0
func GetPriorities(ctx context.Context, k8sclient client.Client, cluster *api.PerconaServerMongoDB) (map[string]float64, error)
GetPriorities returns priorities to be used in PBM config.
func HasActiveJobs ¶ added in v1.4.0
func HasActiveJobs(ctx context.Context, cl client.Client, cluster *api.PerconaServerMongoDB, current Job, allowLock ...LockHeaderPredicate) (bool, error)
HasActiveJobs returns true if there are running backups or restores in given cluster and namespace
func IsPITRLock ¶ added in v1.8.0
func IsPITRLock(l pbm.LockHeader) bool
func NewBackupCronJobLabels ¶ added in v1.2.0
func NotPITRLock ¶ added in v1.8.0
func NotPITRLock(l pbm.LockHeader) bool
Types ¶
type Job ¶ added in v1.4.0
func NewBackupJob ¶ added in v1.8.0
func NewRestoreJob ¶ added in v1.8.0
func NewRestoreJob(cr *api.PerconaServerMongoDBRestore) Job
type LockHeaderPredicate ¶ added in v1.8.0
type LockHeaderPredicate func(pbm.LockHeader) bool
func NotJobLock ¶ added in v1.8.0
func NotJobLock(j Job) LockHeaderPredicate
type PBM ¶ added in v1.4.0
func NewPBM ¶ added in v1.4.0
NewPBM creates a new connection to PBM. It should be closed after the last use with.
func (*PBM) GetLastPITRChunk ¶ added in v1.8.0
func (b *PBM) GetLastPITRChunk() (*pbm.OplogChunk, error)
func (*PBM) GetLatestTimelinePITR ¶ added in v1.8.0
func (*PBM) GetPITRChunkContains ¶ added in v1.8.0
func (*PBM) GetTimelinesPITR ¶ added in v1.8.0
Click to show internal directories.
Click to hide internal directories.