Skip to content

Add operator lifecycle metadata columns to installed operators table#16350

Draft
perdasilva wants to merge 2 commits intoopenshift:mainfrom
perdasilva:upgrade-planner
Draft

Add operator lifecycle metadata columns to installed operators table#16350
perdasilva wants to merge 2 commits intoopenshift:mainfrom
perdasilva:upgrade-planner

Conversation

@perdasilva
Copy link
Copy Markdown

@perdasilva perdasilva commented Apr 27, 2026

Analysis / Root cause:
Operators managed by OLM currently lack visibility into their lifecycle metadata — users cannot tell from the console whether an installed operator version is compatible with the current cluster version or what support phase it is in. This information is available from the lifecycle-server API but is not surfaced in the UI.

Solution description:
Add two new columns ("Cluster Compatibility" and "Support") to the Installed Operators table that display lifecycle metadata fetched from per-catalog lifecycle-server instances.

Backend changes (Go):

  • New /api/olm/lifecycle/{catalogNamespace}/{catalogName}/{packageName} proxy endpoint in pkg/olm/lifecycle.go that forwards requests to the lifecycle-server for the given catalog.
  • Service URL is derived from the catalog name (e.g., redhat-operatorsredhat-operators-lifecycle-server.<namespace>.svc:8443).
  • Requests are authenticated using the pod's service account bearer token via a new bearerTokenRoundTripper in pkg/olm/bearertoken.go.
  • Input validation with strict regex patterns to prevent SSRF attacks.
  • Reference RBAC manifests added to contrib/lifecycle-rbac.yaml.

Frontend changes (TypeScript/React):

  • useOperatorLifecycle hook fetches lifecycle data with in-memory caching (5-minute TTL for success, 30-second TTL for errors) and request deduplication to avoid duplicate in-flight requests.
  • ClusterCompatibilityStatus renders a green "Compatible" or red "Incompatible" PatternFly Label based on whether the operator version lists the current cluster's minor version in its openshiftCompatibility array. Shows "No data" when lifecycle info is unavailable.
  • SupportPhaseStatus displays the last support phase end date with a green check icon (>12 months remaining) or yellow warning icon (≤12 months remaining). Tooltip shows the current phase name (e.g., "Maintenance support", "Extended life cycle support"). Shows "Self-support" when all phases have ended, or "No data" when lifecycle info is unavailable.
  • Operator version matching uses minor version fallback (e.g., CSV version "2.16.0" matches lifecycle entry "2.16") to handle version format differences between CSVs and lifecycle metadata.
  • Columns are visible by default in ClusterServiceVersionList when the feature is enabled.
  • Feature is gated behind the OPERATOR_LIFECYCLE_METADATA flag, which is enabled only when TechPreview is active (window.SERVER_FLAGS.techPreview).

Screenshots / screen recording:

Test setup:

  • Cluster with TechPreview enabled and lifecycle-server instances deployed for the relevant catalog sources.
  • RBAC from contrib/lifecycle-rbac.yaml applied to the cluster.

Test cases:

  • Verify "Cluster Compatibility" and "Support" columns appear in the Installed Operators table when TechPreview is enabled.
  • Verify columns do NOT appear when TechPreview is disabled.
  • Verify "Compatible" / "Incompatible" / "No data" labels render correctly based on lifecycle data.
  • Verify support column shows last phase end date with green check (>12 months) or yellow warning (≤12 months).
  • Verify tooltip on support column shows the current phase name.
  • Verify "Self-support" displays when all support phases have ended.
  • Verify "No data" label displays when lifecycle info is unavailable for both columns.
  • Verify version matching works when lifecycle metadata uses minor versions (e.g., "2.16") and CSV uses full semver (e.g., "2.16.0").
  • Verify backend returns 400 for invalid namespace/catalog name inputs.
  • Verify backend returns 503 when lifecycle-server is unreachable.

Browser conformance:

  • Chrome
  • Firefox
  • Safari (or Epiphany on Linux)

Additional info:

  • The lifecycle-server is expected to be deployed per catalog source by the operator framework.
  • Debug console.log statements are present for development — these should be removed before merging.
  • The feature flag handler is registered via console-extensions.json and exposed as a new features module from the OLM package.

@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 27, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 27, 2026

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci openshift-ci Bot added the component/backend Related to backend label Apr 27, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 27, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: perdasilva
Once this PR has been reviewed and has the lgtm label, please assign jhadvig for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added component/olm Related to OLM kind/i18n Indicates issue or PR relates to internationalization or has content that needs to be translated labels Apr 27, 2026
@perdasilva perdasilva changed the title Add support lifecycle columns to installed operators table Add operator lifecycle metadata columns to installed operators table Apr 27, 2026
Introduce "Cluster Compatibility" and "Support" columns to the installed
operators table, allowing users to see at a glance whether an operator
version is compatible with the current cluster and what support phase it
is in.

Backend:
- Add /api/olm/lifecycle/ proxy endpoint that forwards requests to the
  per-catalog lifecycle-server, authenticated using the pod's service
  account bearer token.
- Validate catalog namespace and name inputs against strict regex to
  prevent SSRF.

Frontend:
- Add useOperatorLifecycle hook to fetch lifecycle data with in-memory
  caching (5m success / 30s error TTL) and request deduplication.
- Add ClusterCompatibilityStatus and SupportPhaseStatus components using
  PatternFly Labels to render compatibility and support phase information.
- Wire columns into ClusterServiceVersionList, visible by default when
  the feature is enabled.
- Gate the feature behind the OPERATOR_LIFECYCLE_METADATA feature flag,
  enabled only when TechPreview is active.
- Include reference RBAC manifests in contrib/ for development and
  testing.

Signed-off-by: Per G. da Silva <pegoncal@redhat.com>
- Fix version matching: use minor version fallback when lifecycle metadata
  versions (e.g. "2.16") don't exactly match the CSV spec version (e.g.
  "2.16.0"). Both getClusterCompatibility and getSupportPhase now share a
  findVersionEntry helper that tries exact match first, then minor version.

- Redesign Support column display:
  - Show last support phase end date with a green check icon (>12 months
    remaining) or yellow warning icon (<=12 months remaining).
  - Tooltip shows the current phase name from the lifecycle metadata
    (e.g. "Maintenance support", "Extended life cycle support").
  - Show "Self-support" when all phases have ended (was "End of life").
  - Show "No data" label when lifecycle info is unavailable, consistent
    with the Cluster Compatibility column.

- Refactor return types to use string unions (CompatibilityResult,
  SupportPhaseResult) for clearer control flow.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/backend Related to backend component/olm Related to OLM do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/i18n Indicates issue or PR relates to internationalization or has content that needs to be translated

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant