Skip to content

Add init container to e2e template for SAPM image gate#752

Open
dustman9000 wants to merge 1 commit into
openshift:masterfrom
dustman9000:fix-e2e-image-gate
Open

Add init container to e2e template for SAPM image gate#752
dustman9000 wants to merge 1 commit into
openshift:masterfrom
dustman9000:fix-e2e-image-gate

Conversation

@dustman9000

@dustman9000 dustman9000 commented Jun 8, 2026

Copy link
Copy Markdown
Member

Summary

Adds an init container to the osde2e focused test Job template that references the test image (${TEST_IMAGE}:${IMAGE_TAG}). This makes the image visible to qontract-reconcile's _collect_images scanner, which validates all container images exist before deploying.

Problem

The test image reference is embedded in a YAML string inside the TEST_SUITES_YAML env var. The _collect_images scanner only checks spec.template.spec.containers[].image and initContainers[].image, so it never finds the test image.

When SAPM auto-promotes the e2e saas file after a PKO deploy, the e2e Job deploys before the Konflux release pipeline finishes pushing the test image to the production registry, causing manifest unknown errors.

Fix

The init container runs true and exits immediately. Its only purpose is to surface the test image reference as a proper container image field so the SAPM image check blocks deployment until the image exists.

Benefits all operators using the golang-osd-e2e boilerplate convention.

@coderabbitai

coderabbitai Bot commented Jun 8, 2026

Copy link
Copy Markdown

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (1)
  • boilerplate/openshift/golang-osd-e2e/e2e-template.yml is excluded by !boilerplate/**

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 8835cacd-66cf-4b01-897b-b70560543387

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

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

Copy link
Copy Markdown
Member Author

/hold for testing

@openshift-ci openshift-ci Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 8, 2026

@joshbranham joshbranham 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.

This lgtm as a interim step to prevent flakes in e2e's. I presumed we had a better way to do this in Tekton + App-Interface, but as discussed on Slack, we've exhausted steps there.

/lgtm

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

openshift-ci Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dustman9000, joshbranham

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

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. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants