mdapi: fix image trigger annote order on deploy metadata #3338

Merged
t0xic0der merged 1 commit from t0xic0der/ansible:dpmt into main 2026-05-11 02:37:13 +00:00
Member

The image.openshift.io/triggers annotation was on the pod template metadata
instead of the deployment metadata, so OpenShift's image trigger controller
never detected ImageStream updates for auto-rollout.

Basically, when the MDAPI playbook was re-executed after the repository
fedora-infra/ansible was moved from Pagure to Forgejo, we have not had even
a single rollout, even with all the image builds.

Signed-off-by: Akashdeep Dhar akashdeep.dhar@gmail.com

The `image.openshift.io/triggers` annotation was on the pod template metadata instead of the deployment metadata, so OpenShift's image trigger controller never detected ImageStream updates for auto-rollout. Basically, when the MDAPI playbook was re-executed after the repository `fedora-infra/ansible` was moved from Pagure to Forgejo, we have not had even a single rollout, even with all the image builds. Signed-off-by: Akashdeep Dhar <akashdeep.dhar@gmail.com>
mdapi: fix image trigger annote order on deploy metadata
All checks were successful
Linter / yamllint (pull_request) Successful in 43s
Linter / ansible-lint (pull_request) Successful in 2m24s
AI Code Review / ai-review (pull_request_target) Successful in 25s
1eb15a5fa9
The `image.openshift.io/triggers` annotation was on the pod template metadata
instead of the deployment metadata, so OpenShift's image trigger controller
never detected ImageStream updates for auto-rollout.

Basically, when the MDAPI playbook was re-executed after the repository
`fedora-infra/ansible` was moved from Pagure to Forgejo, we have not had even
a single rollout, even with all the image builds.

Signed-off-by: Akashdeep Dhar <akashdeep.dhar@gmail.com>
Author
Member

@kevin @zlopez could you please take a look? TIA.

@kevin @zlopez could you please take a look? TIA.

AI Code Review

Detailed Code Review

The changes correctly move the image.openshift.io/triggers annotation to the Deployment-level metadata. OpenShift's image trigger controller requires this annotation to be present at the workload resource level (Deployment) rather than the Pod template level to correctly trigger auto-rollouts on ImageStream updates. The JSONPath used in the annotation (spec.template.spec.containers[?(@.name=="mdapi")].image) correctly targets the mdapi container in the spec. No logic or configuration issues found.

Summary

  • Overall Assessment: No critical issues identified. The OpenShift annotation placement fix is logically correct and follows standard specifications for auto-rollouts.

🤖 AI Code Review | Generated with ai-code-review | Model: gemini-3.1-pro-preview

⚠️ AI-generated suggestions may be incorrect. Verify before applying. Not a replacement for human review.

## AI Code Review ### Detailed Code Review The changes correctly move the `image.openshift.io/triggers` annotation to the Deployment-level metadata. OpenShift's image trigger controller requires this annotation to be present at the workload resource level (Deployment) rather than the Pod template level to correctly trigger auto-rollouts on ImageStream updates. The JSONPath used in the annotation (`spec.template.spec.containers[?(@.name=="mdapi")].image`) correctly targets the mdapi container in the spec. No logic or configuration issues found. ### ✅ Summary - **Overall Assessment:** No critical issues identified. The OpenShift annotation placement fix is logically correct and follows standard specifications for auto-rollouts. --- 🤖 **AI Code Review** | Generated with [ai-code-review](https://gitlab.com/redhat/edge/ci-cd/ai-code-review) | **Model:** `gemini-3.1-pro-preview` ⚠️ *AI-generated suggestions may be incorrect. Verify before applying. Not a replacement for human review.*
Owner

Ah, this is likely fallout from the deploymentconfig -> deployment stuff?

In any case, looks good to me. +1

Let me know if you would like to merge/deploy or would like me to.

Ah, this is likely fallout from the deploymentconfig -> deployment stuff? In any case, looks good to me. +1 Let me know if you would like to merge/deploy or would like me to.
Author
Member

@kevin, thanks for the prompt review!

I am merging this pull request now.

@kevin, thanks for the prompt review! I am merging this pull request now.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
infra/ansible!3338
No description provided.