Skip to content

OLS-3205: Remove multi-image console selection and use single image -operator#1705

Open
blublinsky wants to merge 1 commit into
openshift:mainfrom
blublinsky:operator-console-multi-image
Open

OLS-3205: Remove multi-image console selection and use single image -operator#1705
blublinsky wants to merge 1 commit into
openshift:mainfrom
blublinsky:operator-console-multi-image

Conversation

@blublinsky

@blublinsky blublinsky commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Summary
Deploy a single console plugin image from the operator instead of selecting among three images based on OCP minor version. The unified console image handles UI variant selection at runtime (see companion OLS-3205 for OCP_VERSION env).

  • Remove --console-image-pf5 and --console-image-4-19 CLI flags
  • Remove OCP minor version branching that chose pf5 / 4-19 / default images
  • Simplify overrideImages() and defaultImages to a single console image
  • Remove unused ConsoleUIImagePF5Default and ConsoleUIImage419Default constants

Operator-only PR. A companion bundle PR is required before release to remove obsolete deployment args (--console-image-pf5, --console-image-4-19) and pf5/419 entries from related_images.json / CSV relatedImages. Installing this operator build with the current CSV will fail until that bundle PR lands.

Type of change

  • [ x] Refactor
  • New feature
  • Bug fix
  • CVE fix
  • Optimization
  • Documentation Update
  • Configuration Update
  • Bump-up dependent library

Related Tickets & Documents

Checklist before requesting a review

  • I have performed a self-review of my code.
  • PR has passed all pre-merge test jobs.
  • If it is a core feature, I have added thorough tests.

Testing

  • Please provide detailed steps to perform tests related to this code change.
  • How were the fix/results from this change verified? Please provide relevant screenshots or results.

Summary by CodeRabbit

  • Documentation

    • Updated console plugin configuration documentation for simplified image selection model
  • Refactor

    • Console image configuration simplified to use single --console-image flag instead of multiple version-specific variants

@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 10, 2026
@openshift-ci-robot

openshift-ci-robot commented Jun 10, 2026

Copy link
Copy Markdown

@blublinsky: This pull request references OLS-3205 which is a valid jira issue.

Details

In response to this:

Summary
Deploy a single console plugin image from the operator instead of selecting among three images based on OCP minor version. The unified console image handles UI variant selection at runtime (see companion OLS-3205 for OCP_VERSION env).

  • Remove --console-image-pf5 and --console-image-4-19 CLI flags
  • Remove OCP minor version branching that chose pf5 / 4-19 / default images
  • Simplify overrideImages() and defaultImages to a single console image
  • Remove unused ConsoleUIImagePF5Default and ConsoleUIImage419Default constants

Operator-only PR. A companion bundle PR is required before release to remove obsolete deployment args (--console-image-pf5, --console-image-4-19) and pf5/419 entries from related_images.json / CSV relatedImages. Installing this operator build with the current CSV will fail until that bundle PR lands.

Type of change

  • [ x] Refactor
  • New feature
  • Bug fix
  • CVE fix
  • Optimization
  • Documentation Update
  • Configuration Update
  • Bump-up dependent library

Related Tickets & Documents

Checklist before requesting a review

  • I have performed a self-review of my code.
  • PR has passed all pre-merge test jobs.
  • If it is a core feature, I have added thorough tests.

Testing

  • Please provide detailed steps to perform tests related to this code change.
  • How were the fix/results from this change verified? Please provide relevant screenshots or results.

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 10, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

This PR simplifies console plugin image selection by removing PatternFly-version-specific logic. The operator now deploys a single console image via --console-image, using OpenShift version detection only to set OCP_VERSION for runtime UI library selection rather than image branching.

Changes

Simplify console image selection model

