Documentation ¶
Index ¶
- Constants
- type AdditionalVarsList
- type InternalTemplate
- type KubernetesResource
- type Operation
- type Renderable
- type RequestedBackupActionAggregate
- func (a RequestedBackupActionAggregate) AcceptedResourceTypes() []v1.GroupVersionKind
- func (a *RequestedBackupActionAggregate) AddOwnedObject(doc *unstructured.Unstructured)
- func (a RequestedBackupActionAggregate) GetBackupAggregate() *ScheduledBackupAggregate
- func (a RequestedBackupActionAggregate) GetObjectForOwnerReference() KubernetesResource
- func (a RequestedBackupActionAggregate) GetOperation() Operation
- func (a RequestedBackupActionAggregate) GetReferencesOfOwnedObjects() v1alpha1.ChildrenReferences
- func (a RequestedBackupActionAggregate) GetScheduledBackup() *v1alpha1.ScheduledBackup
- func (a RequestedBackupActionAggregate) GetTemplate() Template
- func (a *RequestedBackupActionAggregate) MarkAsProcessed()
- func (a *RequestedBackupActionAggregate) SetTargetKindType(name string)
- func (sb RequestedBackupActionAggregate) ShouldCreateCronJob() bool
- func (a *RequestedBackupActionAggregate) ShouldRenderDependentObjectsForAllOperationTypes() bool
- func (a RequestedBackupActionAggregate) WasAlreadyProcessed() bool
- type ResourceTypes
- type ScheduledBackupAggregate
- func (sb ScheduledBackupAggregate) AcceptedResourceTypes() []metav1.GroupVersionKind
- func (sb *ScheduledBackupAggregate) AddOwnedObject(doc *unstructured.Unstructured)
- func (sb ScheduledBackupAggregate) GetBackupAggregate() *ScheduledBackupAggregate
- func (sb ScheduledBackupAggregate) GetObjectForOwnerReference() KubernetesResource
- func (sb ScheduledBackupAggregate) GetOperation() Operation
- func (sb ScheduledBackupAggregate) GetReferencesOfOwnedObjects() v1alpha1.ChildrenReferences
- func (sb ScheduledBackupAggregate) GetScheduledBackup() *v1alpha1.ScheduledBackup
- func (sb ScheduledBackupAggregate) GetTemplate() Template
- func (sb ScheduledBackupAggregate) ShouldCreateCronJob() bool
- func (sb *ScheduledBackupAggregate) ShouldRenderDependentObjectsForAllOperationTypes() bool
- type Template
Constants ¶
const InternalTemplateKind = "internal"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdditionalVarsList ¶
type InternalTemplate ¶
type InternalTemplate struct {
Name string
}
func (InternalTemplate) GetBackupScript ¶
func (it InternalTemplate) GetBackupScript() string
func (InternalTemplate) GetImage ¶
func (it InternalTemplate) GetImage() string
func (InternalTemplate) GetName ¶
func (it InternalTemplate) GetName() string
func (InternalTemplate) GetRestoreScript ¶
func (it InternalTemplate) GetRestoreScript() string
func (InternalTemplate) ProvidesScript ¶
func (it InternalTemplate) ProvidesScript() bool
type KubernetesResource ¶
type KubernetesResource interface { GetTypeMeta() *v1.TypeMeta GetObjectMeta() *v1.ObjectMeta }
type Renderable ¶
type Renderable interface { AcceptedResourceTypes() []v1.GroupVersionKind GetOperation() Operation GetTemplate() Template GetScheduledBackup() *v1alpha1.ScheduledBackup GetBackupAggregate() *ScheduledBackupAggregate GetObjectForOwnerReference() KubernetesResource AddOwnedObject(doc *unstructured.Unstructured) ShouldRenderDependentObjectsForAllOperationTypes() bool ShouldCreateCronJob() bool }
type RequestedBackupActionAggregate ¶
type RequestedBackupActionAggregate struct { *v1alpha1.RequestedBackupAction Scheduled *ScheduledBackupAggregate }
RequestedBackupActionAggregate is aggregating already hydrated (fetched from cache/cluster) objects all together
func NewRequestedBackupActionAggregate ¶
func NewRequestedBackupActionAggregate(action *v1alpha1.RequestedBackupAction, scheduled *ScheduledBackupAggregate) *RequestedBackupActionAggregate
func (RequestedBackupActionAggregate) AcceptedResourceTypes ¶
func (a RequestedBackupActionAggregate) AcceptedResourceTypes() []v1.GroupVersionKind
todo: move to integration package
func (*RequestedBackupActionAggregate) AddOwnedObject ¶
func (a *RequestedBackupActionAggregate) AddOwnedObject(doc *unstructured.Unstructured)
AddOwnedObject is adding a child element
func (RequestedBackupActionAggregate) GetBackupAggregate ¶
func (a RequestedBackupActionAggregate) GetBackupAggregate() *ScheduledBackupAggregate
func (RequestedBackupActionAggregate) GetObjectForOwnerReference ¶
func (a RequestedBackupActionAggregate) GetObjectForOwnerReference() KubernetesResource
func (RequestedBackupActionAggregate) GetOperation ¶
func (a RequestedBackupActionAggregate) GetOperation() Operation
func (RequestedBackupActionAggregate) GetReferencesOfOwnedObjects ¶
func (a RequestedBackupActionAggregate) GetReferencesOfOwnedObjects() v1alpha1.ChildrenReferences
func (RequestedBackupActionAggregate) GetScheduledBackup ¶
func (a RequestedBackupActionAggregate) GetScheduledBackup() *v1alpha1.ScheduledBackup
func (RequestedBackupActionAggregate) GetTemplate ¶
func (a RequestedBackupActionAggregate) GetTemplate() Template
func (*RequestedBackupActionAggregate) MarkAsProcessed ¶
func (a *RequestedBackupActionAggregate) MarkAsProcessed()
func (*RequestedBackupActionAggregate) SetTargetKindType ¶
func (a *RequestedBackupActionAggregate) SetTargetKindType(name string)
func (RequestedBackupActionAggregate) ShouldCreateCronJob ¶
func (sb RequestedBackupActionAggregate) ShouldCreateCronJob() bool
func (*RequestedBackupActionAggregate) ShouldRenderDependentObjectsForAllOperationTypes ¶
func (a *RequestedBackupActionAggregate) ShouldRenderDependentObjectsForAllOperationTypes() bool
func (RequestedBackupActionAggregate) WasAlreadyProcessed ¶
func (a RequestedBackupActionAggregate) WasAlreadyProcessed() bool
type ResourceTypes ¶
type ResourceTypes struct {
// contains filtered or unexported fields
}
func NewResourceTypesFilterForRequestedBackupAction ¶
func NewResourceTypesFilterForRequestedBackupAction() ResourceTypes
NewResourceTypesFilterForRequestedBackupAction decides that RequestedBackupAction is owning only runnable objects (JOBS)
func NewResourceTypesFilterForScheduledBackup ¶
func NewResourceTypesFilterForScheduledBackup(resource Renderable, op Operation) ResourceTypes
NewResourceTypesFilterForScheduledBackup decides that ScheduledBackup owns all helper objects like Secrets, ConfigMaps for all kinds of actions for example app1-backup, app1-restore configmaps would be created at once
IMPORTANT: There are no Jobs maintained by ScheduledBackup CRDs
The runnable Jobs are maintained by RequestedBackupAction
The ScheduledBackup is optionally managing CronJobs, which are spawning Jobs according to how Kubernetes works by default
func (*ResourceTypes) GetKinds ¶
func (rt *ResourceTypes) GetKinds() []v1.GroupVersionKind
type ScheduledBackupAggregate ¶
type ScheduledBackupAggregate struct { *v1alpha1.ScheduledBackup Template Template GPGSecret *v1.Secret TokenSecret *v1.Secret VarsListSecret *v1.Secret AdditionalVarsList AdditionalVarsList }
ScheduledBackupAggregate is aggregating already hydrated (fetched from cache/cluster) objects all together
func (ScheduledBackupAggregate) AcceptedResourceTypes ¶
func (sb ScheduledBackupAggregate) AcceptedResourceTypes() []metav1.GroupVersionKind
func (*ScheduledBackupAggregate) AddOwnedObject ¶
func (sb *ScheduledBackupAggregate) AddOwnedObject(doc *unstructured.Unstructured)
AddOwnedObject is adding a child element
func (ScheduledBackupAggregate) GetBackupAggregate ¶
func (sb ScheduledBackupAggregate) GetBackupAggregate() *ScheduledBackupAggregate
func (ScheduledBackupAggregate) GetObjectForOwnerReference ¶
func (sb ScheduledBackupAggregate) GetObjectForOwnerReference() KubernetesResource
func (ScheduledBackupAggregate) GetOperation ¶
func (sb ScheduledBackupAggregate) GetOperation() Operation
func (ScheduledBackupAggregate) GetReferencesOfOwnedObjects ¶
func (sb ScheduledBackupAggregate) GetReferencesOfOwnedObjects() v1alpha1.ChildrenReferences
func (ScheduledBackupAggregate) GetScheduledBackup ¶
func (sb ScheduledBackupAggregate) GetScheduledBackup() *v1alpha1.ScheduledBackup
func (ScheduledBackupAggregate) GetTemplate ¶
func (sb ScheduledBackupAggregate) GetTemplate() Template
func (ScheduledBackupAggregate) ShouldCreateCronJob ¶
func (sb ScheduledBackupAggregate) ShouldCreateCronJob() bool
func (*ScheduledBackupAggregate) ShouldRenderDependentObjectsForAllOperationTypes ¶
func (sb *ScheduledBackupAggregate) ShouldRenderDependentObjectsForAllOperationTypes() bool