imagePullPolicy differs from the standard K8s behavior when using :latest tag
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Triaged
|
Wishlist
|
Unassigned |
Bug Description
Hi
When using K8s directly, if you don't specify an `imagePullPolicy` and use an image with `:latest` in its tag, `imagePullPolicy: Always` will be assumed. See: https:/
When using Juju passing an OCI image URL as a resource to it (e.g., `localhost:
That can make local development harder, because just pushing new versions of the image while keeping the same `:latest` tag will not cause K8s to pick up new changes.
Is this by design, or is this something that could be changed to align Juju with default K8s behavior?
At the moment, as a workaround when using microk8s, I'm running the following to get it to pull again images with `:latest`:
```
microk8s.ctr images list -q | grep localhost:
```
I've previously reported this in a Matrix channel, but I'm also sending this here so it's more easily findable by others in the future, even if this is deemed to not be a bug.
Thank you,
Allan
Triaged as wishlist, because there is a work-around.
As you have observed, Juju only ever uses the one policy default throughout.
I think it's a safe default, because it ensures homogeneity across units of the same application.