From 15b054fc8aabdb29421038b558a8a2f037fe6575 Mon Sep 17 00:00:00 2001 From: Jeremy Cline Date: Fri, 9 May 2025 11:32:00 -0400 Subject: [PATCH] fedora-image-uploader: fix deployment trigger on image changes I broke the trigger when I switched from one container to multiple containers in the pod. Syntax-wise, I found this multi-line variant in the CoreOS Cincinnati deployment config, and it seems like there's not a way to say "all container images in the spec". Or there might be, but I couldn't find an example or documentation. Signed-off-by: Jeremy Cline --- .../cloud-image-uploader/templates/deployment.yml.j2 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/roles/openshift-apps/cloud-image-uploader/templates/deployment.yml.j2 b/roles/openshift-apps/cloud-image-uploader/templates/deployment.yml.j2 index 464e5b0461..ce27c316c5 100644 --- a/roles/openshift-apps/cloud-image-uploader/templates/deployment.yml.j2 +++ b/roles/openshift-apps/cloud-image-uploader/templates/deployment.yml.j2 @@ -4,7 +4,13 @@ kind: Deployment metadata: name: cloud-image-uploader annotations: - image.openshift.io/triggers: '[{"from":{"kind":"ImageStreamTag","name":"cloud-image-uploader:latest"},"fieldPath":"spec.template.spec.containers[?(@.name==\"cloud-image-uploader\")].image"}]' + image.openshift.io/triggers: >- + [ + {"from":{"kind":"ImageStreamTag","name":"cloud-image-uploader:latest"},"fieldPath":"spec.template.spec.containers[?(@.name==\"azure-image-uploader\")].image"}, + {"from":{"kind":"ImageStreamTag","name":"cloud-image-uploader:latest"},"fieldPath":"spec.template.spec.containers[?(@.name==\"aws-image-uploader\")].image"}, + {"from":{"kind":"ImageStreamTag","name":"cloud-image-uploader:latest"},"fieldPath":"spec.template.spec.containers[?(@.name==\"container-image-uploader\")].image"}, + {"from":{"kind":"ImageStreamTag","name":"cloud-image-uploader:latest"},"fieldPath":"spec.template.spec.containers[?(@.name==\"google-cloud-image-uploader\")].image"} + ] spec: replicas: 1 selector: