-
Notifications
You must be signed in to change notification settings - Fork 16
NO-JIRA: [RHCOS10] Migrate base images from UBI9 to UBI10 #76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
8b9f9f7
26fabfc
7ccafc7
2bffb28
26a787d
59de6c0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| # RHCOS10 UBI10 Migration | ||
|
|
||
| ## Summary | ||
|
|
||
| Migrate all container base images from UBI9/RHEL9 to UBI10/RHEL10 for native RHCOS10 compatibility. | ||
| Also moves the registry from `registry.access.redhat.com` to `registry.redhat.io`. | ||
|
|
||
| ```text | ||
| registry.access.redhat.com → registry.redhat.io | ||
| ``` | ||
|
|
||
| ## Image Changes | ||
|
|
||
| | Dockerfile | Before | After | | ||
| | -------------------------------------------------- | ------------------------------------------------------------------- | -------------------------------------------------- | | ||
| | `images/ansible-operator/Dockerfile` (basebuilder) | `registry.access.redhat.com/ubi9/ubi-minimal:9.7` | `registry.redhat.io/ubi10/ubi-minimal:10.1` | | ||
| | `images/ansible-operator/Dockerfile` (base) | `registry.access.redhat.com/ubi9/ubi-minimal:9.7` | `registry.redhat.io/ubi10/ubi-minimal:10.1` | | ||
| | `images/ansible-operator/pipfile.Dockerfile` | `registry.access.redhat.com/ubi9/ubi-minimal:9.7` | `registry.redhat.io/ubi10/ubi-minimal:10.1` | | ||
| | `openshift/Dockerfile` (builder) | `registry.ci.openshift.org/ocp/builder:rhel-9-golang-*` | `registry.redhat.io/ubi10/go-toolset:10.1` | | ||
| | `openshift/Dockerfile` (runtime) | `registry.ci.openshift.org/ocp/4.22:base-rhel9` | `registry.redhat.io/ubi10/ubi:10.1` | | ||
| | `openshift/Dockerfile.requirements` | `registry.ci.openshift.org/ocp/4.22:base-rhel9` | `registry.redhat.io/ubi10/ubi:10.1` | | ||
| | `openshift/release/ansible/Dockerfile.collections` | `registry.ci.openshift.org/ocp/4.22:base-rhel9` | `registry.redhat.io/ubi10/ubi:10.1` | | ||
|
|
||
| ## Exclusions | ||
|
|
||
| - `openshift/ci/dockerfiles/ansible-e2e.Dockerfile` — builds `FROM openshift-ansible-operator-plugins` (CI-internal); no base image to change. | ||
| - `testdata/memcached-molecule-operator/Dockerfile` — uses `quay.io/operator-framework/ansible-operator:dev`; not in scope. | ||
|
|
||
| ## Prerequisite | ||
|
|
||
| PR1 (`rhcos10-ubi9-compat-test`) should pass CI on RHCOS10 nodes before merging this. | ||
|
|
||
| ## Test Checklist | ||
|
|
||
| - [ ] `e2e-ansible` | ||
| - [ ] `e2e-ansible-fips` | ||
| - [ ] `e2e-ansible-rhcos10` | ||
| - [ ] `e2e-ansible-rhcos10-fips` | ||
|
|
||
| ## CI Image References | ||
|
|
||
| ```text | ||
| registry.access.redhat.com/ubi9/ubi-minimal:9.7 | ||
| → | ||
| registry.redhat.io/ubi10/ubi-minimal:10.1 | ||
|
|
||
| registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.25-openshift-4.22 | ||
| → | ||
| registry.redhat.io/ubi10/go-toolset:10.1 | ||
|
|
||
| registry.ci.openshift.org/ocp/4.22:base-rhel9 | ||
| → | ||
| registry.redhat.io/ubi10/ubi:10.1 | ||
| ``` | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,6 @@ | ||
| FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.25-openshift-4.22 AS builder | ||
| FROM registry.redhat.io/ubi10/go-toolset:10.1 AS builder | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
if [[ -f go.mod ]]; then
echo "go.mod version directives:"
awk '/^go / || /^toolchain / { print FILENAME ":" NR ": " $0 }' go.mod
else
echo "go.mod not found"
fi
echo
echo "Other repo references to Go versions or builder images:"
rg -n -C2 'go-toolset|golang-[0-9]+\.[0-9]+|^go [0-9]+\.[0-9]+|^toolchain go[0-9]+\.[0-9]+' --glob '!**/vendor/**'Repository: openshift/ansible-operator-plugins Length of output: 675 🌐 Web query:
💡 Result: For Red Hat’s Go Toolset status page also shows RHEL/UBI 10.1 carrying Go 1.25.3 (and later 1.25.z updates), consistent with the 1.25 series used in that stream. [2] Sources: [1], [2] Builder image Go version mismatch: openshift/Dockerfile uses Go 1.25.x, but openshift/go.mod requires Go 1.21.3. The 🤖 Prompt for AI Agents |
||
|
|
||
| USER root | ||
|
|
||
| ENV GO111MODULE=on \ | ||
| GOFLAGS=-mod=vendor | ||
|
|
@@ -9,7 +11,7 @@ RUN cd /go/src/github.com/openshift/ansible-operator-plugins \ | |
| && export GIT_VERSION="$(make -pRrq --no-print-directory | grep '^IMAGE_VERSION' | awk -F'= ' '{print $2}')-ocp" \ | ||
| && make -e build | ||
|
|
||
| FROM registry.ci.openshift.org/ocp/4.22:base-rhel9 | ||
| FROM registry.redhat.io/ubi10/ubi:10.1 | ||
|
|
||
| RUN mkdir -p /etc/ansible \ | ||
| && echo "localhost ansible_connection=local" > /etc/ansible/hosts \ | ||
|
|
@@ -36,7 +38,36 @@ COPY ${REMOTE_SOURCES} ${REMOTE_SOURCES_DIR} | |
| # Copy our local ansible-runner-http replacement module | ||
| COPY images/ansible-operator/ansible_runner_http /ansible_runner_http | ||
| COPY openshift/install-ansible.sh . | ||
| RUN chmod +x /install-ansible.sh \ | ||
| # ubi10/ubi:10.1 ships many Python packages as RPM-managed installs that have | ||
| # no pip RECORD file, causing pip to fail when requirements.txt pins different | ||
| # versions. Remove all potentially conflicting RPM Python packages upfront so | ||
| # pip can install the pinned versions cleanly. Uses || true per package so the | ||
| # step succeeds even if a package is not present in the base image. | ||
| RUN for pkg in \ | ||
| python3-urllib3 \ | ||
| python3-six \ | ||
| python3-requests \ | ||
| python3-idna \ | ||
| python3-certifi \ | ||
| python3-charset-normalizer \ | ||
| python3-chardet \ | ||
| python3-resolvelib \ | ||
| python3-pyyaml \ | ||
| python3-pyasn1 \ | ||
| python3-pyasn1-modules \ | ||
| python3-oauthlib \ | ||
| python3-markupsafe \ | ||
| python3-jinja2 \ | ||
| python3-packaging \ | ||
| python3-dateutil \ | ||
| python3-pexpect \ | ||
| python3-ptyprocess \ | ||
| python3-lockfile \ | ||
| python3-rsa \ | ||
| python3-websocket-client; do \ | ||
| rpm -e --nodeps "$pkg" 2>/dev/null || true; \ | ||
| done \ | ||
| && chmod +x /install-ansible.sh \ | ||
| && ./install-ansible.sh | ||
|
|
||
| # Remove packages which are only needed for cachito | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: openshift/ansible-operator-plugins
Length of output: 616
Add a build-path check for the new
registry.redhat.iobases.Multiple Dockerfiles in this PR now pull from
registry.redhat.io(e.g.,openshift/Dockerfile,openshift/Dockerfile.requirements), but the test checklist only covers downstream e2e lanes. Missing credentials or UBI10 package regressions will fail much earlier during the build phase, not during e2e.Suggested doc update
📝 Committable suggestion
🤖 Prompt for AI Agents