Skip to content

Commit

Permalink
fix: find CheCluster CR from alm-examples by kind (#1547)
Browse files Browse the repository at this point in the history
Signed-off-by: Anatolii Bazko <abazko@redhat.com>
  • Loading branch information
tolusha committed Aug 12, 2021
1 parent 9f9edf0 commit aec307a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tasks/installers/olm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<any>)[0]
return (yaml.load(CRRaw) as Array<any>).find(cr => cr.kind === 'CheCluster')
} else {
throw new Error(`Unable to retrieve Che cluster CR definition from CSV: ${currentCSV}`)
}
Expand Down

0 comments on commit aec307a

Please sign in to comment.