Unable to upgrade k8s charm when only resource revisions changed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Fix Released
|
High
|
Heather Lanigan | ||
3.0 |
Fix Committed
|
High
|
Heather Lanigan | ||
3.1 |
Fix Released
|
High
|
Heather Lanigan |
Bug Description
When a k8s charm+resource is deployed, if the corresponding charm on Charmhub has a new release where only the resource revision is bumped (i.e. the charm revision remains the same), there is seemingly no way to force Juju to upgrade the OCI image in the active deployment.
It feels like a common use case to build and release new OCI images while keeping the charm revision the same, this would also seemingly relate to the k8s pull-policy.
Juju version: 2.9.35-ubuntu-amd64 (Client and controller)
Cloud: Kubernetes - Tested on microk8s
To reproduce:
- "Release" charm into a channel on charmhub with revision X for the charm and revision Y for the OCI image resource.
- Deploy the charm to k8s (tested with microk8s)
- (In my case) Tested /status endpoint which returns my Github commit hash
- "Release" the charm again, into the same channel, with revision X for the charm and revision Y+1 for the OCI image resource.
- Try `juju refresh app` and various alternatives.
- Tried restarting the pod with `microk8s kubectl get pod <pod_name> -n <namespace> -o yaml | microk8s kubectl replace --force -f -`
- Hitting the /status endpoint again confirmed the pod was not upgraded.
None of the above refresh commands or restarting the pod could get the image to upgrade.
Alternatively, if it's required that the charm revision be increased for the refresh to work then an update to the docs in https:/
Changed in juju: | |
milestone: | 2.9.38 → 2.9.39 |
Changed in juju: | |
milestone: | 2.9.39 → 2.9.40 |
Changed in juju: | |
assignee: | nobody → Heather Lanigan (hmlanigan) |
tags: | added: canonical-is |
Changed in juju: | |
milestone: | 2.9.40 → 2.9.41 |
Changed in juju: | |
status: | Triaged → In Progress |
Changed in juju: | |
milestone: | 2.9.41 → 2.9.42 |
Changed in juju: | |
milestone: | 2.9.42 → 2.9.43 |
Changed in juju: | |
status: | Fix Committed → Fix Released |
The "normal" workflow is to publish a new charm tuple containing charm and resource revision updates. The charm revision can remain the same and if there are updated resource revisions, juju is supposed to run the upgrade-charm hook.
At least that's how is used to work with the old charm store. There might be some work needed with charmhub to achieve the same behaviour.