Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRestoreNamespace ¶
func GetRestoreNamespace(ns, bkpName string, log logrus.FieldLogger) (string, error)
GetRestoreNamespace return the namespace mapping for the given namespace if namespace mapping not found then it will return the same namespace in which backup was created if namespace mapping found then it will return the mapping/target namespace
velero doesn't pass the restore name to plugin, so we are following the below approach to fetch the namespace mapping:
plugin find the relevant restore from the sorted list(creationTimestamp in decreasing order) of restore resource using following criteria:
- retore is in in-progress state AND backup for that restore matches with the backup name from snapshotID
Above approach works because velero support sequential restore
func InitializeClientSet ¶
InitializeClientSet initialize velero clientset
Types ¶
type RestoreByCreationTimestamp ¶
type RestoreByCreationTimestamp []velerov1api.Restore
RestoreByCreationTimestamp sorts a list of Restore by creation timestamp, using their names as a tie breaker.
func (RestoreByCreationTimestamp) Len ¶
func (o RestoreByCreationTimestamp) Len() int
func (RestoreByCreationTimestamp) Less ¶
func (o RestoreByCreationTimestamp) Less(i, j int) bool
func (RestoreByCreationTimestamp) Swap ¶
func (o RestoreByCreationTimestamp) Swap(i, j int)