backup

package
v0.9.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2019 License: Apache-2.0 Imports: 48 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CheckRole            = "stash-check"
	BackupEventComponent = "stash-backup"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BackupSessionController

type BackupSessionController struct {
	K8sClient            kubernetes.Interface
	StashClient          cs.Interface
	MasterURL            string
	KubeconfigPath       string
	StashInformerFactory stashinformers.SharedInformerFactory
	MaxNumRequeues       int
	NumThreads           int
	ResyncPeriod         time.Duration
	//backupConfiguration
	BackupConfigurationName string
	Namespace               string
	//Restic
	SetupOpt restic.SetupOptions
	Metrics  restic.MetricsOptions

	Status   status.UpdateStatusOptions
	Recorder record.EventRecorder
	// contains filtered or unexported fields
}

func (*BackupSessionController) HandleBackupSetupFailure

func (c *BackupSessionController) HandleBackupSetupFailure(setupErr error)

func (*BackupSessionController) RunBackup

func (c *BackupSessionController) RunBackup() error

type Controller

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

func New

func New(k8sClient kubernetes.Interface, stashClient cs.Interface, opt Options) *Controller

func (*Controller) Backup

func (c *Controller) Backup() error

func (*Controller) BackupScheduler

func (c *Controller) BackupScheduler() error

func (*Controller) GroupingKeys

func (c *Controller) GroupingKeys(resource *api.Restic) map[string]string

func (*Controller) JobName

func (c *Controller) JobName(resource *api.Restic) string

type Options

type Options struct {
	Workload         api.LocalTypedReference
	Namespace        string
	ResticName       string
	ScratchDir       string
	PushgatewayURL   string
	NodeName         string
	PodName          string
	SmartPrefix      string
	SnapshotHostname string
	PodLabelsPath    string
	QPS              float64
	Burst            int
	ResyncPeriod     time.Duration
	MaxNumRequeues   int
	RunViaCron       bool
	DockerRegistry   string // image registry for check job
	ImageTag         string // image tag for check job
	NumThreads       int
}

Jump to

Keyboard shortcuts

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