Commit 2c7e816
Add migration/pkg/catalogmigration: CatalogSource → ClusterCatalog (Phase 5)
Implements the catalog migration library (R8) that converts OLMv0
CatalogSources to OLMv1 ClusterCatalogs.
Key behaviors:
- Scans all CatalogSources across all namespaces before creating any
ClusterCatalogs to determine the naming strategy
- Naming strategy (R8): same name + same image → consolidate; same
name + different image → <name>-<namespace>; unique name → use as-is
- Adopt-or-create: existing ClusterCatalog with matching image ref is
adopted; idempotent migrated-from-catalogsource annotation
- Poll interval converted only when explicitly set; digest refs get no
poll interval
- int32 priority range validated; --acknowledge-priority-overflow caps
at MaxInt32/MinInt32
- spec.secrets and spec.grpcPodConfig noted (no OLMv1 equivalent)
- --delete-catalogsource requires both flag AND no referencing Subscriptions
API:
CatalogMigrator.MigrateCatalogs(ctx, CatalogMigratorOptions) → results
CatalogMigrationResult: status, reason, notes (informational)
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Todd Short <tshort@redhat.com>1 parent 832b418 commit 2c7e816
1 file changed
Lines changed: 403 additions & 0 deletions
0 commit comments