1
0
Fork 0
forked from infra/ansible

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 <akashdeep.dhar@gmail.com>
This commit is contained in:
Akashdeep Dhar 2026-05-08 09:26:29 +05:30 committed by Akashdeep Dhar
commit 8c28aba425

View file

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