Skip to content

Add Makefile target to upgrade OLMv0 install to OLMv1 install #2194

@coderabbitai

Description

@coderabbitai

Overview

Add a make target (e.g., make upgrade-v0-to-olmv1) that automates upgrading an existing OADP operator installation managed by OLMv0 (Subscription/OperatorGroup) to be managed by OLMv1 (ClusterExtension).

Background

PR #2160 introduces OLMv1 lifecycle Makefile targets (test-olmv1, test-olmv1-cleanup) for fresh OLMv1 installs. However, there is no automation for the migration/upgrade scenario where an operator is already installed via OLMv0 and needs to be transitioned to OLMv1 management.

Goals

  • Add a parameterized Makefile target (e.g., make upgrade-v0-to-olmv1) that:
    1. Detects/removes the existing OLMv0 Subscription and OperatorGroup for OADP.
    2. Creates the necessary ServiceAccount and RBAC (ClusterRoleBinding) for the OLMv1 installer.
    3. Creates a ClusterExtension pointing to the desired package/channel/version.
    4. Waits for the ClusterExtension to reach Installed=True.
  • Reuse existing OLMV1_* Makefile variables (package, namespace, channel, version, catalog, catalog-image, service-account) introduced in PR feat: OLMv1 lifecycle — fresh install tests + OLMv0→OLMv1 migration target #2160 for consistency.
  • Handle inline.watchNamespace (OLMv1) vs. watchNamespace env var / OperatorGroup scope (OLMv0) differences.

References

Requested by @kaovilai on PR #2160 comment: #2160

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions