-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Caveat: referencing images by tag #136
Comments
I'm not super sure what to do about this. I see the problem for sure. It seems like no matter what we do, people will have to change their Helm install command to include a specific image (via tag or digest). Perhaps we could make things more apparent by changing Makefile so that people developing (the official builds and helm chart defaults would remain unchanged) would end up with a timestamped label (or some equivalent uniqueness).
With this, we'd generate images with labels like Then the development documentation could tell users to specify the tag/digest that aligns to what they want to test? Does that sound like an approach that would improve things? |
I was thinking about this too recently. I was going to propose more consistent versioning; I've been lazily reusing e.g. I think your approach is elegant. |
Describe the bug
Some minor feedback on using image tags rather than digests.
If the developer rebuilds|repushes e.g.
agent
image, a Kubernetes cluster may not repull the image even when specs are reapplied. This is because even though the image has changed, it's tag has not e.g. the Helm chart references images by tag, and Kubernetes doesn't (!?) repull an image if it has the image (tag) cached.This can cause problems if the developer assumes that repushing causes e.g. Kubernetes to repull the image when the spec is reapplied.
The preferred mechanism would be to always (even in Helm) reference images by digest|hash as this is very likely to change every time the image changes.
An alternative is to eyeball the image digests after changes to ensure the images cached by Kubernetes reflect the digests of the images in the repo.
In the case of MicroK8s, it's possible to enumerate the cluster's cached images using
crictl
and to remove stale versions:Output of
kubectl get pods,akrii,akric -o wide
N/A
Kubernetes Version: [e.g. Native Kubernetes 1.19, MicroK8s 1.19, Minikube 1.19, K3s]
N/A
To Reproduce
Steps to reproduce the behavior:
crictl
agent
orcontroller
and repush (same tag)crictl
to confirm that the most recent image hash was not usedExpected behavior
Any images changes (e.g.
agent
,controller
, brokers) should cause Kubernetes repulls of the image on recreates.Logs (please share snips of applicable logs)
N/A
Additional context
N/A
The text was updated successfully, but these errors were encountered: