scheduler

package
v3.5.5+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2019 License: Apache-2.0 Imports: 20 Imported by: 20

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PolicyJobTemplate *template.Template

Functions

func Init

func Init() error

func ValidateBackRestSchedule

func ValidateBackRestSchedule(scheduleType, deployment, label, backupType string) error

func ValidateBaseBackupSchedule

func ValidateBaseBackupSchedule(scheduleType, pvcName string) error

func ValidatePolicySchedule

func ValidatePolicySchedule(scheduleType, policy, database string) error

func ValidateSchedule

func ValidateSchedule(schedule string) error

func ValidateScheduleType

func ValidateScheduleType(schedule string) error

Types

type BackRestBackupJob

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

func (BackRestBackupJob) Run

func (b BackRestBackupJob) Run()

type BaseBackupJob

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

func (BaseBackupJob) Run

func (b BaseBackupJob) Run()

type Options

type Options struct {
	Name  string `json:"name,omitempty"`
	Value string `json:"value,omitempty"`
}

type PGBackRest

type PGBackRest struct {
	Deployment string    `json:"deployment"`
	Label      string    `json:"label"`
	Container  string    `json:"container"`
	Type       string    `json:"type"`
	Options    []Options `json:"options"`
}

type PGBaseBackup

type PGBaseBackup struct {
	Port         string `json:"backupPort"`
	Secret       string `json:"secret"`
	BackupVolume string `json:"backupVolume"`
	ImagePrefix  string `json:"imagePrefix"`
	ImageTag     string `json:"imageTag"`
}

type Policy

type Policy struct {
	Secret      string `json:"secret"`
	Name        string `json:"name"`
	ImagePrefix string `json:"imagePrefix"`
	ImageTag    string `json:"imageTag"`
	Database    string `json:"database"`
}

type PolicyJob

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

func (PolicyJob) Run

func (p PolicyJob) Run()

type PolicyTemplate

type PolicyTemplate struct {
	JobName        string
	ClusterName    string
	COImagePrefix  string
	COImageTag     string
	PGHost         string
	PGPort         string
	PGDatabase     string
	PGUserSecret   string
	PGSQLConfigMap string
}

type ScheduleTemplate

type ScheduleTemplate struct {
	Version      string    `json:"version"`
	Name         string    `json:"name"`
	Created      time.Time `json:"created"`
	Schedule     string    `json:"schedule"`
	Namespace    string    `json:"namespace"`
	Type         string    `json:"type"`
	Cluster      string    `json:"cluster"`
	PGBackRest   `json:"pgbackrest,omitempty"`
	PGBaseBackup `json:"pgbasebackup,omitempty"`
	Policy       `json:"policy,omitempty"`
}

func (*ScheduleTemplate) NewBackRestSchedule

func (s *ScheduleTemplate) NewBackRestSchedule() BackRestBackupJob

func (*ScheduleTemplate) NewBaseBackupSchedule

func (s *ScheduleTemplate) NewBaseBackupSchedule() BaseBackupJob

func (*ScheduleTemplate) NewPolicySchedule

func (s *ScheduleTemplate) NewPolicySchedule() PolicyJob

type Scheduler

type Scheduler struct {
	CronClient *cv2.Cron
	// contains filtered or unexported fields
}

func New

func New(label, namespace string, client *kubernetes.Clientset) *Scheduler

func (*Scheduler) AddSchedules

func (s *Scheduler) AddSchedules() error

func (*Scheduler) DeleteSchedules

func (s *Scheduler) DeleteSchedules() error

type SecurityContext

type SecurityContext struct {
	FSGroup            int   `json:"fsGroup,omitempty"`
	SupplementalGroups []int `json:"supplementalGroups,omitempty"`
}

Jump to

Keyboard shortcuts

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