From 485b5417ac25dc038387cc1a25f20da7f7077cda Mon Sep 17 00:00:00 2001 From: Carlos Sanchez Date: Wed, 22 Jun 2022 16:57:35 +0200 Subject: [PATCH] fix: do not fail if missing permissions to some CRDs Continue and display the tree with the objects that we can access --- cmd/kubectl-tree/rootcmd.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/kubectl-tree/rootcmd.go b/cmd/kubectl-tree/rootcmd.go index a8910ec..9c09c3f 100644 --- a/cmd/kubectl-tree/rootcmd.go +++ b/cmd/kubectl-tree/rootcmd.go @@ -132,7 +132,7 @@ func run(command *cobra.Command, args []string) error { klog.V(2).Infof("querying all api objects") apiObjects, err := getAllResources(dyn, apis.resources(), allNs) if err != nil { - return fmt.Errorf("error while querying api objects: %w", err) + klog.V(2).Infof("error while querying api objects: %w", err) } klog.V(2).Infof("found total %d api objects", len(apiObjects))