feat: add RHCOS/OCP URL auto-resolution, checksum validation, and pre-release enforcement - #27
Merged
Conversation
…-release enforcement - Add ChecksumURL to RHCOSURLs; auto-resolve all RHCOS URLs (including checksum) from mirror.openshift.com when rhcos_images is omitted - Verify RHCOS image integrity via sha256sum manifest before each download - Skip URL auto-resolution for pre-release versions (ec, rc, candidate, nightly); require explicit URLs with actionable validation errors - Gate oc-mirror download behind air-gapped + managed-registry + non-ci - Hide rhcos_images block in generated config for agent boot - Show ocp_mirror_client override only when oc-mirror is actually needed Signed-off-by: SUDEESH JOHN <sudeeshjohn@in.ibm.com>
sudeeshjohn
force-pushed
the
feat/ocp-rhcos-url-handling
branch
from
July 22, 2026 04:49
c97543e to
610770c
Compare
Karthik-K-N
reviewed
Aug 3, 2026
Karthik-K-N
left a comment
Member
There was a problem hiding this comment.
Nothing major few questions and I think we can have used URLs and Constants in a file to better readibility.
- Add utils/utils.go with three shared helpers:
Contains(slice, item) – replaces three identical copies in
orchestrator, services/registry, cmd/scale
IsValidVersion(version) – validates MAJOR.MINOR.PATCH[‑suffix] format
IsPreReleaseVersion(version)– moved from validator.go and cmd/root.go
- Remove duplicated contains() from orchestrator/orchestrator.go,
services/registry.go, and cmd/scale.go; update all call sites to
utils.Contains()
- Remove duplicated isPreReleaseVersion() from cmd/root.go and
validation/validator.go; update all call sites to
utils.IsPreReleaseVersion()
- Extract seven ppc64le mirror URL format strings in cmd/root.go into
named constants (mirrorClientFmt, mirrorInstallerFmt, etc.) so the
base path is defined once and easy to update
- Add openshift.version format validation in validateOpenShift():
reject strings that do not match MAJOR.MINOR.PATCH[‑suffix] with a
clear error message before any mirror-URL resolution runs
- Add debug logging in orchestrator when the interface alias check
(ip addr show) fails and when the workspace-parent directory cannot
be read; both previously silently returned without any trace
Signed-off-by: SUDEESH JOHN <sudeeshjohn@in.ibm.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Extends the URL resolution and download pipeline for RHCOS images and OCP client binaries with integrity checking, smarter auto-resolution, and pre-release safety guardrails.
Changes
types/types.goChecksumURLfield toRHCOSURLsso users can explicitly pin a checksum manifest URL underrhcos_imagescmd/root.gorhcos_images.checksum_urlalongside kernel/initramfs/rootfs whenrhcos_imagesis omitted (uses the samemajor.minor/latest/base path on mirror.openshift.com)oc-mirrorauto-resolver behindair-gapped+ managed registry + non-ci so the ~500 MB binary is only downloaded when it will actually be usedservices/downloader.gosha256sum.txtmanifest before downloading images and verify each image's hash, matching the integrity flow already in place for OCP client binariesvalidation/validator.goocp_client_config/rhcos_imagescmd/createtemplate.gorhcos_imagescomment block in generated configs when--boot agentis used (Agent installer handles RHCOS dynamically)ocp_mirror_clientoverride line only when--isolation-level air-gapped+ managed registry + non-ci release — i.e. only when oc-mirror will actually be invokedBehaviour matrix