Documentation
¶
Index ¶
- Constants
- func DefaultEnvs(backend *backupv1alpha1.Backend, config config.Global) []corev1.EnvVar
- func GetBasicJob(namePrefix string, config config.Global, object metav1.Object) *batchv1.Job
- func GetRepository(obj interface{}) string
- func NewOwnerReference(object metav1.Object) metav1.OwnerReference
- func PseudoUUID() string
- type CommonObjects
- type Handler
- type Runner
Constants ¶
View Source
const ( Hostname = "HOSTNAME" KeepLast = "KEEP_LAST" KeepHourly = "KEEP_HOURLY" KeepDaily = "KEEP_DAILY" KeepWeekly = "KEEP_WEEKLY" KeepMonthly = "KEEP_MONTHLY" KeepYearly = "KEEP_YEARLY" KeepTag = "KEEP_TAG" StatsURL = "STATS_URL" RestorePath = "/restore" PromURL = "PROM_URL" )
Shared constants between the various services
Variables ¶
This section is empty.
Functions ¶
func DefaultEnvs ¶ added in v0.1.2
func GetBasicJob ¶
func GetRepository ¶
func GetRepository(obj interface{}) string
func NewOwnerReference ¶
func NewOwnerReference(object metav1.Object) metav1.OwnerReference
func PseudoUUID ¶
func PseudoUUID() string
PseudoUUID is used to generate IDs for baas related pods/jobs
Types ¶
type CommonObjects ¶
type Handler ¶
type Handler interface {
// Ensure will ensure that the service is correcly registered in a schedule
Ensure(pt runtime.Object) error
// Delete will stop and delete the object from the operator. Kubernetes will
// handle the deletion of all child items.
Delete(name string) error
}
Handler is the interface a service has to implement. These are the functions that get triggered by the kooper framework as soon as a change is found or after the configured resync period.
type Runner ¶
type Runner interface {
Stop() error
// SameSpec should check if the spec has changed and the runner has to be
// recreated. This is mostly necessary for long running things like the
// scheduler. One-time jobs don't usually need this and can just return
// true.
SameSpec(object runtime.Object) bool
Start() error
}
Runner is an interface that a backup service has to satisfy. Runners actually DO the jobs (restore,archive, backup, etc).
Click to show internal directories.
Click to hide internal directories.