From 145d90834f1f0d39139c34f6f3d31ecc75e41231 Mon Sep 17 00:00:00 2001 From: Anatolii Bazko Date: Thu, 12 Aug 2021 11:09:41 +0300 Subject: [PATCH] fix: find CheCluster CR from alm-examples by kind Signed-off-by: Anatolii Bazko --- src/tasks/installers/olm.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tasks/installers/olm.ts b/src/tasks/installers/olm.ts index 8cbb44071..a874c4c56 100644 --- a/src/tasks/installers/olm.ts +++ b/src/tasks/installers/olm.ts @@ -446,7 +446,7 @@ export class OLMTasks { const csv = await kube.getCSV(currentCSV, cheNamespace) if (csv && csv.metadata.annotations) { const CRRaw = csv.metadata.annotations!['alm-examples'] - return (yaml.load(CRRaw) as Array)[0] + return (yaml.load(CRRaw) as Array).find(cr => cr.kind === 'CheCluster') } else { throw new Error(`Unable to retrieve Che cluster CR definition from CSV: ${currentCSV}`) }