Skip to content

NO-JIRA: [RHCOS10] Migrate base images and operand images to UBI10/RHEL10 - #103

Open
PillaiManish wants to merge 1 commit into
openshift:mainfrom
PillaiManish:rhcos10-ubi10-migration
Open

NO-JIRA: [RHCOS10] Migrate base images and operand images to UBI10/RHEL10#103
PillaiManish wants to merge 1 commit into
openshift:mainfrom
PillaiManish:rhcos10-ubi10-migration

Conversation

@PillaiManish

Copy link
Copy Markdown
Member

Update operator Dockerfile and all operand/related images for native RHCOS10 compatibility.

Operator image changes:

  • Dockerfile builder: rhel-9-golang-1.23-openshift-4.18 → rhel-10-golang-1.24-openshift-4.20
  • Dockerfile runtime: ubi9-minimal:9.4 → ubi10-minimal:10.1
  • vendor/build-machinery-go/.ci-operator.yaml: rhel-9-release-golang-1.23 → rhel-10-release-golang-1.24

Operand image changes (ghcr.io/spiffe → quay.io/rh-ee-rausingh mirrors):

  • spire-server:1.13.3, spire-agent:1.13.3, spiffe-csi-driver:0.2.8
  • oidc-discovery-provider:1.13.3, spire-controller-manager:0.6.3
  • spiffe-helper:v0.10.0 (new)
  • init container: ubi9:latest → ubi10-minimal:10.1

Made-with: Cursor

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

Copy link
Copy Markdown

@PillaiManish: This pull request explicitly references no jira issue.

Details

In response to this:

Update operator Dockerfile and all operand/related images for native RHCOS10 compatibility.

Operator image changes:

  • Dockerfile builder: rhel-9-golang-1.23-openshift-4.18 → rhel-10-golang-1.24-openshift-4.20
  • Dockerfile runtime: ubi9-minimal:9.4 → ubi10-minimal:10.1
  • vendor/build-machinery-go/.ci-operator.yaml: rhel-9-release-golang-1.23 → rhel-10-release-golang-1.24

Operand image changes (ghcr.io/spiffe → quay.io/rh-ee-rausingh mirrors):

  • spire-server:1.13.3, spire-agent:1.13.3, spiffe-csi-driver:0.2.8
  • oidc-discovery-provider:1.13.3, spire-controller-manager:0.6.3
  • spiffe-helper:v0.10.0 (new)
  • init container: ubi9:latest → ubi10-minimal:10.1

Made-with: Cursor

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.

@PillaiManish

Copy link
Copy Markdown
Member Author

/test e2e-operator-fips e2e-operator-rhcos10-fips e2e-operator-rhcos10

@coderabbitai

coderabbitai Bot commented Mar 30, 2026

Copy link
Copy Markdown

Walkthrough

Migrates build and runtime base images from UBI9 to UBI10 and replaces SPIRE/SPIFFE operand image references from ghcr.io to quay.io/rh-ee-rausingh, plus related manifest, config, test, utility, and documentation updates.

Changes

