Documentation
¶
Index ¶
- Constants
- Variables
- type Controller
- func (c *Controller) Create(backup *v1alpha1.BackupTaskSpec) error
- func (c *Controller) Delete(backup *v1alpha1.BackupTaskSpec) error
- func (c *Controller) DeleteBackupTasks() error
- func (c *Controller) DeleteCoordinator() error
- func (c *Controller) EnsureBackupTasks() error
- func (c *Controller) EnsureCoordinator() error
- func (c *Controller) NewAgentContainer(replset *v1alpha1.ReplsetSpec) corev1.Container
- func (c *Controller) NewAgentVolumes() ([]corev1.Volume, error)
- func (c *Controller) Update(backup *v1alpha1.BackupTaskSpec) error
Constants ¶
const AgentContainerName = "backup-agent"
AgentContainerName is the name of the backup agent container
const DefaultVersion = "0.3.0"
DefaultVersion is the default version of the percona/percona-backup-mongodb project
Variables ¶
var DefaultCompressionType = v1alpha1.BackupCompressionGzip
DefaultCompressionType is the default backup data compression type
var DefaultEnableClientsLogging = &util.TrueVar
DefaultEnableClientsLogging is the default for the backup coordinator clients logging
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller is responsible for controlling backup configuration
func New ¶
func New(client sdk.Client, psmdb *v1alpha1.PerconaServerMongoDB, serverVersion *v1alpha1.ServerVersion, usersSecret *corev1.Secret) *Controller
New returns a new Controller
func (*Controller) Create ¶
func (c *Controller) Create(backup *v1alpha1.BackupTaskSpec) error
Create creates a backup task cronJob and updates the CR status
func (*Controller) Delete ¶
func (c *Controller) Delete(backup *v1alpha1.BackupTaskSpec) error
Delete deletes a backup task cronJob and CR status
func (*Controller) DeleteBackupTasks ¶
func (c *Controller) DeleteBackupTasks() error
DeleteBackupTasks deletes all cronJobs and CR statuses for backup tasks
func (*Controller) DeleteCoordinator ¶
func (c *Controller) DeleteCoordinator() error
func (*Controller) EnsureBackupTasks ¶
func (c *Controller) EnsureBackupTasks() error
EnsureBackupTasks ensures backup tasks are created if enabled, updated if they already exist or removed if they are disabled
func (*Controller) EnsureCoordinator ¶
func (c *Controller) EnsureCoordinator() error
func (*Controller) NewAgentContainer ¶
func (c *Controller) NewAgentContainer(replset *v1alpha1.ReplsetSpec) corev1.Container
func (*Controller) NewAgentVolumes ¶ added in v0.2.1
func (c *Controller) NewAgentVolumes() ([]corev1.Volume, error)
func (*Controller) Update ¶
func (c *Controller) Update(backup *v1alpha1.BackupTaskSpec) error
Update updates a backup task cronJob and updates the CR spec and status