No ability to specify default resources

Bug #1946121 reported by Kenneth Koski
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
Wishlist
Unassigned

Bug Description

There is currently no way to specify a default value for resources in a charm's metadata.yaml. In particular, `oci-image` type resources can't set a default. This results in having to copy/paste the image name into several different places, each of which can be forgotten about when updating the image.

The existing solution used in many Kubeflow charms is to add a `upstream-source` field. This was a compromise solution in that the Charmed Kubeflow tooling could use the field, and Juju could ignore it.

However, can Juju just add a `default` field that it knows about, or use the existing `upstream-source` field? That would simplify this fun command:

    juju deploy ./kubeflow-profiles.charm --resource kfam-image=$(yq eval '.resources.kfam-image.upstream-source' metadata.yaml) --resource profile-image=$(yq eval '.resources.profile-image.upstream-source' metadata.yaml)

To something nice and easy, like this (if we didn't want to change the default behavior):

    juju deploy ./kubeflow-profiles.charm --default-resources

Or even this if we could change the default behavior:

    juju deploy ./kubeflow-profiles.charm

Revision history for this message
John A Meinel (jameinel) wrote :

Note that we would also want to integrate support from charmcraft so that build/push etc all use the right information.

Changed in juju:
importance: Undecided → Wishlist
status: New → Triaged
Revision history for this message
Pietro Pasotti (ppasotti) wrote :

+1 for this feature, it's silly that in most integration tests I write I need to write a get_oci_image utility to go and read that metadata file to build the juju deploy command.
The information is there, let's use it as a default value.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.