Cohort / File(s) Summary
Build Configuration
Dockerfile
Builder base switched to registry.redhat.io/ubi10/go-toolset:10.1, sets build-stage USER root, runtime base switched to registry.redhat.io/ubi10:10.1.
Manifests & Deployment Config
bundle/manifests/zero-trust-workload-identity-manager.clusterserviceversion.yaml, config/manager/manager.yaml
Replaced ghcr.io/spiffe/* operand images with quay.io/rh-ee-rausingh/zero-trust-workload-identity-manager-* equivalents (preserving versions), added RELATED_IMAGE_SPIFFE_HELPER, and updated spiffe-csi-init-container from UBI9 to UBI10.
Code & Tests
pkg/controller/spiffe-csi-driver/daemonset_test.go, pkg/controller/utils/relatedImages.go, test/e2e/utils/constants.go
Updated test expectation and default fallback image for CSI init container to UBI10, and changed E2E constant for Spiffe helper image to the quay.io/rh-ee-rausingh image/version.
Migration Documentation
.work/compliance/rhcos10/PR2-ubi10-migration.md
Added migration doc enumerating registry/tag mappings, operator/operand image changes, CI prerequisite, test checklist, and impacted files.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

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

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.11.4)

Error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions
The command is terminated due to an error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions


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

@openshift-ci
openshift-ci Bot requested review from bharath-b-rh and swghosh March 30, 2026 06:01
@openshift-ci

openshift-ci Bot commented Mar 30, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: PillaiManish
Once this PR has been reviewed and has the lgtm label, please assign trilokgeer 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

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
pkg/controller/spiffe-csi-driver/daemonset_test.go (1)

169-170: Cover the env override instead of pinning another default image string.

This will need another manual edit on the next image bump and still doesn’t prove RELATED_IMAGE_SPIFFE_CSI_INIT_CONTAINER is honored. Set the env var in the test and assert against that override value.

Proposed test refactor
+const expectedInitContainerImage = "example.com/test/spiffe-csi-init:test"
+
 func TestGenerateSpiffeCsiDriverDaemonSet(t *testing.T) {
+	t.Setenv(utils.SpiffeCSIInitContainerImageEnv, expectedInitContainerImage)
+
 	// Mock the utility functions that are called in the main function
 	// These would need to be properly mocked in a real test environment
@@
-	if container.Image != "registry.redhat.io/ubi10/ubi:10.1" {
-		t.Errorf("Expected init container image 'registry.redhat.io/ubi10/ubi:10.1', got '%s'", container.Image)
+	if container.Image != expectedInitContainerImage {
+		t.Errorf("Expected init container image '%s', got '%s'", expectedInitContainerImage, container.Image)
 	}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pkg/controller/spiffe-csi-driver/daemonset_test.go` around lines 169 - 170,
The test currently asserts container.Image equals a pinned default string;
instead set the RELATED_IMAGE_SPIFFE_CSI_INIT_CONTAINER env var at the start of
the test to a unique override value, recreate or call the function that builds
the DaemonSet so container (the local variable under test) picks up the env
override, then assert container.Image equals that override value; ensure you
restore/clear RELATED_IMAGE_SPIFFE_CSI_INIT_CONTAINER (or use t.Setenv) to avoid
leaking the env to other tests and update any references to container.Image
assertion in daemonset_test.go accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@config/manager/manager.yaml`:
- Around line 95-96: Add a SpiffeHelperImageEnv constant and a
GetSpiffeHelperImage() accessor so the RELATED_IMAGE_SPIFFE_HELPER env var is
actually used: define SpiffeHelperImageEnv alongside the other image constants
(matching the naming pattern used for SpireServerImageEnv,
SpiffeCSIInitContainerImageEnv, etc.), add a corresponding field/getter on the
related images helper (e.g., implement GetSpiffeHelperImage() on the same type
that provides the other getters), and wire that getter where related images are
injected so the manifest env var is consumed; alternatively remove the
RELATED_IMAGE_SPIFFE_HELPER entry from the manifest if you choose not to add
SpiffeHelperImageEnv/GetSpiffeHelperImage().

In `@Dockerfile`:
- Line 17: Replace the invalid runtime image reference in the Dockerfile FROM
instruction: change the existing "FROM registry.redhat.io/ubi10:10.1" to include
the image name so it reads "FROM registry.redhat.io/ubi10/ubi:10.1"; update the
Dockerfile's FROM line (the FROM instruction) to match the registry format used
elsewhere.

---

Nitpick comments:
In `@pkg/controller/spiffe-csi-driver/daemonset_test.go`:
- Around line 169-170: The test currently asserts container.Image equals a
pinned default string; instead set the RELATED_IMAGE_SPIFFE_CSI_INIT_CONTAINER
env var at the start of the test to a unique override value, recreate or call
the function that builds the DaemonSet so container (the local variable under
test) picks up the env override, then assert container.Image equals that
override value; ensure you restore/clear RELATED_IMAGE_SPIFFE_CSI_INIT_CONTAINER
(or use t.Setenv) to avoid leaking the env to other tests and update any
references to container.Image assertion in daemonset_test.go accordingly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7134392e-1383-424f-af70-20073a46812b

📥 Commits

Reviewing files that changed from the base of the PR and between 132ac0b and b8472bc.

📒 Files selected for processing (7)
  • .work/compliance/rhcos10/PR2-ubi10-migration.md
  • Dockerfile
  • bundle/manifests/zero-trust-workload-identity-manager.clusterserviceversion.yaml
  • config/manager/manager.yaml
  • pkg/controller/spiffe-csi-driver/daemonset_test.go
  • pkg/controller/utils/relatedImages.go
  • test/e2e/utils/constants.go

Comment on lines +95 to +96
- name: RELATED_IMAGE_SPIFFE_HELPER
value: quay.io/rh-ee-rausingh/zero-trust-workload-identity-manager-spiffe-spiffe-helper:v0.10.0

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify whether RELATED_IMAGE_SPIFFE_HELPER is wired through Go code.
rg -n -C2 'RELATED_IMAGE_SPIFFE_HELPER|SpiffeHelperImageEnv\b|func GetSpiffeHelperImage\('

Repository: openshift/zero-trust-workload-identity-manager

Length of output: 1296


🏁 Script executed:

# Check what actually exists in constants.go around the mentioned lines
cat -n pkg/controller/utils/constants.go | head -70 | tail -20

Repository: openshift/zero-trust-workload-identity-manager

Length of output: 1270


🏁 Script executed:

# Check what getters exist in relatedImages.go
grep -n "^func Get" pkg/controller/utils/relatedImages.go

Repository: openshift/zero-trust-workload-identity-manager

Length of output: 409


🏁 Script executed:

# Search for any references to spiffe-helper or SpiffeHelper in Go code
rg -n "spiffe.?helper|SpiffeHelper" --type go

Repository: openshift/zero-trust-workload-identity-manager

Length of output: 1933


🏁 Script executed:

# Check if there's any other pattern for consuming RELATED_IMAGE_* variables
rg -n "RELATED_IMAGE_" --type go -A 2 -B 2 | head -50

Repository: openshift/zero-trust-workload-identity-manager

Length of output: 1095


Add SpiffeHelperImageEnv to constants and GetSpiffeHelperImage() to relatedImages, or remove this unused env var.

The RELATED_IMAGE_SPIFFE_HELPER env var is added to the manifest, but the controller does not wire it. pkg/controller/utils/constants.go (lines 56–62) defines env var constants for all other images (SpireServerImageEnv, SpiffeCSIInitContainerImageEnv, etc.) but has no SpiffeHelperImageEnv. Similarly, pkg/controller/utils/relatedImages.go has getters for all other images but no GetSpiffeHelperImage(). This is dead configuration.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@config/manager/manager.yaml` around lines 95 - 96, Add a SpiffeHelperImageEnv
constant and a GetSpiffeHelperImage() accessor so the
RELATED_IMAGE_SPIFFE_HELPER env var is actually used: define
SpiffeHelperImageEnv alongside the other image constants (matching the naming
pattern used for SpireServerImageEnv, SpiffeCSIInitContainerImageEnv, etc.), add
a corresponding field/getter on the related images helper (e.g., implement
GetSpiffeHelperImage() on the same type that provides the other getters), and
wire that getter where related images are injected so the manifest env var is
consumed; alternatively remove the RELATED_IMAGE_SPIFFE_HELPER entry from the
manifest if you choose not to add SpiffeHelperImageEnv/GetSpiffeHelperImage().

Comment thread Dockerfile
go build -mod=mod -a -o zero-trust-workload-identity-manager ./cmd/zero-trust-workload-identity-manager/main.go

FROM registry.access.redhat.com/ubi9-minimal:9.4
FROM registry.redhat.io/ubi10:10.1

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

# Find and inspect the Dockerfile
fd -t f "Dockerfile" --exec wc -l {} \;

Repository: openshift/zero-trust-workload-identity-manager

Length of output: 594


🏁 Script executed:

# Show current Dockerfile content
cat -n Dockerfile

Repository: openshift/zero-trust-workload-identity-manager

Length of output: 844


🏁 Script executed:

# Check git diff to see what changed
git diff HEAD Dockerfile | head -100

Repository: openshift/zero-trust-workload-identity-manager

Length of output: 72


🏁 Script executed:

# Search for all UBI10 references in the repository
rg "registry\.redhat\.io/ubi" --no-heading -n

Repository: openshift/zero-trust-workload-identity-manager

Length of output: 928


🏁 Script executed:

# Check git log to understand the context of changes
git log --oneline -10

Repository: openshift/zero-trust-workload-identity-manager

Length of output: 171


🌐 Web query:

Red Hat UBI10 container image registry path format registry.redhat.io/ubi10

💡 Result:

The registry path format for Red Hat UBI 10 (Universal Base Image 10) container images on registry.redhat.io is registry.redhat.io/ubi10/<image-name>:<tag>. This requires authentication via a Red Hat subscription. Examples: - registry.redhat.io/ubi10/ubi:latest (standard UBI image) - registry.redhat.io/ubi10/ubi-minimal:latest - registry.redhat.io/ubi10/ubi-init:latest - registry.redhat.io/ubi10/s2i-base (as seen in updates) UBI images are also available without authentication from registry.access.redhat.com/ubi10/<image-name>:<tag> for public use. To pull from registry.redhat.io, authenticate first: podman login registry.redhat.io using your customer portal credentials.

Citations:


Fix the runtime image reference path to include the image name.

Line 17 uses registry.redhat.io/ubi10:10.1, which is an invalid registry path. Red Hat's UBI10 image registry requires the format registry.redhat.io/ubi10/<image-name>:<tag>. This reference will fail to pull. The codebase consistently uses registry.redhat.io/ubi10/ubi:10.1 elsewhere (config/manager, tests, manifests, and relatedImages). Update line 17 to match: FROM registry.redhat.io/ubi10/ubi:10.1.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Dockerfile` at line 17, Replace the invalid runtime image reference in the
Dockerfile FROM instruction: change the existing "FROM
registry.redhat.io/ubi10:10.1" to include the image name so it reads "FROM
registry.redhat.io/ubi10/ubi:10.1"; update the Dockerfile's FROM line (the FROM
instruction) to match the registry format used elsewhere.

@PillaiManish

Copy link
Copy Markdown
Member Author

/retest

…EL10

Update operator Dockerfile and all operand/related images for native
RHCOS10 compatibility.

Operator image changes:
- Dockerfile builder: rhel-9-golang-1.23-openshift-4.18 → registry.redhat.io/ubi10/go-toolset:10.1
- Dockerfile runtime: ubi9-minimal:9.4 → registry.redhat.io/ubi10:10.1
- vendor/build-machinery-go/.ci-operator.yaml: rhel-9-release-golang-1.23 → rhel-10-release-golang-1.24

Operand image changes (ghcr.io/spiffe → quay.io/rh-ee-rausingh mirrors):
- spire-server:1.13.3, spire-agent:1.13.3, spiffe-csi-driver:0.2.8
- oidc-discovery-provider:1.13.3, spire-controller-manager:0.6.3
- spiffe-helper:v0.10.0 (new)
- init container: ubi9:latest → ubi10-minimal:10.1

Made-with: Cursor
@PillaiManish
PillaiManish force-pushed the rhcos10-ubi10-migration branch from b8472bc to 6fa4f93 Compare March 30, 2026 12:23
@PillaiManish

Copy link
Copy Markdown
Member Author

/test e2e-operator-fips e2e-operator-rhcos10-fips e2e-operator-rhcos10

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@bundle/manifests/zero-trust-workload-identity-manager.clusterserviceversion.yaml`:
- Around line 710-711: The CSV added RELATED_IMAGE_SPIFFE_HELPER but the
operator code doesn't declare or include that key in the RELATED_IMAGE plumbing;
add a constant named RELATED_IMAGE_SPIFFE_HELPER to
pkg/controller/utils/constants.go and then wire it into the related images
resolution in pkg/controller/utils/relatedImages.go by adding the same key to
the relatedImages map/processing (the same place other RELATED_IMAGE_* entries
are handled, e.g., where GetRelatedImages()/relatedImages map is defined) so the
operator reads the env var and resolves/overrides the helper image just like the
other RELATED_IMAGE variables.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e7ac11b8-e98c-42a3-abd1-6e2d1305280d

📥 Commits

Reviewing files that changed from the base of the PR and between b8472bc and 6fa4f93.

📒 Files selected for processing (7)
  • .work/compliance/rhcos10/PR2-ubi10-migration.md
  • Dockerfile
  • bundle/manifests/zero-trust-workload-identity-manager.clusterserviceversion.yaml
  • config/manager/manager.yaml
  • pkg/controller/spiffe-csi-driver/daemonset_test.go
  • pkg/controller/utils/relatedImages.go
  • test/e2e/utils/constants.go
✅ Files skipped from review due to trivial changes (4)
  • pkg/controller/spiffe-csi-driver/daemonset_test.go
  • pkg/controller/utils/relatedImages.go
  • test/e2e/utils/constants.go
  • .work/compliance/rhcos10/PR2-ubi10-migration.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • Dockerfile
  • config/manager/manager.yaml

Comment on lines +710 to +711
- name: RELATED_IMAGE_SPIFFE_HELPER
value: quay.io/rh-ee-rausingh/zero-trust-workload-identity-manager-spiffe-spiffe-helper:v0.10.0

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

RELATED_IMAGE_SPIFFE_HELPER is added in CSV but not wired into operator image resolution

Line 710 and Line 800 introduce helper image config, but the operator utility layer does not define/read this env var (pkg/controller/utils/constants.go:55-62, pkg/controller/utils/relatedImages.go:1-59). This leaves the helper image outside the existing RELATED_IMAGE plumbing and can break maintainability/disconnected image override expectations.

Proposed wiring changes
diff --git a/pkg/controller/utils/constants.go b/pkg/controller/utils/constants.go
@@
 	SpireControllerManagerImageEnv     = "RELATED_IMAGE_SPIRE_CONTROLLER_MANAGER"
 	NodeDriverRegistrarImageEnv        = "RELATED_IMAGE_NODE_DRIVER_REGISTRAR"
 	SpiffeCSIInitContainerImageEnv     = "RELATED_IMAGE_SPIFFE_CSI_INIT_CONTAINER"
+	SpiffeHelperImageEnv               = "RELATED_IMAGE_SPIFFE_HELPER"
diff --git a/pkg/controller/utils/relatedImages.go b/pkg/controller/utils/relatedImages.go
@@
 func GetSpiffeCsiInitContainerImage() string {
 	containerImage := os.Getenv(SpiffeCSIInitContainerImageEnv)
 	if containerImage == "" {
 		return "registry.redhat.io/ubi10/ubi:10.1"
 	}
 	return containerImage
 }
+
+func GetSpiffeHelperImage() string {
+	spiffeHelperImage := os.Getenv(SpiffeHelperImageEnv)
+	if spiffeHelperImage == "" {
+		return ""
+	}
+	return spiffeHelperImage
+}

As per coding guidelines, "Focus on major issues impacting performance, readability, maintainability and security. Avoid nitpicks and avoid verbosity."

Also applies to: 800-801

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@bundle/manifests/zero-trust-workload-identity-manager.clusterserviceversion.yaml`
around lines 710 - 711, The CSV added RELATED_IMAGE_SPIFFE_HELPER but the
operator code doesn't declare or include that key in the RELATED_IMAGE plumbing;
add a constant named RELATED_IMAGE_SPIFFE_HELPER to
pkg/controller/utils/constants.go and then wire it into the related images
resolution in pkg/controller/utils/relatedImages.go by adding the same key to
the relatedImages map/processing (the same place other RELATED_IMAGE_* entries
are handled, e.g., where GetRelatedImages()/relatedImages map is defined) so the
operator reads the env var and resolves/overrides the helper image just like the
other RELATED_IMAGE variables.

@rausingh-rh

Copy link
Copy Markdown
Contributor

/test e2e-operator

@anirudhAgniRedhat

Copy link
Copy Markdown
Contributor

/retest

@anirudhAgniRedhat anirudhAgniRedhat left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

/retest

@anirudhAgniRedhat

Copy link
Copy Markdown
Contributor

/test e2e-operator

@anirudhAgniRedhat anirudhAgniRedhat left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

/test e2e-operator

@anirudhAgniRedhat

Copy link
Copy Markdown
Contributor

@PillaiManish @rausingh-rh the image for controller manager is not pullable please make the registry public

@rausingh-rh

Copy link
Copy Markdown
Contributor

/retest

@openshift-ci

openshift-ci Bot commented Mar 30, 2026

Copy link
Copy Markdown

@PillaiManish: 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.

4 participants