controllers

package
v0.0.0-...-af52fa7 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2023 License: MIT Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsOurPod

func IsOurPod(restore etcdv1alpha1.EtcdRestore, pod corev1.Pod) bool

Types

type Action

type Action interface {
	Execute(context.Context) error
}

Action is a single operation which will be executed by the controller.

type CreateRuntimeObject

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

CreateRuntimeObject is an Action which creates the supplied API object

func (*CreateRuntimeObject) Execute

func (o *CreateRuntimeObject) Execute(ctx context.Context) error

type CronScheduler

type CronScheduler interface {
	AddFunc(spec string, cmd func()) (cron.EntryID, error)
	Remove(id cron.EntryID)
}

type EtcdBackupReconciler

type EtcdBackupReconciler struct {
	client.Client
	Log              logr.Logger
	Scheme           *runtime.Scheme
	BackupAgentImage string
	ProxyURL         string
	Recorder         record.EventRecorder
}

EtcdBackupReconciler reconciles a EtcdBackup object

func (*EtcdBackupReconciler) Reconcile

func (r *EtcdBackupReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error)

func (*EtcdBackupReconciler) SetupWithManager

func (r *EtcdBackupReconciler) SetupWithManager(mgr ctrl.Manager) error

type EtcdBackupScheduleReconciler

type EtcdBackupScheduleReconciler struct {
	client.Client
	Log logr.Logger

	// CronHandler is able to schedule cronjobs to occur at given times.
	CronHandler CronScheduler

	// Schedules holds a mapping of resources to the object responsible for scheduling the backup to be taken.
	Schedules *ScheduleMap
}

EtcdBackupScheduleReconciler reconciles a EtcdBackupSchedule object

func (*EtcdBackupScheduleReconciler) Reconcile

func (*EtcdBackupScheduleReconciler) SetupWithManager

func (r *EtcdBackupScheduleReconciler) SetupWithManager(mgr ctrl.Manager) error

type EtcdClusterReconciler

type EtcdClusterReconciler struct {
	client.Client
	Log      logr.Logger
	Recorder record.EventRecorder
	Etcd     etcd.APIBuilder
}

EtcdClusterReconciler reconciles a EtcdCluster object

func (*EtcdClusterReconciler) Reconcile

func (r *EtcdClusterReconciler) Reconcile(req ctrl.Request) (_ ctrl.Result, reterr error)

func (*EtcdClusterReconciler) SetupWithManager

func (r *EtcdClusterReconciler) SetupWithManager(mgr ctrl.Manager) error

type EtcdPeerReconciler

type EtcdPeerReconciler struct {
	client.Client
	Log            logr.Logger
	Etcd           etcd.APIBuilder
	EtcdRepository string
}

EtcdPeerReconciler reconciles a EtcdPeer object

func (*EtcdPeerReconciler) Reconcile

func (r *EtcdPeerReconciler) Reconcile(req ctrl.Request) (_ ctrl.Result, reterr error)

func (*EtcdPeerReconciler) SetupWithManager

func (r *EtcdPeerReconciler) SetupWithManager(mgr ctrl.Manager) error

type EtcdRestoreReconciler

type EtcdRestoreReconciler struct {
	client.Client
	Log             logr.Logger
	Recorder        record.EventRecorder
	RestorePodImage string
	ProxyURL        string
}

EtcdRestoreReconciler reconciles a EtcdRestore object

func (*EtcdRestoreReconciler) Reconcile

func (r *EtcdRestoreReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error)

func (*EtcdRestoreReconciler) SetupWithManager

func (r *EtcdRestoreReconciler) SetupWithManager(mgr ctrl.Manager) error

type MembersByName

type MembersByName []etcdclient.Member

MembersByName provides a sort.Sort interface for etcdClient.Member.Name

func (MembersByName) Len

func (a MembersByName) Len() int

func (MembersByName) Less

func (a MembersByName) Less(i, j int) bool

func (MembersByName) Swap

func (a MembersByName) Swap(i, j int)

type PatchStatus

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

PatchStatus is an Action which patches the status of original with any changed status fields of new.

func (*PatchStatus) Execute

func (o *PatchStatus) Execute(ctx context.Context) error

type PeerPVCDeleter

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

PeerPVCDeleter deletes the PVC for an EtcdPeer and removes the PVC deletion finalizer.

func (*PeerPVCDeleter) Execute

func (o *PeerPVCDeleter) Execute(ctx context.Context) error

Execute performs the deletiong and finalizer removal

type Schedule

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

type ScheduleMap

type ScheduleMap struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

ScheduleMap is a thread-safe mapping of backup schedules.

func NewScheduleMap

func NewScheduleMap() *ScheduleMap

func (*ScheduleMap) Delete

func (s *ScheduleMap) Delete(key string)

func (*ScheduleMap) Read

func (s *ScheduleMap) Read(key string) (Schedule, bool)

func (*ScheduleMap) Write

func (s *ScheduleMap) Write(key string, value Schedule)

Jump to

Keyboard shortcuts

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