velero/pkg
Nolan Brubaker 33cc85cd0c Compare backup and cluster objects before logging
When restoring resources that raise an already exists error, check their
equality before logging a message on the restore. If they're the same
except for some metadata, don't generate a message.

The restore process was modified so that if an object had an empty
namespace string, no namespace key is created on the object. This was to
avoid manipulating the copy of the current cluster's object by adding
the target namespace.

There are some cases right now that are known to not be equal via this
method:

- The `default` ServiceAccount in a namespace will not match, primarily
because of differing default tokens. These will be handled in their own
patch
- IP addresses for Services are recorded in the backup object, but are
either not present on the cluster object, or different. An issue for
this already exists at https://github.com/heptio/ark/issues/354
- Endpoints have differing values for `renewTime`. This may be
insubstantial, but isn't currently handled by the resetMetadataAndStatus
function.
- PersistentVolume objects do not match on spec fields, such as
claimRef and cloud provider persistent disk info

Signed-off-by: Nolan Brubaker <nolan@heptio.com>
2018-04-10 14:55:48 -04:00
..
apis/ark/v1 backup delete/describe enhancements 2018-04-05 14:21:45 -04:00
backup backup delete/describe enhancements 2018-04-05 14:21:45 -04:00
buildinfo make language and casing consistent across copyrights 2018-01-02 10:51:49 -08:00
client Add global kubecontext CLI flag 2018-02-26 10:47:39 -08:00
cloudprovider Merge pull request #341 from skriss/snapshot-tags 2018-03-14 12:50:40 -04:00
cmd Don't allow deletion of in-progress backups 2018-04-06 13:08:39 -04:00
controller Don't allow deletion of in-progress backups 2018-04-06 13:08:39 -04:00
discovery make language and casing consistent across copyrights 2018-01-02 10:51:49 -08:00
generated Switch backup finalizer to DeleteBackupRequest 2018-04-05 11:16:15 -04:00
plugin server: allow configurable plugin dir 2018-02-27 14:50:38 -05:00
restore Compare backup and cluster objects before logging 2018-04-10 14:55:48 -04:00
util Switch backup finalizer to DeleteBackupRequest 2018-04-05 11:16:15 -04:00