backup

package
v0.9.0-rc.4 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2020 License: Apache-2.0 Imports: 49 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 {
	Config               *rest.Config
	K8sClient            kubernetes.Interface
	StashClient          cs.Interface
	MasterURL            string
	KubeconfigPath       string
	StashInformerFactory stashinformers.SharedInformerFactory
	MaxNumRequeues       int
	NumThreads           int
	ResyncPeriod         time.Duration
	//backupConfiguration/BackupBatch
	InvokerType      string
	InvokerName      string
	Namespace        string
	BackupTargetName string
	BackupTargetKind string

	SetupOpt restic.SetupOptions
	Host     string
	Metrics  restic.MetricsOptions
	Recorder record.EventRecorder
	// contains filtered or unexported fields
}

func (*BackupSessionController) HandleBackupSetupFailure

func (c *BackupSessionController) HandleBackupSetupFailure(ref *core.ObjectReference, setupErr error) error

func (*BackupSessionController) RunBackup

func (c *BackupSessionController) RunBackup(targetInfo apis.TargetInfo, invokerRef *core.ObjectReference) 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