Layer / File(s) Summary
Documentation of simplified console deployment model
.ai/spec/what/console-ui.md, .ai/spec/what/system-overview.md
Specification and system overview docs updated to describe a single console plugin image configured via --console-image, with OpenShift version detection only for runtime OCP_VERSION environment variable, removing prior per-version image selection.
Exported default image constants cleanup
internal/controller/utils/constants.go
Removed exported console image default variables ConsoleUIImagePF5Default and ConsoleUIImage419Default.
Operator startup logic and image selection
cmd/main.go
Simplified startup logic to remove OpenShift minor version detection for console image selection: removed PF5 and 4.19 default images, simplified overrideImages helper to accept only consoleImage, removed console-image-pf5 and console-image-4-19 command-line flags, deleted version-based image selection logic, and updated reconciler to use resolved console-plugin image directly.
Deployment patch and image placeholder updates
config/default/deployment-patch.yaml, hack/image_placeholders.json
Updated deployment patch to replace version-specific console image args with single --console-image placeholder and added new image args for PostgreSQL, OpenShift MCP server, Dataverse exporter, and OCP RAG; removed version-specific placeholder configurations.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: removing multi-image console selection and consolidating to a single image in the operator.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@openshift-ci openshift-ci Bot requested review from raptorsun and xrajesh June 10, 2026 11:56
@raptorsun

Copy link
Copy Markdown
Contributor

where we select the console image to use in this PR?

@blublinsky

Copy link
Copy Markdown
Contributor Author

where we select the console image to use in this PR?

According to the ticket its up to UI to do this. We tell it which OS version it is running on, and it does the magic https://redhat.atlassian.net/browse/OLS-3210

@blublinsky

Copy link
Copy Markdown
Contributor Author

/override "ci/prow/bundle-e2e-4-21"
this is an expected error as flags are removed

@openshift-ci

openshift-ci Bot commented Jun 10, 2026

Copy link
Copy Markdown

@blublinsky: Overrode contexts on behalf of blublinsky: ci/prow/bundle-e2e-4-21

Details

In response to this:

/override "ci/prow/bundle-e2e-4-21"
this is an expected error as flags are removed

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.

@blublinsky blublinsky force-pushed the operator-console-multi-image branch from c6b9ad2 to 63b3c2e Compare June 10, 2026 18:02
@raptorsun

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jun 11, 2026
@blublinsky blublinsky force-pushed the operator-console-multi-image branch from 63b3c2e to c5a7b2a Compare June 12, 2026 07:44
@openshift-ci openshift-ci Bot removed the lgtm Indicates that a PR is ready to be merged. label Jun 12, 2026
@openshift-ci

openshift-ci Bot commented Jun 12, 2026

Copy link
Copy Markdown

New changes are detected. LGTM label has been removed.

@openshift-ci

openshift-ci Bot commented Jun 12, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from raptorsun. 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

@coderabbitai coderabbitai Bot 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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
cmd/main.go (2)

181-186: ⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift

Block merge until the shipped manifests stop passing the removed console-image flags.

This binary no longer accepts --console-image-pf5 / --console-image-4-19, and the PR notes say the current CSV still passes obsolete args. That leaves the shipped operator unable to start until config/manager/ and bundle/manifests/ are updated in lockstep.

