mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-04-28 11:27:00 +00:00
Add CRD name to error message when it is not ready to use
When debugging this error it is currently hard to identify what CRD is causing the issue. This is particularly difficult when dealing with over a hundred CRDs. Signed-off-by: Jose Arevalo <jose.matias.arevalo@gmail.com>
This commit is contained in:
committed by
Jose Arevalo
parent
e65ef28948
commit
0b307ca035
1
changelogs/unreleased/7295-josemarevalo
Normal file
1
changelogs/unreleased/7295-josemarevalo
Normal file
@@ -0,0 +1 @@
|
||||
Add CRD name to error message when it is not ready to use
|
||||
@@ -1757,7 +1757,7 @@ func (ctx *restoreContext) restoreItem(obj *unstructured.Unstructured, groupReso
|
||||
if groupResource == kuberesource.CustomResourceDefinitions {
|
||||
available, err := ctx.crdAvailable(name, resourceClient)
|
||||
if err != nil {
|
||||
errs.Add(namespace, errors.Wrapf(err, "error verifying custom resource definition is ready to use"))
|
||||
errs.Add(namespace, errors.Wrapf(err, "error verifying the CRD %s is ready to use", name))
|
||||
} else if !available {
|
||||
errs.Add(namespace, fmt.Errorf("the CRD %s is not available to use for custom resources", name))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user