backup

package
v0.0.4-0...-297a787 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 11, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPluginsRequiredByAllBackupProviders

func GetPluginsRequiredByAllBackupProviders() map[string][]plugins.Plugin

GetPluginsRequiredByAllBackupProviders returns plugins required by all backup providers

Types

type Backup

type Backup struct {
	// contains filtered or unexported fields
}

Backup defines backup manager which is responsible of backup of jobs history

func New

func New(jenkins *virtuslabv1alpha1.Jenkins, k8sClient k8s.Client, logger logr.Logger, jenkinsClient jenkinsclient.Jenkins) *Backup

New returns instance of backup manager

func (*Backup) EnsureBackupJob

func (b *Backup) EnsureBackupJob() error

EnsureBackupJob creates and updates Jenkins job used to backup

func (*Backup) EnsureRestoreJob

func (b *Backup) EnsureRestoreJob() error

EnsureRestoreJob creates and updates Jenkins job used to restore backup

func (*Backup) RestoreBackup

func (b *Backup) RestoreBackup() (reconcile.Result, error)

RestoreBackup restores backup

type Provider

type Provider interface {
	GetRestoreJobXML(jenkins virtuslabv1alpha1.Jenkins) (string, error)
	GetBackupJobXML(jenkins virtuslabv1alpha1.Jenkins) (string, error)
	IsConfigurationValidForBasePhase(jenkins virtuslabv1alpha1.Jenkins, logger logr.Logger) bool
	IsConfigurationValidForUserPhase(k8sClient k8s.Client, jenkins virtuslabv1alpha1.Jenkins, logger logr.Logger) (bool, error)
	GetRequiredPlugins() map[string][]plugins.Plugin
}

Provider defines API of backup providers

func GetBackupProvider

func GetBackupProvider(backupType virtuslabv1alpha1.JenkinsBackup) (Provider, error)

GetBackupProvider returns backup provider by type

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL