For the nginx-ingress-integrator charm we have a `placeholder-image` image resource because the charm itself doesn't actually need a workload resource. Up until Juju 2.9.23 there was no way of having a k8s charm with no workload that couldn't be prevented from being installed on machine models. With `assumes: - k8s-api` in metadata.yaml this is now possible.
So, I've updated nginx-ingress-integrator to include `assumes: - k8s-api` in metadata.yaml and have published it to the edge channel for testing. I've confirmed this charm isn't deployable on machine models, which is great.
However, the next stage of testing is to deploy the old version of the charm (that includes the workload) and then test a charm upgrade to the new version that doesn't include the workload.
To do this I ran the following in a k8s model:
```
juju deploy nginx-ingress-integrator --channel=edge --revision=29 ingress
```
However, this fails with the following in `juju debug-log` (repeated over and over):
```
controller-0: 10:51:26 INFO juju.worker.caasapplicationprovisioner.runner restarting "ingress" in 3s
controller-0: 10:51:29 INFO juju.worker.caasapplicationprovisioner.runner start "ingress"
controller-0: 10:51:29 INFO juju.worker.caasapplicationprovisioner.runner stopped "ingress", err: getting OCI image resources: unable to fetch OCI image resources for ingress: while getting resource from charmhub: resource "placeholder-image" not found
controller-0: 10:51:29 ERROR juju.worker.caasapplicationprovisioner.runner exited "ingress": getting OCI image resources: unable to fetch OCI image resources for ingress: while getting resource from charmhub: resource "placeholder-image" not found
```
And here's the juju status output:
```
$ juju status ingress
Model Controller Cloud/Region Version SLA Timestamp
ingress-test microk8s-localhost microk8s/localhost 2.9.34 unsupported 10:50:58+02:00
App Version Status Scale Charm Channel Rev Address Exposed Message
ingress waiting 0/1 nginx-ingress-integrator edge 29 no installing agent
Unit Workload Agent Address Ports Message
ingress/0 waiting allocating installing agent
```
There are no pods in microk8s for this application.
I've confirmed that I can work around this by running the following:
juju deploy nginx-ingress- integrator --channel=edge --revision=29 --resource placeholder- image=' google/ pause'