Skip to content

medik8s: centralize workload image and mirror for disconnected - #82523

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
ugreener:fix/mirror-ubi-for-disconnected-tests
Jul 28, 2026
Merged

medik8s: centralize workload image and mirror for disconnected#82523
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
ugreener:fix/mirror-ubi-for-disconnected-tests

Conversation

@ugreener

@ugreener ugreener commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Centralize the workload image used by medik8s E2E destructive tests into a single source of truth (medik8s-lib step), and mirror it for disconnected clusters. This fixes disconnected FAR CI failures where openshift/tools:latest was unavailable (Cluster Samples Operator is Removed on air-gapped clusters).

Changes

  • medik8s-lib step: Write registry.access.redhat.com/ubi9/ubi-minimal:latest to SHARED_DIR/workload_image (single source of truth for all environments)
  • Connected config (4.22-konflux.yaml): All 14 e2e-test steps export WORKLOAD_IMAGE from the SHARED_DIR file; add medik8s-lib ref to SBR-EFS weekly job (was missing it)
  • Disconnected config (4.22-disconnected.yaml): Both e2e-test steps export WORKLOAD_IMAGE from the SHARED_DIR file
  • Disconnected catalogsource step: Add additionalImages for ubi9/ubi-minimal to oc-mirror config; create explicit ImageTagMirrorSet so CRI-O redirects pulls to the bastion mirror (follows the kueue-operator pattern)

To change the workload image in the future: edit ONE line in medik8s-lib-commands.sh and the additionalImages entry in the disconnected catalogsource step. Both in this repo, one PR.

Companion PR: medik8s/system-tests#60

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 28, 2026
@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

The medik8s test setup shares a centralized workload image, exports it in test jobs, mirrors it for disconnected environments, and applies an ImageTagMirrorSet for cluster pulls.

Changes

Medik8s workload image flow

Layer / File(s) Summary
Define shared workload image
ci-operator/step-registry/medik8s/lib/medik8s-lib-commands.sh
Writes the workload image reference to ${SHARED_DIR}/workload_image.
Export workload image in test jobs
ci-operator/config/medik8s/system-tests/medik8s-system-tests-main__4.22-disconnected.yaml, ci-operator/config/medik8s/system-tests/medik8s-system-tests-main__4.22-konflux.yaml
Test commands conditionally read the shared image reference and export WORKLOAD_IMAGE before running tests; one weekly EFS job also removes catalog and subscription steps.
Mirror and redirect workload image
ci-operator/step-registry/medik8s/disconnected-catalogsource/medik8s-disconnected-catalogsource-commands.sh
Validates the workload image, adds it to oc-mirror configuration, applies mirror mappings, and creates the medik8s-workload-image ImageTagMirrorSet.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested labels: needs-ok-to-test

Suggested reviewers: jmontleon, razo7

Sequence Diagram(s)

sequenceDiagram
  participant medik8s-lib.sh
  participant SHARED_DIR
  participant TestJob
  participant oc-mirror
  participant Cluster
  medik8s-lib.sh->>SHARED_DIR: Write workload_image
  TestJob->>SHARED_DIR: Read workload_image
  TestJob->>oc-mirror: Add WORKLOAD_IMAGE to mirror configuration
  oc-mirror->>Cluster: Apply generated mirror mappings
  Cluster->>Cluster: Apply medik8s-workload-image ImageTagMirrorSet
Loading
🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
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.
Stable And Deterministic Test Names ✅ Passed Touched files are CI shell/YAML configs, and no Ginkgo test-title definitions (It/Describe/Context/When) appear in them.
Test Structure And Quality ✅ Passed PASS: The PR only changes ci-operator shell/YAML config; no Ginkgo test code or It/BeforeEach/Eventually patterns were modified, so the check is not applicable.
Microshift Test Compatibility ✅ Passed No Ginkgo test files or new It/Describe cases were added; this PR only changes CI shell/YAML plumbing, so the MicroShift check is not applicable.
Single Node Openshift (Sno) Test Compatibility ✅ Passed No new Ginkgo e2e tests were added or modified; only CI YAML and shell scripts changed, so the SNO compatibility check is not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed Only CI config and shell scripts changed; no deployment manifests, controllers, or scheduling constraints were introduced.
Ote Binary Stdout Contract ✅ Passed The PR only changes shell step-registry/YAML configs; no Go main/init/TestMain or suite-setup stdout writes were introduced.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed No new Ginkgo tests were added or changed; the PR only updates CI shell/YAML wiring and mirror setup, with no IPv4-only or external-connectivity test logic.
No-Weak-Crypto ✅ Passed Touched files only add workload-image mirroring/export logic; no MD5/SHA1/DES/RC4/3DES/Blowfish/ECB, custom crypto, or secret/token compares found.
Container-Privileges ✅ Passed No touched file adds privileged, hostPID/Network/IPC, SYS_ADMIN, or allowPrivilegeEscalation settings; changes are env/script/image wiring only.
No-Sensitive-Data-In-Logs ✅ Passed No new sensitive logging was introduced; the PR only writes/exports WORKLOAD_IMAGE and the existing mirror-registry logs predate the change.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately captures the main change: centralizing the workload image and mirroring it for disconnected medik8s tests.
✨ 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.

@openshift-ci
openshift-ci Bot requested review from jmontleon and razo7 July 28, 2026 05:30
@ugreener
ugreener force-pushed the fix/mirror-ubi-for-disconnected-tests branch 3 times, most recently from 1056293 to e151a5f Compare July 28, 2026 06:06
@ugreener ugreener changed the title medik8s: mirror ubi-minimal for disconnected test workload pods medik8s: mirror ubi-minimal and propagate WORKLOAD_IMAGE for disconnected tests Jul 28, 2026
@ugreener
ugreener force-pushed the fix/mirror-ubi-for-disconnected-tests branch from e151a5f to 5634855 Compare July 28, 2026 06:30
@ugreener ugreener changed the title medik8s: mirror ubi-minimal and propagate WORKLOAD_IMAGE for disconnected tests Mirror ubi-minimal and propagate WORKLOAD_IMAGE for medik8s disconnected tests Jul 28, 2026
The medik8s E2E destructive tests create workload pods using
registry.access.redhat.com/ubi9/ubi-minimal to verify pod eviction
after node remediation. On disconnected clusters this registry is
unreachable.

Changes:
- medik8s-lib: write workload image to SHARED_DIR/workload_image
  (single source of truth for all environments)
- Connected config (4.22-konflux): export WORKLOAD_IMAGE from
  SHARED_DIR in all 14 e2e-test steps; add medik8s-lib ref to
  SBR-EFS job that was using individual steps instead of the
  medik8s-setup chain
- Disconnected config (4.22-disconnected): export WORKLOAD_IMAGE
  from SHARED_DIR in both e2e-test steps (already present)
- Disconnected catalogsource step: add additionalImages for
  ubi-minimal in oc-mirror config; create ImageTagMirrorSet so
  CRI-O redirects pulls to the bastion mirror (kueue-operator
  pattern)

To change the workload image: edit ONE line in medik8s-lib-commands.sh
and (for disconnected) the additionalImages entry. Both are in this
repo, same PR.

Companion PR: medik8s/system-tests#60

Co-Authored-By: Claude <noreply@anthropic.com>
@ugreener
ugreener force-pushed the fix/mirror-ubi-for-disconnected-tests branch from 5634855 to ceaaca4 Compare July 28, 2026 06:43
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

[REHEARSALNOTIFIER]
@ugreener: the pj-rehearse plugin accommodates running rehearsal tests for the changes in this PR. Expand 'Interacting with pj-rehearse' for usage details. The following rehearsable tests have been affected by this change:

Test name Repo Type Reason
pull-ci-medik8s-system-tests-main-4.22-disconnected-e2e-far-aws-disconnected medik8s/system-tests presubmit Ci-operator config changed
pull-ci-medik8s-system-tests-main-4.22-konflux-e2e-far-aws medik8s/system-tests presubmit Ci-operator config changed
pull-ci-medik8s-system-tests-main-4.22-konflux-e2e-mdr-aws medik8s/system-tests presubmit Ci-operator config changed
pull-ci-medik8s-system-tests-main-4.22-konflux-e2e-nhc-aws medik8s/system-tests presubmit Ci-operator config changed
pull-ci-medik8s-system-tests-main-4.22-konflux-e2e-nmo-aws medik8s/system-tests presubmit Ci-operator config changed
pull-ci-medik8s-system-tests-main-4.22-konflux-e2e-sbr-aws-efs medik8s/system-tests presubmit Ci-operator config changed
pull-ci-medik8s-system-tests-main-4.22-konflux-e2e-sbr-aws-odf medik8s/system-tests presubmit Ci-operator config changed
pull-ci-medik8s-system-tests-main-4.22-konflux-e2e-snr-aws medik8s/system-tests presubmit Ci-operator config changed
pull-ci-medik8s-system-tests-main-4.22-upgrade-e2e-far-upgrade-presubmit-aws medik8s/system-tests presubmit Registry content changed
periodic-ci-medik8s-system-tests-main-4.22-konflux-e2e-sbr-weekly-aws-efs N/A periodic Ci-operator config changed
periodic-ci-medik8s-system-tests-main-4.22-konflux-e2e-sbr-weekly-aws-odf N/A periodic Ci-operator config changed
periodic-ci-medik8s-system-tests-main-4.22-konflux-e2e-snr-weekly-aws N/A periodic Ci-operator config changed
periodic-ci-medik8s-system-tests-main-4.22-disconnected-e2e-far-weekly-aws-disconnected N/A periodic Ci-operator config changed
periodic-ci-medik8s-system-tests-main-4.22-konflux-e2e-mdr-weekly-aws N/A periodic Ci-operator config changed
periodic-ci-medik8s-system-tests-main-4.22-konflux-e2e-nmo-weekly-aws N/A periodic Ci-operator config changed
periodic-ci-medik8s-system-tests-main-4.21-disconnected-e2e-sbr-weekly-aws-disconnected-nfs N/A periodic Registry content changed
periodic-ci-medik8s-system-tests-main-4.22-konflux-e2e-far-weekly-aws N/A periodic Ci-operator config changed
periodic-ci-medik8s-system-tests-main-4.22-konflux-e2e-nhc-weekly-aws N/A periodic Ci-operator config changed
periodic-ci-medik8s-system-tests-main-4.22-upgrade-e2e-far-upgrade-aws N/A periodic Registry content changed
Interacting with pj-rehearse

Comment: /pj-rehearse to run up to 5 rehearsals
Comment: /pj-rehearse skip to opt-out of rehearsals
Comment: /pj-rehearse {test-name}, with each test separated by a space, to run one or more specific rehearsals
Comment: /pj-rehearse more to run up to 10 rehearsals
Comment: /pj-rehearse max to run up to 25 rehearsals
Comment: /pj-rehearse auto-ack to run up to 5 rehearsals, and add the rehearsals-ack label on success
Comment: /pj-rehearse list to get an up-to-date list of affected jobs
Comment: /pj-rehearse abort to abort all active rehearsals
Comment: /pj-rehearse network-access-allowed to allow rehearsals of tests that have the restrict_network_access field set to false. This must be executed by an openshift org member who is not the PR author

Once you are satisfied with the results of the rehearsals, comment: /pj-rehearse ack to unblock merge. When the rehearsals-ack label is present on your PR, merge will no longer be blocked by rehearsals.
If you would like the rehearsals-ack label removed, comment: /pj-rehearse reject to re-block merging.

@razo7 razo7 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/pj-rehearse ack

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jul 28, 2026
@openshift-ci

openshift-ci Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: razo7, ugreener

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

The pull request process is described 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

@ugreener ugreener changed the title Mirror ubi-minimal and propagate WORKLOAD_IMAGE for medik8s disconnected tests medik8s: centralize workload image and mirror for disconnected Jul 28, 2026
@ugreener

Copy link
Copy Markdown
Contributor Author

/pj-rehearse ack

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@ugreener: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@openshift-merge-bot openshift-merge-bot Bot added the rehearsals-ack Signifies that rehearsal jobs have been acknowledged label Jul 28, 2026
@openshift-merge-bot
openshift-merge-bot Bot merged commit 6be15ef into openshift:main Jul 28, 2026
2 of 16 checks passed
mrniranjan pushed a commit to mrniranjan/release that referenced this pull request Jul 28, 2026
…shift#82523)

The medik8s E2E destructive tests create workload pods using
registry.access.redhat.com/ubi9/ubi-minimal to verify pod eviction
after node remediation. On disconnected clusters this registry is
unreachable.

Changes:
- medik8s-lib: write workload image to SHARED_DIR/workload_image
  (single source of truth for all environments)
- Connected config (4.22-konflux): export WORKLOAD_IMAGE from
  SHARED_DIR in all 14 e2e-test steps; add medik8s-lib ref to
  SBR-EFS job that was using individual steps instead of the
  medik8s-setup chain
- Disconnected config (4.22-disconnected): export WORKLOAD_IMAGE
  from SHARED_DIR in both e2e-test steps (already present)
- Disconnected catalogsource step: add additionalImages for
  ubi-minimal in oc-mirror config; create ImageTagMirrorSet so
  CRI-O redirects pulls to the bastion mirror (kueue-operator
  pattern)

To change the workload image: edit ONE line in medik8s-lib-commands.sh
and (for disconnected) the additionalImages entry. Both are in this
repo, same PR.

Companion PR: medik8s/system-tests#60

Co-authored-by: Claude <noreply@anthropic.com>
enxebre pushed a commit to enxebre/release that referenced this pull request Jul 29, 2026
…shift#82523)

The medik8s E2E destructive tests create workload pods using
registry.access.redhat.com/ubi9/ubi-minimal to verify pod eviction
after node remediation. On disconnected clusters this registry is
unreachable.

Changes:
- medik8s-lib: write workload image to SHARED_DIR/workload_image
  (single source of truth for all environments)
- Connected config (4.22-konflux): export WORKLOAD_IMAGE from
  SHARED_DIR in all 14 e2e-test steps; add medik8s-lib ref to
  SBR-EFS job that was using individual steps instead of the
  medik8s-setup chain
- Disconnected config (4.22-disconnected): export WORKLOAD_IMAGE
  from SHARED_DIR in both e2e-test steps (already present)
- Disconnected catalogsource step: add additionalImages for
  ubi-minimal in oc-mirror config; create ImageTagMirrorSet so
  CRI-O redirects pulls to the bastion mirror (kueue-operator
  pattern)

To change the workload image: edit ONE line in medik8s-lib-commands.sh
and (for disconnected) the additionalImages entry. Both are in this
repo, same PR.

Companion PR: medik8s/system-tests#60

Co-authored-by: Claude <noreply@anthropic.com>
amogh-redhat pushed a commit to amogh-redhat/release that referenced this pull request Aug 5, 2026
…shift#82523)

The medik8s E2E destructive tests create workload pods using
registry.access.redhat.com/ubi9/ubi-minimal to verify pod eviction
after node remediation. On disconnected clusters this registry is
unreachable.

Changes:
- medik8s-lib: write workload image to SHARED_DIR/workload_image
  (single source of truth for all environments)
- Connected config (4.22-konflux): export WORKLOAD_IMAGE from
  SHARED_DIR in all 14 e2e-test steps; add medik8s-lib ref to
  SBR-EFS job that was using individual steps instead of the
  medik8s-setup chain
- Disconnected config (4.22-disconnected): export WORKLOAD_IMAGE
  from SHARED_DIR in both e2e-test steps (already present)
- Disconnected catalogsource step: add additionalImages for
  ubi-minimal in oc-mirror config; create ImageTagMirrorSet so
  CRI-O redirects pulls to the bastion mirror (kueue-operator
  pattern)

To change the workload image: edit ONE line in medik8s-lib-commands.sh
and (for disconnected) the additionalImages entry. Both are in this
repo, same PR.

Companion PR: medik8s/system-tests#60

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. rehearsals-ack Signifies that rehearsal jobs have been acknowledged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants