Documentation
¶
Index ¶
- Constants
- func ConfigureContainerSleep(containers []corev1API.Container, duration string)
- func GetOwnerReferences(item runtime.Unstructured) ([]metav1.OwnerReference, error)
- func GetRegistryInfo(major, minor string, log logrus.FieldLogger) (string, error)
- func GetServerVersion() (*version.Info, error)
- func GetSrcAndDestRegistryInfo(item runtime.Unstructured) (string, string, error)
- func HasImageRefPrefix(s, prefix string) bool
- func ReplaceImageRefPrefix(s, oldPrefix, newPrefix string) (string, error)
- func SwapContainerImageRefs(containers []corev1API.Container, oldRegistry, newRegistry string, ...)
- type APIServerConfig
- type BackupPlugin
- type LocalImageReference
- type RestorePlugin
Constants ¶
const BackupRegistryHostname string = "openshift.io/backup-registry-hostname"
const BackupServerVersion string = "openshift.io/backup-server-version"
const MigrateCopyPhaseAnnotation string = "openshift.io/migrate-copy-phase"
stage, final. Only valid for copy type.
const MigrateQuiesceAnnotation string = "openshift.io/migrate-quiesce-pods"
const MigrateTypeAnnotation string = "openshift.io/migrate-type"
copy, swing, TODO: others (snapshot, custom, etc.)
const MigrationRegistry string = "openshift.io/migration-registry"
const PodStageLabel string = "migration-stage-pod"
const ResticBackupAnnotation string = "backup.velero.io/backup-volumes"
const ResticRestoreAnnotationPrefix string = "snapshot.velero.io"
Restic annotations
const RestoreRegistryHostname string = "openshift.io/restore-registry-hostname"
const RestoreServerVersion string = "openshift.io/restore-server-version"
const SwingPVAnnotation string = "openshift.io/swing-pv"
Variables ¶
This section is empty.
Functions ¶
func ConfigureContainerSleep ¶
ConfigureContainerSleep replaces the pod, cmd, and arg on containers so that post stage or migrate phase 1 restores applications do not start
func GetOwnerReferences ¶
func GetOwnerReferences(item runtime.Unstructured) ([]metav1.OwnerReference, error)
GetOwnerReferences returns the array of OwnerReferences associated with the resource
func GetRegistryInfo ¶
func GetRegistryInfo(major, minor string, log logrus.FieldLogger) (string, error)
func GetServerVersion ¶
func GetSrcAndDestRegistryInfo ¶
func GetSrcAndDestRegistryInfo(item runtime.Unstructured) (string, string, error)
func HasImageRefPrefix ¶
HasImageRefPrefix returns true if the input image reference begins with the input prefix followed by "/"
func ReplaceImageRefPrefix ¶
ReplaceImageRefPrefix replaces an image reference prefix with newPrefix. If the input image reference does not start with oldPrefix, an error is returned
func SwapContainerImageRefs ¶
func SwapContainerImageRefs(containers []corev1API.Container, oldRegistry, newRegistry string, log logrus.FieldLogger)
SwapContainerImageRefs updates internal image references from backup registry to restore registry pathnames
Types ¶
type APIServerConfig ¶
type APIServerConfig struct { ImagePolicyConfig imagePolicyConfig `json:"imagePolicyConfig"` RoutingConfig routingConfig `json:"routingConfig"` }
APIServerConfig stores configuration information about the current cluster
type BackupPlugin ¶
type BackupPlugin struct {
Log logrus.FieldLogger
}
BackupPlugin is a backup item action plugin for Heptio Ark.
func (*BackupPlugin) AppliesTo ¶
func (p *BackupPlugin) AppliesTo() (velero.ResourceSelector, error)
AppliesTo returns a velero.ResourceSelector that applies to everything.
func (*BackupPlugin) Execute ¶
func (p *BackupPlugin) Execute(item runtime.Unstructured, backup *v1.Backup) (runtime.Unstructured, []velero.ResourceIdentifier, error)
Execute sets a custom annotation on the item being backed up.
type LocalImageReference ¶
type LocalImageReference struct { Registry string Namespace string Name string Tag string Digest string }
LocalImageReference describes an image in the internal openshift registry
func ParseLocalImageReference ¶
func ParseLocalImageReference(s, prefix string) (*LocalImageReference, error)
ParseLocalImageReference
type RestorePlugin ¶
type RestorePlugin struct {
Log logrus.FieldLogger
}
RestorePlugin is a restore item action plugin for Heptio Ark.
func (*RestorePlugin) AppliesTo ¶
func (p *RestorePlugin) AppliesTo() (velero.ResourceSelector, error)
AppliesTo returns a velero.ResourceSelector that applies to everything.
func (*RestorePlugin) Execute ¶
func (p *RestorePlugin) Execute(input *velero.RestoreItemActionExecuteInput) (*velero.RestoreItemActionExecuteOutput, error)
Execute sets a custom annotation on the item being restored.