As per coding guidelines, cmd/**/*.go: "New flags should be reflected in deployment/CSV args under config/manager/ and bundle/manifests/ when they affect the shipped operator."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@cmd/main.go` around lines 181 - 186, The PR removes old flags
(console-image-pf5 / console-image-4-19) and introduces the new flag bound to
variable consoleImage via flag.StringVar("--console-image", ...); before
merging, update the shipped operator manifests so the deployment/CSV no longer
pass the removed flags and instead pass the new --console-image arg (or omit if
not needed). Specifically, update the operator args in config/manager/ and
bundle/manifests/ (CSV/deployment templates) to match the flag names used in
cmd/main.go (consoleImage / --console-image) and remove any references to
console-image-pf5 and console-image-4-19 so the running operator’s command-line
matches the code.

Source: Coding guidelines


301-305: ⚠️ Potential issue | 🟠 Major

Fix missing OpenShift version env wiring in console pod (OCP_VERSION)

  • internal/controller/console/deployment.go sets the console container Env to utils.GetProxyEnvVars() only, with no additional env var appended for OpenShift major/minor.
  • internal/controller/utils/utils.go:GetProxyEnvVars() only forwards proxy env vars (HTTPS_PROXY/HTTP_PROXY/NO_PROXY variants) and there are no repo hits for OCP_VERSION (or similar OpenShift version env var names).
  • cmd/main.go detects OpenShift major/minor, but that information is not injected into the console container environment anywhere in the console deployment code.

Inject OCP_VERSION=<major>.<minor> into the console container env (if the documented fallback requires it), or update the docs/selection logic to match the actual mechanism (e.g., versioned image selection instead of env fallback).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@cmd/main.go` around lines 301 - 305, cmd/main.go computes OpenShift
major/minor but never wires it into the console Pod env; update the controller
wiring so the computed ocpVersion (fmt.Sprintf("%d.%d", major, minor)) is passed
into the console controller initialization and used when building the container
Env in internal/controller/console/deployment.go (append an
EnvVar{Name:"OCP_VERSION", Value: ocpVersion} to the slice returned by
utils.GetProxyEnvVars()); keep utils.GetProxyEnvVars() as-is and ensure the
controller constructor (the function you call from cmd/main.go to
create/register the console reconciler) accepts the ocpVersion string and
forwards it to the deployment builder.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@cmd/main.go`:
- Around line 181-186: The PR removes old flags (console-image-pf5 /
console-image-4-19) and introduces the new flag bound to variable consoleImage
via flag.StringVar("--console-image", ...); before merging, update the shipped
operator manifests so the deployment/CSV no longer pass the removed flags and
instead pass the new --console-image arg (or omit if not needed). Specifically,
update the operator args in config/manager/ and bundle/manifests/
(CSV/deployment templates) to match the flag names used in cmd/main.go
(consoleImage / --console-image) and remove any references to console-image-pf5
and console-image-4-19 so the running operator’s command-line matches the code.
- Around line 301-305: cmd/main.go computes OpenShift major/minor but never
wires it into the console Pod env; update the controller wiring so the computed
ocpVersion (fmt.Sprintf("%d.%d", major, minor)) is passed into the console
controller initialization and used when building the container Env in
internal/controller/console/deployment.go (append an EnvVar{Name:"OCP_VERSION",
Value: ocpVersion} to the slice returned by utils.GetProxyEnvVars()); keep
utils.GetProxyEnvVars() as-is and ensure the controller constructor (the
function you call from cmd/main.go to create/register the console reconciler)
accepts the ocpVersion string and forwards it to the deployment builder.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: cd2558dd-6325-4b8f-ba0f-713802c0293c

📥 Commits

Reviewing files that changed from the base of the PR and between 8eeee23 and c5a7b2a.

📒 Files selected for processing (6)
  • .ai/spec/what/console-ui.md
  • .ai/spec/what/system-overview.md
  • cmd/main.go
  • config/default/deployment-patch.yaml
  • hack/image_placeholders.json
  • internal/controller/utils/constants.go
💤 Files with no reviewable changes (3)
  • internal/controller/utils/constants.go
  • hack/image_placeholders.json
  • config/default/deployment-patch.yaml

@blublinsky

Copy link
Copy Markdown
Contributor Author

/override "ci/prow/bundle-e2e-4-21"

@openshift-ci

openshift-ci Bot commented Jun 12, 2026

Copy link
Copy Markdown

@blublinsky: Overrode contexts on behalf of blublinsky: ci/prow/bundle-e2e-4-21

Details

In response to this:

/override "ci/prow/bundle-e2e-4-21"

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.

@openshift-ci

openshift-ci Bot commented Jun 12, 2026

Copy link
Copy Markdown

@blublinsky: all tests passed!

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

jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants