Block runc on RHEL 10 via OSImageURL stream class inspection#6238
Block runc on RHEL 10 via OSImageURL stream class inspection#6238bitoku wants to merge 1 commit into
Conversation
When OSImageStream is not available, detect RHEL 10 by inspecting the container image's io.openshift.os.streamclass label from the OSImageURL. This complements the OSImageStream-based check (commit 50a5088) by covering the OSImageURL path. The implementation: - Adds an osImageStreamClassInspector interface for testability - Fetches the pull secret and inspects the OS container image to extract the stream class label - Caches the result as annotations on the rendered MachineConfig to avoid repeated registry calls - Fails open on image inspection errors (logs warning, does not block rendering) - Blocks rendering with an actionable error when runc is the effective default runtime on a RHEL 10 or CentOS 10 pool Assisted-by: Claude Code <https://claude.com/claude-code>
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
Skipping CI for Draft Pull Request. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (7)
WalkthroughThe PR adds mirror-aware OS image stream-class inspection, threads the resulting class into bootstrap and render validation, and updates controller wiring and tests to pass the new image and mirror informers. ChangesStream-class validation flow
Sequence Diagram(s)sequenceDiagram
participant BootstrapRun as "Bootstrap.Run"
participant GetBaseStreamClass as "Bootstrap.getBaseStreamClass"
participant InspectMirrors as "osimagestream.InspectStreamClassWithMirrors"
participant RenderRunBootstrap as "render.RunBootstrap"
participant CheckRuncBlockedOnStream as "checkRuncBlockedOnStream"
BootstrapRun->>GetBaseStreamClass: resolve baseStreamClass
GetBaseStreamClass->>InspectMirrors: inspect base OS container image
BootstrapRun->>RenderRunBootstrap: pass baseStreamClass
RenderRunBootstrap->>CheckRuncBlockedOnStream: reject runc on RHEL10
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 error, 1 warning)
✅ Passed checks (13 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: bitoku The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Assisted-by: Claude Code https://claude.com/claude-code
- What I did
When OSImageStream is not available, detect RHEL 10 by inspecting the container image's io.openshift.os.streamclass label from the OSImageURL. This complements the OSImageStream-based check (commit 50a5088) by covering the OSImageURL path.
- How to verify it
manual test and e2e test
- Description for the changelog
Added a block mechanism when OSImageURL is RHEL 10 based and runc is used.
Summary by CodeRabbit
New Features
Bug Fixes