Documentation ¶
Index ¶
- func ValidateBackRestSchedule(scheduleType, deployment, label, backupType, storageType string) error
- func ValidatePolicySchedule(scheduleType, policy, database string) error
- func ValidateSchedule(schedule string) error
- func ValidateScheduleType(schedule string) error
- type BackRestBackupJob
- type Controller
- type ControllerManager
- func (c *ControllerManager) AddAndRunGroup(namespace string) error
- func (c *ControllerManager) AddGroup(namespace string) error
- func (c *ControllerManager) RemoveAll()
- func (c *ControllerManager) RemoveGroup(namespace string)
- func (c *ControllerManager) RunAll() error
- func (c *ControllerManager) RunGroup(namespace string) error
- type PGBackRest
- type Policy
- type PolicyJob
- type PolicyTemplate
- type ScheduleTemplate
- type Scheduler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidatePolicySchedule ¶
func ValidateSchedule ¶
ValidateSchedule validates that the cron syntax is valid We use the standard format here...
func ValidateScheduleType ¶
Types ¶
type BackRestBackupJob ¶
type BackRestBackupJob struct {
// contains filtered or unexported fields
}
func (BackRestBackupJob) Run ¶
func (b BackRestBackupJob) Run()
type Controller ¶
type Controller struct { ConfigmapClientset *kubernetes.Clientset Informer coreinformers.ConfigMapInformer Scheduler *Scheduler }
Controller holds the client and informer for the controller, along with a pointer to a Scheduler.
func (*Controller) AddConfigMapEventHandler ¶
func (c *Controller) AddConfigMapEventHandler()
AddConfigMapEventHandler adds the pgcluster event handler to the pgcluster informer
type ControllerManager ¶
type ControllerManager struct { Scheduler *Scheduler // contains filtered or unexported fields }
ControllerManager manages a map of controller groups, each of which is comprised of the various controllers needed to handle events within a specific namespace. Only one controllerGroup is allowed per namespace.
func NewControllerManager ¶
func NewControllerManager(namespaces []string, scheduler *Scheduler) (*ControllerManager, error)
NewControllerManager returns a new ControllerManager comprised of controllerGroups for each namespace included in the 'namespaces' parameter.
func (*ControllerManager) AddAndRunGroup ¶
func (c *ControllerManager) AddAndRunGroup(namespace string) error
AddAndRunGroup is a convenience function that adds a controller group for the namespace specified, and then immediately runs the controllers in that group.
func (*ControllerManager) AddGroup ¶
func (c *ControllerManager) AddGroup(namespace string) error
AddGroup adds a new controller group for the namespace specified. Each controller group is comprised of a controller for the following resource: - configmaps One SharedInformerFactory is utilized, specifically for Kube resources, to create and track the informers for this resource. Each controller group also receives its own clients, which can then be utilized by the controller within the controller group.
func (*ControllerManager) RemoveAll ¶
func (c *ControllerManager) RemoveAll()
RemoveAll removes all controller groups managed by the controller manager, first stopping all controllers within each controller group managed by the controller manager.
func (*ControllerManager) RemoveGroup ¶
func (c *ControllerManager) RemoveGroup(namespace string)
RemoveGroup removes the controller group for the namespace specified, first stopping all controllers within that group
func (*ControllerManager) RunAll ¶
func (c *ControllerManager) RunAll() error
RunAll runs all controllers across all controller groups managed by the controller manager.
func (*ControllerManager) RunGroup ¶
func (c *ControllerManager) RunGroup(namespace string) error
RunGroup runs the controllers within the controller group for the namespace specified.
type PGBackRest ¶
type PolicyTemplate ¶
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"` Policy `json:"policy,omitempty"` }
func (*ScheduleTemplate) NewBackRestSchedule ¶
func (s *ScheduleTemplate) NewBackRestSchedule() BackRestBackupJob
func (*ScheduleTemplate) NewPolicySchedule ¶
func (s *ScheduleTemplate) NewPolicySchedule() PolicyJob