From 8c28aba425bb0360c532dd0302e5c1f42b7f6319 Mon Sep 17 00:00:00 2001 From: Akashdeep Dhar Date: Fri, 8 May 2026 09:26:29 +0530 Subject: [PATCH] mdapi: fix image trigger annote order on deploy metadata 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 --- roles/openshift-apps/mdapi/templates/deployment.yml.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/openshift-apps/mdapi/templates/deployment.yml.j2 b/roles/openshift-apps/mdapi/templates/deployment.yml.j2 index 03286eb796..d94cc8185c 100644 --- a/roles/openshift-apps/mdapi/templates/deployment.yml.j2 +++ b/roles/openshift-apps/mdapi/templates/deployment.yml.j2 @@ -6,6 +6,8 @@ metadata: labels: app: mdapi service: mdapi + annotations: + image.openshift.io/triggers: '[{"from":{"kind":"ImageStreamTag","name":"mdapi:latest"},"fieldPath":"spec.template.spec.containers[?(@.name==\"mdapi\")].image"}]' spec: replicas: 1 selector: @@ -18,8 +20,6 @@ spec: labels: app: mdapi service: mdapi - annotations: - image.openshift.io/triggers: '[{"from":{"kind":"ImageStreamTag","name":"mdapi:latest"},"fieldPath":"spec.template.spec.containers[?(@.name==\"mdapi\")].image"}]' spec: containers: - name: mdapi