Skip to content

fix(e2e): accept image references from any registry in k8s bring-up (SFAM-2849) - #1699

Open
noctarius wants to merge 1 commit into
mainfrom
fix/e2e-image-pattern-main
Open

noctarius wants to merge 1 commit into
mainfrom
fix/e2e-image-pattern-main

Conversation

@noctarius

Copy link
Copy Markdown
Collaborator

e2e/scripts/k8s_cluster_bringup.py keeps a copy of the CRD image pattern in _IMAGE_RE, so a bad reference is reported with the offending variable named. On main that copy is still the three-registry allowlist the operator dropped in 41e55d6b (#751, 2026-10-23). Since ultra moved to registry.simplyblock.ai (2026-10-28), every k8s bring-up naming a current ultra build fails before the ClusterDeploymentConfig is submitted, with a message saying the apiserver would refuse a document it would accept.

This ports d413fd0 from feat/pnfs-e2e: _IMAGE_RE now matches ImageReference in the operator's atlas-lib/crdtypes/image.go, and the error message says what is actually required.

Checked against the pattern on main and the patched one:

Reference main patched
registry.simplyblock.ai/ultra:main-61ff864a rejected accepted
registry.simplyblock.ai/simplyblock/simplyblock:main-dd4c8d54 rejected accepted
registry.simplyblock.ai/ultra@sha256:… rejected accepted
quay.io/simplyblock-io/spdk:v1@sha256:… accepted accepted
simplyblock/spdk (untagged) rejected rejected

Jira: SFAM-2849. Failing run: https://github.com/simplyblock/sbcli/actions/runs/42223165332

🤖 Generated with Claude Code

shape_images refused any image outside quay.io/simplyblock-io,
docker.io/simplyblock and public.ecr.aws/simply-block, on the grounds that the
CRD's pattern admitted only those three. Operator 41e55d6b ("fix(api): accept
image references from any registry", #751, 2026-10-23) replaced that with a
generic OCI reference pattern that takes any registry host. This copy was never
updated.

So the harness has been failing k8s bring-up for every image on
registry.simplyblock.ai -- which is where ultra has been published since
operator #223 on 2026-10-28 -- with a message asserting the apiserver would
refuse a document it would in fact have accepted. It read as a product defect
and was nearly filed as one.

Mirror the current pattern from atlas-lib/crdtypes/image.go instead, and say so
in the comment, so the next person checks the source before believing this.
The check still earns its place: it names the offending variable, where the
apiserver returns the regex with no value attached. It now rejects only what
the CRD rejects -- an untagged reference, a malformed path.

Ported to main from d413fd0 on feat/pnfs-e2e (SFAM-2849).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 20, 2026 08:52
@github-actions github-actions Bot added the target/main Targets the development branch label Nov 20, 2026
@noctarius

Copy link
Copy Markdown
Collaborator Author

Ported your previous fix on the pnfs branch to main which fixes https://simplyblock.atlassian.net/browse/SFAM-2849

Copilot AI 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.

🟢 Approval recommended

No active review issues are reported for the image-reference validation update.

No open issues 🎉

What changed in this PR

Updates the Kubernetes end-to-end bring-up harness to accept image references from any registry, including registry.simplyblock.ai, aligning local validation with the operator’s CRD pattern.

Changes:

  • Replaces the three-registry allowlist with validation supporting registry hosts, nested repository paths, tags, and SHA-256 digests.
  • Revises validation errors to explain the accepted reference format.
  • Documents the mirrored pattern’s source and why it must stay synchronized.
File Description
e2e/​scripts/​k8s_cluster_bringup.py Broadens image-reference validation and updates its error message and explanatory comments.

Review effort: Balanced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

target/main Targets the development branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants