Skip to content

Commit

Permalink
Merge pull request #7295 from josemarevalo/main
Browse files Browse the repository at this point in the history
Add CRD name to error message when it is not ready to use
  • Loading branch information
ywk253100 authored Jan 12, 2024
2 parents d412854 + 0b307ca commit e498ea9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelogs/unreleased/7295-josemarevalo
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add CRD name to error message when it is not ready to use
2 changes: 1 addition & 1 deletion pkg/restore/restore.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
Expand Down

0 comments on commit e498ea9

Please sign in to comment.