Skip to content

k8s rollout: restart by image (main) - #44

Merged
daanpersoons merged 1 commit into
mainfrom
feature/rollout-by-image-main
Aug 4, 2026
Merged

k8s rollout: restart by image (main)#44
daanpersoons merged 1 commit into
mainfrom
feature/rollout-by-image-main

Conversation

@daanpersoons

Copy link
Copy Markdown
Contributor

What

Restart deployments by image on rollout, instead of a synthesized variant=<folder> label selector.

  • infra/k8s/rollout: new rollout-image input. Selection priority: rollout-deploymentsrollout-labelsimage (default) → all. Image mode: kubectl get deploy -o json | jq (image startswith) | xargs kubectl rollout restart.
  • docker/setup: no longer appends variant=<path> to the label selector.
  • docker-build-and-deploy / docker-promote-to-environment: pass rollout-image = <registry>/<image>.

Why

The variant= selector forced every infra repo to hand-patch a variant: label onto its deployments (and one image often backs several deployments). Matching on the just-built image is precise and needs no labels.

Compatible

K8S_DEPLOYMENTS / K8S_LABELS still act as overrides. rollout-image is derived from the same setup output that builds the pushed image, so it matches the deployed image on every branch. Applied identically to main/v1/v2 (verified: image computation is the same on all three; no tags in use).

@daanpersoons
daanpersoons requested a review from djbe August 4, 2026 14:03
@daanpersoons
daanpersoons merged commit 05d1a06 into main Aug 4, 2026
1 check passed
@daanpersoons
daanpersoons deleted the feature/rollout-by-image-main branch August 4, 2026 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant