Documentation ¶
Index ¶
- Constants
- Variables
- func GetClient() (crclient.Client, error)
- func GetConfig() (*rest.Config, error)
- func ManagePauseHostedCluster(ctx context.Context, client crclient.Client, log logrus.FieldLogger, ...) error
- func ManagePauseNodepools(ctx context.Context, client crclient.Client, log logrus.FieldLogger, ...) error
- func WaitForDataUpload(ctx context.Context, client crclient.Client, log logrus.FieldLogger, ...) (bool, error)
- func WaitForPausedPropagated(ctx context.Context, client crclient.Client, log logrus.FieldLogger, ...) error
- type BackupPlugin
- type BackupStatus
- type RestorePlugin
- type RestoreStatus
Constants ¶
const ( CommonBackupAnnotationName string = "hypershift.openshift.io/common-backup-plugin" CommonRestoreAnnotationName string = "hypershift.openshift.io/common-restore-plugin" BackupStatusInProgress BackupStatus = "InProgress" BackupStatusCompleted BackupStatus = "Completed" RestoreDone RestoreStatus = "true" )
Variables ¶
var (
CustomScheme = runtime.NewScheme()
)
Functions ¶
func ManagePauseNodepools ¶
func WaitForDataUpload ¶
func WaitForDataUpload(ctx context.Context, client crclient.Client, log logrus.FieldLogger, backup *v1.Backup) (bool, error)
WaitForBackupCompleted waits for the backup to be completed and uploaded to the destination backend it returns true if the backup was completed successfully, false otherwise.
func WaitForPausedPropagated ¶
func WaitForPausedPropagated(ctx context.Context, client crclient.Client, log logrus.FieldLogger, hc *hyperv1.HostedCluster) error
Types ¶
type BackupPlugin ¶
type BackupPlugin struct { DataUploadDone bool // contains filtered or unexported fields }
BackupPlugin is a backup item action plugin for Hypershift common objects.
func NewBackupPlugin ¶
func NewBackupPlugin(log logrus.FieldLogger) *BackupPlugin
NewBackupPlugin instantiates BackupPlugin.
func (*BackupPlugin) AppliesTo ¶
func (p *BackupPlugin) AppliesTo() (velero.ResourceSelector, error)
AppliesTo returns information about which resources this action should be invoked for. The IncludedResources and ExcludedResources slices can include both resources and resources with group names. These work: "ingresses", "ingresses.extensions". A BackupPlugin's Execute function will only be invoked on items that match the returned selector. A zero-valued ResourceSelector matches all resources.
func (*BackupPlugin) Execute ¶
func (p *BackupPlugin) Execute(item runtime.Unstructured, backup *v1.Backup) (runtime.Unstructured, []velero.ResourceIdentifier, error)
Execute allows the ItemAction to perform arbitrary logic with the item being backed up, in this case, setting a custom annotation on the item being backed up.
func (*BackupPlugin) Name ¶
func (p *BackupPlugin) Name() string
Name is required to implement the interface, but the Velero pod does not delegate this method -- it's used to tell velero what name it was registered under. The plugin implementation must define it, but it will never actually be called.
type BackupStatus ¶
type BackupStatus string
type RestorePlugin ¶
type RestorePlugin struct {
// contains filtered or unexported fields
}
RestorePlugin is a restore item action plugin for hypershift common objects.
func NewRestorePlugin ¶
func NewRestorePlugin(log logrus.FieldLogger) *RestorePlugin
NewRestorePlugin instantiates a RestorePlugin.
func (*RestorePlugin) AppliesTo ¶
func (p *RestorePlugin) AppliesTo() (velero.ResourceSelector, error)
AppliesTo returns information about which resources this action should be invoked for. The IncludedResources and ExcludedResources slices can include both resources and resources with group names. These work: "ingresses", "ingresses.extensions". A RestoreItemAction's Execute function will only be invoked on items that match the returned selector. A zero-valued ResourceSelector matches all resources.
func (*RestorePlugin) Execute ¶
func (p *RestorePlugin) Execute(input *velero.RestoreItemActionExecuteInput) (*velero.RestoreItemActionExecuteOutput, error)
Execute sets a custom annotation on the item being restored.
func (*RestorePlugin) Name ¶
func (p *RestorePlugin) Name() string
Name is required to implement the interface, but the Velero pod does not delegate this method -- it's used to tell velero what name it was registered under. The plugin implementation must define it, but it will never actually be called.
type RestoreStatus ¶
type RestoreStatus string