OKD-380: Add missing namespace to image trigger annotations#441
Conversation
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 both
mysql-persistent and mysql-ephemeral templates.
Also remove a stray image.openshift.io/triggers annotation from the Service
object in mysql-persistent-template.json — it was a copy-paste error that
referenced ${MARIADB_VERSION}. Services don't have containers.
Related: okd-project/okd#2337
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughTwo OpenShift MySQL template JSON files are updated to correct ChangesImageStreamTag trigger annotation corrections
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Pull Request validationSuccess🟢 CI - All checks have passed Auto MergeFailed🔴 Pull Request has unsupported target branch Success🟢 Pull Request is not marked as draft and it's not blocked by Triggered by Workflow Run |
|
[test-openshift-pytest] |
|
[test-openshift-pytest] |
Problem
Deploying MySQL from the OKD 4.22 Software Catalog fails with:
Reported in okd-project/okd#2337
Root Cause
When templates were migrated from
DeploymentConfigtoDeployment, theimage.openshift.io/triggersannotation dropped thenamespacefield from theImageStreamTagreference. Without it, the image trigger controller defaults to the Deployment's own namespace instead ofopenshift, so it can't find the ImageStream and the container image is never resolved.Fix
"namespace":"${NAMESPACE}"to the trigger annotation'sfromobject in bothmysql-persistentandmysql-ephemeraltemplatesimage.openshift.io/triggersannotation from the Service object inmysql-persistent-template.json— it was a copy-paste error that referenced${MARIADB_VERSION}(Services don't have containers, so this annotation had no effect)Impact
These template files are the upstream source for
openshift/library(viamake import) and ultimatelyopenshift/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.Summary by CodeRabbit