Make "not restored" message a bit better (#1901)

* Make "not restoring" message a bit better

Signed-off-by: Carlisia <carlisia@vmware.com>

* Tweak error msg

Signed-off-by: Carlisia <carlisia@vmware.com>

* Address feedback

Signed-off-by: Carlisia <carlisia@vmware.com>
This commit is contained in:
KubeKween
2019-10-01 13:47:21 -07:00
committed by Nolan Brubaker
parent 3984c7fa7e
commit e054a2f0b3

View File

@@ -1064,13 +1064,13 @@ func (ctx *context) restoreItem(obj *unstructured.Unstructured, groupResource sc
ctx.log.Infof("ServiceAccount %s successfully updated", kube.NamespaceAndName(obj))
}
default:
e := errors.Errorf("not restored: %s and is different from backed up version.", restoreErr)
e := errors.Errorf("could not restore, %s. Warning: the in-cluster version is different than the backed-up version.", restoreErr)
addToResult(&warnings, namespace, e)
}
return warnings, errs
}
ctx.log.Infof("Skipping restore of %s: %v because it already exists in the cluster and is unchanged from the backed up version", obj.GroupVersionKind().Kind, name)
ctx.log.Infof("Restore of %s, %v skipped: it already exists in the cluster and is the same as the backed up version", obj.GroupVersionKind().Kind, name)
return warnings, errs
}