From 5b4562d5d76439749dd16edd1a9dabf2b4d4b020 Mon Sep 17 00:00:00 2001 From: Flea Flicker Date: Fri, 10 Apr 2026 10:36:42 +0000 Subject: [PATCH] fix: let Kustomize images transformer set seed/migrate image tags The promote-to-uat workflow was bypassing the Kustomize images transformer by hardcoding image tags directly on the Job spec containers. Since Jobs use immutable templates, Flux cannot update a running Job's pod template when the image tag changes. Instead, let the UAT overlay's images: newTag field handle tag injection via the images transformer, which correctly produces the updated image reference in the rendered manifest before Flux reconciles it. This reverts the explicit image tag writes added in 916a207 for migrate and seed, while keeping the Job name (with short SHA) and deploy-version annotation updates which are correctly handled separately. Co-Authored-By: Paperclip --- .github/workflows/promote-to-uat.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/promote-to-uat.yml b/.github/workflows/promote-to-uat.yml index 6aed17e..083e013 100644 --- a/.github/workflows/promote-to-uat.yml +++ b/.github/workflows/promote-to-uat.yml @@ -59,15 +59,15 @@ jobs: if [ -f "$MIGRATE_JOB" ]; then yq -i '.metadata.name = "migrate-schema-" + env(SHORT_SHA)' "$MIGRATE_JOB" yq -i '.metadata.annotations."groombook.app/deploy-version" = env(TAG)' "$MIGRATE_JOB" - yq -i '.spec.template.spec.containers[0].image = "ghcr.io/groombook/migrate:" + env(TAG)' "$MIGRATE_JOB" fi - # Update seed Job name to include short SHA and update image tag (immutable template fix) + # Update seed Job name to include short SHA (immutable template fix) + # NOTE: Do NOT update the image tag here — let the Kustomize images transformer + # in the UAT overlay handle it via newTag. This avoids the immutable template issue. SEED_JOB="apps/groombook/base/seed-job.yaml" if [ -f "$SEED_JOB" ]; then yq -i '.metadata.name = "seed-test-data-" + env(SHORT_SHA)' "$SEED_JOB" yq -i '.metadata.annotations."groombook.app/deploy-version" = env(TAG)' "$SEED_JOB" - yq -i '.spec.template.spec.containers[0].image = "ghcr.io/groombook/seed:" + env(TAG)' "$SEED_JOB" fi git -C /tmp/infra diff --stat