OKD-380: Add missing namespace to image trigger annotations#660
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
postgresql-persistent and postgresql-ephemeral templates.
Related: okd-project/okd#2337
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
📝 WalkthroughWalkthroughBoth OpenShift PostgreSQL template files ( ChangesImageStreamTag Namespace in Deployment Triggers
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 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 validationFailed🔴 Review - Missing review from a member (1 required) Success🟢 CI - All checks have passed Triggered by Workflow Run |
|
[test-openshift-pytest] |
Testing Farm results
|
Problem
Deploying PostgreSQL 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
Add
"namespace":"${NAMESPACE}"to the trigger annotation'sfromobject in bothpostgresql-persistentandpostgresql-ephemeraltemplates. TheNAMESPACEparameter already exists in both templates with a default value of"openshift".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