Skip to content

Conversation

@kahowell
Copy link
Member

@kahowell kahowell commented Nov 10, 2025

Description

Jira: RHOAIENG-38505

Change the kustomize image reference from a hardcoded "controller" name to a "REPLACE_IMAGE" placeholder.

The previous strategy didn't work properly for CI, because the substitution logic modifies YAML files in the repo.

How Has This Been Tested?

  1. Ran make bundle-build locally, verified bundle contents have image: set according to my IMG/IMAGE_BASE_TAG, etc settings.
  2. Hope to use CI logs to verify what image gets deployed.

Screenshot or short clip

Merge criteria

  • You have read the contributors guide.
  • Commit messages are meaningful - have a clear and concise summary and detailed explanation of what was changed and why.
  • Pull Request contains a description of the solution, a link to the JIRA issue, and to any dependent or related Pull Request.
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work
  • The developer has run the integration test pipeline and verified that it passed successfully

E2E test suite update requirement

When bringing new changes to the operator code, such changes are by default required to be accompanied by extending and/or updating the E2E test suite accordingly.

To opt-out of this requirement:

  1. Please inspect the opt-out guidelines, to determine if the nature of the PR changes allows for skipping this requirement
  2. If opt-out is applicable, provide justification in the dedicated E2E update requirement opt-out justification section below
  3. Check the checkbox below:
  • Skip requirement to update E2E test suite for this PR
  1. Submit/save these changes to the PR description. This will automatically trigger the check.

E2E update requirement opt-out justification

build change

Summary by CodeRabbit

  • Chores
    • Updated manager container image replacement mechanism to use a direct image substitution approach instead of field-based transformation, enabling more flexible image resolution for CI/pullspec and local builds.

Jira: [RHOAIENG-38505](https://issues.redhat.com/browse/RHOAIENG-38505)

Change the kustomize image reference from a hardcoded "controller"
name to a "REPLACE_IMAGE" placeholder.

The previous strategy didn't work properly for CI, because the
[substitution logic](https://github.com/openshift/ci-tools/blob/2401b722f08b32d2a6926e1d918ef010ef37992c/pkg/steps/bundle_source.go#L90)
modifies YAML files in the repo.
@coderabbitai
Copy link

coderabbitai bot commented Nov 10, 2025

Walkthrough

The pull request consolidates image replacement logic by transitioning from a transformation-based approach using the "controller" key to direct "REPLACE_IMAGE" substitution across the Makefile, kustomization configuration, and manager deployment manifest.

Changes

Cohort / File(s) Summary
Image replacement configuration
Makefile, config/manager/kustomization.yaml.in
Makefile updated to replace controller=$(IMG) with REPLACE_IMAGE=$(IMG) for kustomize image set operation; corresponding image transformation block removed from kustomization.yaml.in
Deployment manifest
config/manager/manager.yaml
Container image value changed from controller:latest to REPLACE_IMAGE:latest with explanatory comment about CI/pullspec or local build substitution

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Verify the "REPLACE_IMAGE" substitution is consistently applied across all three files
  • Confirm that Kustomize properly recognizes and replaces the "REPLACE_IMAGE" key in the deployment manifest
  • Check that the removal of the image transformation block doesn't break existing deployment workflows

Poem

🐰 A carrot of config, so cleanly refined,
From controller to REPLACE_IMAGE aligned,
Three files now sing in simpler refrain,
The Makefile, kustomization, and manifest maintain
One path to injection, no transformation strain! ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title accurately describes the main change: updating the image placeholder strategy from 'controller' to 'REPLACE_IMAGE' in kustomize configuration.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

@kahowell kahowell changed the title build: update image placeholder strategy RHOAIENG-38505 | build: update image placeholder strategy Nov 10, 2025
@codecov
Copy link

codecov bot commented Nov 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 50.07%. Comparing base (90c809c) to head (e6caf41).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2842   +/-   ##
=======================================
  Coverage   50.07%   50.07%           
=======================================
  Files         144      144           
  Lines       10469    10469           
=======================================
  Hits         5242     5242           
  Misses       4669     4669           
  Partials      558      558           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@openshift-ci
Copy link

openshift-ci bot commented Nov 11, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: davidebianchi

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

The pull request process is described here

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

Copy link
Member

@zdtsw zdtsw left a comment

Choose a reason for hiding this comment

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

LGTM

@openshift-merge-bot openshift-merge-bot bot merged commit e364762 into opendatahub-io:main Nov 11, 2025
18 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in ODH Platform Planning Nov 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants