Skip to content

CONSOLE-5271: Gate lifecycle metadata on server-side OLM lifecycle flag#16668

Open
perdasilva wants to merge 2 commits into
openshift:mainfrom
perdasilva:CONSOLE-5271-featuregate-lifecycle-metadata
Open

CONSOLE-5271: Gate lifecycle metadata on server-side OLM lifecycle flag#16668
perdasilva wants to merge 2 commits into
openshift:mainfrom
perdasilva:CONSOLE-5271-featuregate-lifecycle-metadata

Conversation

@perdasilva

@perdasilva perdasilva commented Jun 23, 2026

Copy link
Copy Markdown

Analysis / Root cause:
The operator lifecycle metadata UI (cluster compatibility and support phase columns on the Installed Operators page) was gated on the console's --tech-preview server flag (window.SERVER_FLAGS.techPreview). This couples the feature to the console's tech-preview mode rather than the cluster-level FeatureGate that controls the OLM lifecycle service itself. The frontend cannot read the FeatureGate resource directly because not all users have RBAC for it, so the gating must be done server-side via the console-operator.

Solution description:

  • Add --olm-lifecycle bridge flag and OLMLifecycleEnabled config field to ClusterInfo
  • Thread olmLifecycle through SERVER_FLAGS to the frontend via jsGlobals
  • Simplify detectLifecycleMetadata to read window.SERVER_FLAGS.olmLifecycle instead of techPreview
  • Remove FeatureGateModel (no longer needed — gating is handled server-side)
  • Add backend config test for the new flag

Screenshots / screen recording:

