diff --git a/frontend/packages/operator-lifecycle-manager/src/dev-catalog.ts b/frontend/packages/operator-lifecycle-manager/src/dev-catalog.ts index e13c1ac035ca..38f840eddbe0 100644 --- a/frontend/packages/operator-lifecycle-manager/src/dev-catalog.ts +++ b/frontend/packages/operator-lifecycle-manager/src/dev-catalog.ts @@ -4,6 +4,12 @@ import { ClusterServiceVersionKind } from './types'; import { referenceForProvidedAPI, providedAPIsFor } from './components'; import * as operatorLogo from './operator.svg'; +const isInternal = (crd: { name: string }): boolean => { + const blacklistedAnnotation = 'operators.operatorframework.io/internal-objects'; + const internalOpList = _.get(crd, ['csv', 'metadata', 'annotations', blacklistedAnnotation], []); + return !!internalOpList.find((op) => op === crd.name); +}; + export const normalizeClusterServiceVersions = ( clusterServiceVersions: ClusterServiceVersionKind[], ): K8sResourceKind[] => { @@ -24,6 +30,8 @@ export const normalizeClusterServiceVersions = ( : all.concat([cur]), [], ) + // remove internal CRDs + .filter((crd) => !isInternal(crd)) .map((desc) => ({ // NOTE: Faking a real k8s object to avoid fetching all CRDs obj: { diff --git a/frontend/public/components/catalog/catalog-page.tsx b/frontend/public/components/catalog/catalog-page.tsx index a4bf0101e97e..8206787804cb 100644 --- a/frontend/public/components/catalog/catalog-page.tsx +++ b/frontend/public/components/catalog/catalog-page.tsx @@ -114,15 +114,7 @@ export class CatalogListPage extends React.Component