Add operator lifecycle metadata columns to installed operators table#16350
Draft
perdasilva wants to merge 2 commits intoopenshift:mainfrom
Draft
Add operator lifecycle metadata columns to installed operators table#16350perdasilva wants to merge 2 commits intoopenshift:mainfrom
perdasilva wants to merge 2 commits intoopenshift:mainfrom
Conversation
Contributor
|
Skipping CI for Draft Pull Request. |
Contributor
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: perdasilva The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
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>
a223f60 to
53d263e
Compare
- 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>
a8d484c to
657a2f7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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):
/api/olm/lifecycle/{catalogNamespace}/{catalogName}/{packageName}proxy endpoint inpkg/olm/lifecycle.gothat forwards requests to the lifecycle-server for the given catalog.redhat-operators→redhat-operators-lifecycle-server.<namespace>.svc:8443).bearerTokenRoundTripperinpkg/olm/bearertoken.go.contrib/lifecycle-rbac.yaml.Frontend changes (TypeScript/React):
useOperatorLifecyclehook 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.ClusterCompatibilityStatusrenders a green "Compatible" or red "Incompatible" PatternFly Label based on whether the operator version lists the current cluster's minor version in itsopenshiftCompatibilityarray. Shows "No data" when lifecycle info is unavailable.SupportPhaseStatusdisplays 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.ClusterServiceVersionListwhen the feature is enabled.OPERATOR_LIFECYCLE_METADATAflag, which is enabled only when TechPreview is active (window.SERVER_FLAGS.techPreview).Screenshots / screen recording:
Test setup:
contrib/lifecycle-rbac.yamlapplied to the cluster.Test cases:
Browser conformance:
Additional info:
console-extensions.jsonand exposed as a newfeaturesmodule from the OLM package.