Test setup:
Requires the companion console-operator PR (openshift/console-operator#1174) to set olmLifecycleEnabled based on the OLMLifecycleAndCompatibility cluster FeatureGate.

Test cases:

  • Verify lifecycle columns (Cluster compatibility, Support phase) appear when --olm-lifecycle is set to true
  • Verify lifecycle columns are hidden when the flag is false, even if --tech-preview is set
  • Verify no regressions on the Installed Operators list page

Browser conformance:

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

Additional info:
Companion PR: openshift/console-operator#1174 (sets olmLifecycleEnabled in the ConsoleConfig based on the cluster FeatureGate).
Depends on #16655 and #16551.

Reviewers and assignees:
/assign @perdasilva

Summary by CodeRabbit

  • New Features
    • Added a new --olm-lifecycle-metadata CLI flag (default false) to control whether Operator Lifecycle Manager lifecycle metadata is exposed to the frontend.
    • Added cluster-level configuration olmLifecycleMetadataEnabled to enable this behavior and set the new flag accordingly.
  • UI/Frontend Updates
    • Updated the frontend to read the lifecycle metadata value from server-provided flags and pass it through to the UI.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jun 23, 2026
@openshift-ci-robot

openshift-ci-robot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

@perdasilva: This pull request references CONSOLE-5271 which is a valid jira issue.

Details

In response to this:

Analysis / Root cause:
The operator lifecycle metadata UI (cluster compatibility and support phase columns on the Installed Operators page) was gated on the console's --tech-preview server flag (window.SERVER_FLAGS.techPreview). This couples the feature to the console's tech-preview mode rather than the cluster-level FeatureGate that controls the OLM lifecycle service itself.

Solution description:

  • Add FeatureGateModel (config.openshift.io/v1) to the frontend model registry
  • Convert detectLifecycleMetadata (synchronous console.flag handler) to useDetectLifecycleMetadata (console.flag/hookProvider) that watches the singleton FeatureGate cluster resource via useK8sGet and checks status.featureGates[].enabled[] for the OLMLifecycleAndCompatibility gate
  • Update console-extensions.json to register the new hook provider
  • No changes to the lifecycle UI components themselves — the OPERATOR_LIFECYCLE_METADATA flag name is unchanged, only how it is determined

Screenshots / screen recording:

Test setup:
Requires a cluster with the OLMLifecycleAndCompatibility FeatureGate enabled. The lifecycle columns should appear on the Installed Operators page when the gate is enabled and be hidden when it is not, regardless of whether the console runs in tech-preview mode.

Test cases:

  • Verify lifecycle columns (Cluster compatibility, Support phase) appear when OLMLifecycleAndCompatibility is in FeatureGate/cluster status.featureGates[].enabled
  • Verify lifecycle columns are hidden when the gate is not enabled, even if --tech-preview is set
  • Verify graceful fallback (flag set to false) when FeatureGate resource cannot be read (e.g. RBAC)
  • Verify no regressions on the Installed Operators list page

Browser conformance:

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

Additional info:
Depends on #16655 and #16551.

Reviewers and assignees:
/assign @perdasilva

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Adds a new olmLifecycleMetadata flag path from server config through Server globals to frontend feature detection. ClusterInfo and addClusterInfo map the config to the flag, main passes it into Server, and the frontend now reads window.SERVER_FLAGS.olmLifecycleMetadata.

Changes

OLM Lifecycle Metadata Flag Pipeline

Layer / File(s) Summary
Config shape and flag mapping
pkg/serverconfig/types.go, pkg/serverconfig/config.go
ClusterInfo gains OLMLifecycleMetadataEnabled, and addClusterInfo maps it to olm-lifecycle-metadata when enabled.
Bridge and server wiring
cmd/bridge/main.go, pkg/server/server.go
main registers --olm-lifecycle-metadata and passes it into server.Server; Server, jsGlobals, and indexHandler carry the value into frontend template data.
Frontend type and detection
frontend/@types/console/window.d.ts, frontend/packages/operator-lifecycle-manager/src/features.ts
SERVER_FLAGS.telemetry gains olmLifecycleMetadata: boolean, and OLM lifecycle metadata detection reads that field instead of techPreview.
Config flag test
pkg/serverconfig/config_test.go
TestSetFlagsFromConfig adds coverage for OLMLifecycleMetadataEnabled and registers the olm-lifecycle-metadata flag in the test flag set.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: TheRealJon

🚥 Pre-merge checks | ✅ 4 | ❌ 11

❌ Failed checks (1 warning, 10 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Stable And Deterministic Test Names ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
Test Structure And Quality ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
Microshift Test Compatibility ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
Single Node Openshift (Sno) Test Compatibility ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
Topology-Aware Scheduling Compatibility ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
Ote Binary Stdout Contract ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
Ipv6 And Disconnected Network Test Compatibility ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
No-Weak-Crypto ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
Container-Privileges ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
No-Sensitive-Data-In-Logs ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: lifecycle metadata is now gated by a server-side OLM lifecycle flag.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@openshift-ci openshift-ci Bot requested review from TheRealJon and fsgreco June 23, 2026 14:15
@openshift-ci openshift-ci Bot added component/backend Related to backend component/core Related to console core functionality component/olm Related to OLM kind/i18n Indicates issue or PR relates to internationalization or has content that needs to be translated labels Jun 23, 2026
@perdasilva perdasilva force-pushed the CONSOLE-5271-featuregate-lifecycle-metadata branch from 23500fb to 553fdaa Compare June 23, 2026 14:16
@perdasilva perdasilva changed the title CONSOLE-5271: Gate lifecycle metadata on OLMLifecycleAndCompatibility FeatureGate CONSOLE-5271: Gate lifecycle metadata on server-side OLM lifecycle flag Jun 23, 2026
@perdasilva perdasilva force-pushed the CONSOLE-5271-featuregate-lifecycle-metadata branch from 553fdaa to 6c9e8a3 Compare June 23, 2026 14:48

@TheRealJon TheRealJon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci Bot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jun 23, 2026
@perdasilva perdasilva force-pushed the CONSOLE-5271-featuregate-lifecycle-metadata branch from 5b0213f to 21eab53 Compare June 24, 2026 09:06
@openshift-ci openshift-ci Bot removed the lgtm Indicates that a PR is ready to be merged. label Jun 24, 2026
@perdasilva

Copy link
Copy Markdown
Author

/retest

@TheRealJon TheRealJon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jun 24, 2026
@perdasilva

Copy link
Copy Markdown
Author

Docs Approver:
cc @jseseCCS

PX Approver:
cc @rh-joshbeverly

@rh-joshbeverly

Copy link
Copy Markdown

/label px-approved

@openshift-ci openshift-ci Bot added the px-approved Signifies that Product Support has signed off on this PR label Jun 29, 2026

@jseseCCS jseseCCS left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

conditionally approving in good faith that you'll review all my comments and apply as appropriate. 😺

Comment thread cmd/bridge/main.go Outdated
fNodeOperatingSystems := fs.String("node-operating-systems", "", "List of node operating systems. Example --node-operating-system=linux,windows")
fCopiedCSVsDisabled := fs.Bool("copied-csvs-disabled", false, "Flag to indicate if OLM copied CSVs are disabled.")
fTechPreview := fs.Bool("tech-preview", false, "Enable console Technology Preview features.")
fOLMLifecycleMetadata := fs.Bool("olm-lifecycle-metadata", false, "Enable OLM operator lifecycle and compatibility features.")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since "OLM" stands for Operator Lifecycle Manager, "Operator" should be capitalized here to correctly reflect proper noun of component.

-->

"Enable OLM Operator lifecycle and compatibility features."

Comment thread pkg/serverconfig/config_test.go Outdated
expectedError: nil,
},
{
name: "Should apply OLM lifecycle metadata enabled",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--> direct, definitive, active -->

name: "Applies OLM lifecycle metadata when enabled",

?

@jseseCCS

jseseCCS commented Jul 2, 2026

Copy link
Copy Markdown

/label docs-approved

@openshift-ci

openshift-ci Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jseseCCS, perdasilva, TheRealJon

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

The pull request process is described 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 the docs-approved Signifies that Docs has signed off on this PR label Jul 2, 2026
@perdasilva

Copy link
Copy Markdown
Author

/hold to address docs review comments

@openshift-ci openshift-ci Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 2, 2026
@perdasilva perdasilva force-pushed the CONSOLE-5271-featuregate-lifecycle-metadata branch from 21eab53 to 7cf33bd Compare July 2, 2026 14:14
@openshift-ci openshift-ci Bot removed the lgtm Indicates that a PR is ready to be merged. label Jul 2, 2026
@openshift-ci

openshift-ci Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

New changes are detected. LGTM label has been removed.

Per G. da Silva and others added 2 commits July 2, 2026 16:19
Replace the frontend FeatureGate CRD watch with a server-side flag so
that operator lifecycle metadata columns (cluster compatibility, support
phase) on the Installed Operators page are controlled by the console
operator configuration rather than requiring frontend RBAC to read the
FeatureGate resource.

- Add --olm-lifecycle bridge flag and OLMLifecycleEnabled config field
- Pass olmLifecycle through SERVER_FLAGS to the frontend
- Simplify detectLifecycleMetadata to read the server flag directly
- Remove FeatureGateModel (no longer needed in frontend)
- Add backend config test for the new flag

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Rename all occurrences of the OLM lifecycle config field, CLI flag, and
SERVER_FLAGS property to include "Metadata" for consistency with the
feature name (operator lifecycle metadata).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Per G. da Silva <pegoncal@redhat.com>
@perdasilva perdasilva force-pushed the CONSOLE-5271-featuregate-lifecycle-metadata branch from 7cf33bd to 5dca906 Compare July 2, 2026 14:19
@perdasilva

Copy link
Copy Markdown
Author

/retest

@openshift-ci

openshift-ci Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

@perdasilva: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/backend 5dca906 link true /test backend

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. component/backend Related to backend component/core Related to console core functionality component/olm Related to OLM do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. docs-approved Signifies that Docs has signed off on this PR jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. kind/i18n Indicates issue or PR relates to internationalization or has content that needs to be translated px-approved Signifies that Product Support has signed off on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants