From 0e3fa94f122b37e2830b939781619aa996e30b44 Mon Sep 17 00:00:00 2001 From: Pasquale Congiusti Date: Tue, 5 Jan 2021 11:11:02 +0100 Subject: [PATCH] Skip CRD installation if output flag enabled Closes #886 --- pkg/install/cluster.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkg/install/cluster.go b/pkg/install/cluster.go index afe7bf7000..14b53a4cde 100644 --- a/pkg/install/cluster.go +++ b/pkg/install/cluster.go @@ -80,9 +80,12 @@ func SetupClusterWideResourcesOrCollect(ctx context.Context, clientProvider clie return err } - // Wait for all CRDs to be installed before proceeding - if err := WaitForAllCRDInstallation(ctx, clientProvider, 25*time.Second); err != nil { - return err + // Don't wait if we're just collecting resources + if collection == nil { + // Wait for all CRDs to be installed before proceeding + if err := WaitForAllCRDInstallation(ctx, clientProvider, 25*time.Second); err != nil { + return err + } } // Installing ClusterRole