openshift / openshift-velero-plugin

General Velero plugin for backup and restore of openshift workloads.
Apache License 2.0
48 stars 38 forks source link

MIG-249 - Add restored objects labels #58

Closed aufi closed 4 years ago

aufi commented 4 years ago

Update velero-plugin to label restored objects by migmigration and migplan refs.

Adds functionality of https://github.com/konveyor/openshift-migration-plugin/pull/58 (replaced raising error on missing label with info log entry).

Related to https://github.com/konveyor/mig-controller/issues/663

aufi commented 4 years ago

Removal of current migmigration refs is planned to land when mig-controller gets updated to use migplan ref only for migration itinerary.

aufi commented 4 years ago

@dymurray Hi Dylan, thanks for review! I've updated the PR and I think it is ready for review.

Labels are now being set on restored objects.

aufi commented 4 years ago

Thanks, updated. Labels on restored objects look like e.g.:

...
  labels:
    migration.openshift.io/migrated-by-migmigration: 4c2cfcf0-408d-4a07-88c2-4b6687a449f9
    migration.openshift.io/migrated-by-migplan: 0a34500f-6745-4f15-be67-14babede937e
    velero.io/backup-name: mig-run-2h8xm
    velero.io/restore-name: mig-run-rgvg9
...