Multiple Docker Images per tag. One per digest
I have a k8s deployment that pulls an image based on the digest rather than the tag.
Why? I have multiple lower k8s namespaces which all pull from the same Docker repo. I don't want a bug fix for ns-dv to accidentally replace with an image pushed for ns-qa. So I'd like to keep both images around, even if they share a tag.
And since imagePullPolicy is always, new dynamic pods in ns-qa may use the latest, incorrect image.
imagePullPolicy: Always
Thus, in my Docker repo (Mirantis) I'd like to keep multiple images per tag, one per digest.
Is this possible?
A digest uniquely identifies an image. A tag points to a digest. So, you cannot have multiple images that have the same tag. The difference is, a tag may be updated to point to a different digest. Two different tags can point to the same digest.
So you either have to use the digests, or different tags for each namespace (app-dev, app-qa, etc.). The different tags may point to the same image, or they may point to different images.
When you promote a dev image to qa, for instance, you can simply tag the dev image as qa, so both app-dev and app-qa tags pull the same image. Then you can make updates to the dev image, and tag that as app-dev, so dev namespace updates, but qa namespace stays the same.