scheduler

package
v4.2.2-alpha.1+incompa... Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2020 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateBackRestSchedule

func ValidateBackRestSchedule(scheduleType, deployment, label, backupType, storageType 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

ValidateSchedule validates that the cron syntax is valid We use the standard format here...

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 PGBackRest

type PGBackRest struct {
	Deployment  string `json:"deployment"`
	Label       string `json:"label"`
	Container   string `json:"container"`
	Type        string `json:"type"`
	StorageType string `json:"storageType,omitempty"`
	Options     string `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
	PGOImagePrefix string
	PGOImageTag    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, nsList []string, client *kubernetes.Clientset) *Scheduler

func (*Scheduler) AddSchedule

func (s *Scheduler) AddSchedule(config *v1.ConfigMap) error

func (*Scheduler) DeleteSchedule

func (s *Scheduler) DeleteSchedule(config *v1.ConfigMap)

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