backup

package
v0.0.0-...-25b1e04 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2025 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AnnotationKeyBackupID is the name of the annotation containing the ID of the Backup object the annotation belongs
	// to. The ID is determined by the a9s Backup Manager during the provisioning of a backup and then sent to this
	// controller during the Create() function. Since after executing Create() the crossplane runtime only persists
	// changes in annotations of the reconciled object, not its fields, we need to persist the ID in an annotation.
	AnnotationKeyBackupID = "anynines.crossplane.io/backup-id"

	// ErrServiceInstanceNotFound is the message of the error that is triggered when service instance referenced in a backup
	// is not found.
	ErrServiceInstanceNotFound = utilerr.PlainUserErr("data service instance was not found")
)

Variables

This section is empty.

Functions

func Setup

func Setup(mgr ctrl.Manager, o controller.Options) error

Setup adds a controller that reconciles Backup managed resources.

Types

type External

type External struct {
	// A 'client' used to connect to the external resource API. In practice this
	// would be something like an AWS SDK client.
	Client bkpmgrclient.Client

	// A k8s client is used to retrieve the MRs for Service Instances in order to resolve the
	// instance names into IDs
	Kube k8sclient.Client
}

An ExternalClient observes, then either creates, updates, or deletes an External resource to ensure it reflects the managed resource's desired state.

func (*External) Create

func (*External) Delete

func (c *External) Delete(ctx context.Context, mg resource.Managed) error

func (External) GetServiceInstanceManagedResource

func (c External) GetServiceInstanceManagedResource(ctx context.Context, bkp v1.Backup) (*dsv1.ServiceInstance, error)

func (*External) Observe

func (*External) Update

Jump to

Keyboard shortcuts

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