Skip to content

OKD-380: Add missing namespace to image trigger annotations#101

Merged
phracek merged 1 commit into
sclorg:masterfrom
pskrbasu:fix/image-trigger-namespace
Jun 23, 2026
Merged

OKD-380: Add missing namespace to image trigger annotations#101
phracek merged 1 commit into
sclorg:masterfrom
pskrbasu:fix/image-trigger-namespace

Conversation

@pskrbasu

Copy link
Copy Markdown
Contributor

Problem

Deploying Dancer+MySQL from the OKD 4.22 Software Catalog fails with:

spec.containers[0].image: Invalid value: " ": must not have leading or trailing whitespace

Reported in okd-project/okd#2337

Root Cause

When templates were migrated from DeploymentConfig to Deployment, the image.openshift.io/triggers annotation on the MySQL database Deployment dropped the namespace field from the ImageStreamTag reference. Without it, the image trigger controller defaults to the Deployment's own namespace instead of openshift, so it can't find the ImageStream and the container image is never resolved.

Fix

  • dancer-mysql-persistent: Add "namespace":"${NAMESPACE}" to the trigger annotation's from object on the database Deployment
  • dancer-mysql (ephemeral variant): The database Deployment had "image": " " but was entirely missing the image.openshift.io/triggers annotation — image resolution could never fire. Add the full trigger annotation with namespace. Also add the missing MYSQL_VERSION parameter (default "8.0-el8")

Impact

These template files are the upstream source for openshift/library (via make import) and ultimately openshift/cluster-samples-operator. An immediate fix was applied directly to the operator in openshift/cluster-samples-operator#701. This upstream fix ensures the bug doesn't recur on the next sync.

The image.openshift.io/triggers annotation on database Deployments is
missing the namespace field in the ImageStreamTag reference. Without it,
the image trigger controller looks for ImageStreams in the user's namespace
instead of 'openshift', causing image resolution to fail.

Add "namespace":"${NAMESPACE}" to the trigger from object in
dancer-mysql-persistent template.

For dancer-mysql template (ephemeral variant): the database Deployment had
"image": " " but was entirely missing the image.openshift.io/triggers
annotation — image resolution could never fire. Add the full trigger
annotation with namespace, and add the missing MYSQL_VERSION parameter
(default "8.0-el8").

Related: okd-project/okd#2337

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@pskrbasu, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 59 minutes and 35 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f2433bfb-dec4-4fc7-b9d0-923ddfd99d09

📥 Commits

Reviewing files that changed from the base of the PR and between d6e05b4 and 28a365e.

📒 Files selected for processing (2)
  • openshift/templates/dancer-mysql-persistent.json
  • openshift/templates/dancer-mysql.json
✨ 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.

@phracek

phracek commented Jun 23, 2026

Copy link
Copy Markdown
Member

[test]

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

LGTM. Thanks

@phracek phracek merged commit 981b0d5 into sclorg:master Jun 23, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants