use default resources for testing
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Triaged
|
Wishlist
|
Unassigned |
Bug Description
A common pattern of k8s charms is to specify container images in metadata.yaml, with a hint at the upstream source of the images like so:
```
resources:
mysql-image:
type: oci-image
description: Ubuntu LTS Docker image for MySQL
upstream-
```
This is all fine for deploying the charm from charmhub, because charmhub should be hosting the image as resource and juju can find it. But for deploying a local charm, juju requires providing sources for all the resources on the command line:
```
juju deploy ./mysql-
```
Same goes for local charms in bundle files:
```
mysql:
charm: ./mysql-k8s.charm
resources:
mysql-image: dataplatformoci
```
For local development and testing, this is verbose (especially for charms with multiple containers) and redundant, because most of the time we're copy/pasting from the upstream-source value in metadata.yaml.
It would be nice to have some short flag to direct juju to use these default / upstream resources, so a deployment could look something like this:
```
juju deploy ./mysql-k8s.charm --default-resources
```
or
```
mysql:
charm: ./mysql-k8s.charm
default_
```
Note that it's not clear if `upstream-source` key in metadata.yaml resources is officially part of the spec, but it appears to be at least a defacto standard across recent k8s charms.
Changed in juju: | |
status: | New → Triaged |
importance: | Undecided → Wishlist |
milestone: | none → 3.0.1 |
Changed in juju: | |
milestone: | 3.0.1 → 3.0.2 |
Changed in juju: | |
milestone: | 3.0.2 → 3.0.3 |
Changed in juju: | |
milestone: | 3.0.3 → 3.0.4 |